/[gentoo-x86]/net-misc/dhcp/dhcp-3.0_p2-r4.ebuild
Gentoo

Contents of /net-misc/dhcp/dhcp-3.0_p2-r4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Thu Jun 24 23:41:07 2004 UTC (15 years, 6 months ago) by agriffis
Branch: MAIN
Changes since 1.3: +2 -2 lines
update copyright line: Gentoo Technologies => Gentoo Foundation

1 agriffis 1.4 # Copyright 1999-2004 Gentoo Foundation
2 seemant 1.1 # Distributed under the terms of the GNU General Public License v2
3 agriffis 1.4 # $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.0_p2-r4.ebuild,v 1.3 2004/04/27 21:30:25 agriffis Exp $
4 seemant 1.1
5 method 1.2 IUSE="selinux"
6 seemant 1.1
7 agriffis 1.3 inherit flag-o-matic eutils
8 seemant 1.1
9     #This should be fairly consistant now, unless we have any _pre releases...
10     MY_P="${P/_p/pl}"
11     S=${WORKDIR}/${MY_P}
12     DESCRIPTION="ISC Dynamic Host Configuration Protocol"
13     SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz"
14     HOMEPAGE="http://www.isc.org/products/DHCP"
15    
16     SLOT="0"
17     LICENSE="isc-dhcp"
18     KEYWORDS="x86 ppc sparc ~mips amd64"
19    
20 method 1.2 RDEPEND="virtual/glibc
21     selinux? ( sec-policy/selinux-dhcp )"
22 seemant 1.1 DEPEND="${RDEPEND}
23     sys-apps/groff"
24    
25     PROVIDE="virtual/dhcpc"
26    
27     src_unpack() {
28     unpack ${A}
29    
30     cd ${S}
31     epatch ${FILESDIR}/dhclient.c-3.0-dw-cli-fix.patch
32    
33     cd ${S}/includes
34     cat <<- END >> site.h
35     #define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
36     #define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases"
37     #define _PATH_DHCPD_DB "/var/lib/dhcp/dhcpd.leases"
38     END
39     }
40    
41     src_compile() {
42     # 01/Mar/2003: Fix for bug #11960 by Jason Wever <weeve@gentoo.org>
43     # start fix
44     if [ ${ARCH} = "sparc" ]
45     then
46     filter-flags "-O3"
47     filter-flags "-O2"
48     filter-flags "-O"
49     fi
50     # end fix
51     cat <<- END > site.conf
52     CC = gcc ${CFLAGS}
53     ETC = /etc/dhcp
54     VARDB = /var/lib/dhcp
55     ADMMANDIR = /usr/share/man/man8
56     FFMANDIR = /usr/share/man/man5
57     LIBMANDIR = /usr/share/man/man3
58     END
59     ./configure --with-nsupdate || die
60     emake || die
61     }
62    
63     src_install() {
64     dodir /var/lib/dhcp
65     touch ${D}/var/lib/dhcp/dhclient.leases
66     touch ${D}/var/lib/dhcp/dhcpd.leases
67    
68     cd ${S}/work.linux-2.2/client
69     into / ; dosbin dhclient
70     doman *.5 *.8
71    
72     cd ../dhcpctl ; dolib libdhcpctl.a ; doman *.3
73     insinto /usr/include ; doins dhcpctl.h
74    
75     cd ../omapip ; dolib libomapi.a ; doman *.3
76     cd ../relay ; dosbin dhcrelay ; doman *.8
77     cd ../common ; doman *.5
78     cd ../server ; dosbin dhcpd ; doman *.5 *.8
79    
80     cd ${S}/client
81     # admins might wanna edit dhclient-script, so /etc is proper for it.
82     dosed "s:/etc/dhclient-script:/etc/dhcp/dhclient-script:" dhclient.conf
83     insinto /etc/dhcp ; newins dhclient.conf dhclient.conf.sample
84     exeinto /etc/dhcp ; newexe scripts/linux dhclient-script.sample
85    
86     cd ${S}/server
87     insinto /etc/dhcp ; newins dhcpd.conf dhcpd.conf.sample
88    
89     cd ${S}/includes/omapip
90     insinto /usr/include/omapip ; doins alloc.h buffer.h omapip.h
91    
92     cd ${S}/includes/isc-dhcp
93     insinto /usr/include/isc-dhcp
94     doins boolean.h dst.h int.h lang.h list.h result.h types.h
95    
96     cd ${S}
97     dodoc ANONCVS CHANGES COPYRIGHT README RELNOTES
98     newdoc client/dhclient.conf dhclient.conf.sample
99     newdoc client/scripts/linux dhclient-script.sample
100     newdoc server/dhcpd.conf dhcpd.conf.sample
101     docinto doc ; dodoc doc/*
102    
103     insinto /etc/conf.d
104     newins ${FILESDIR}/conf.dhcpd dhcp
105    
106     exeinto /etc/init.d
107     newexe ${FILESDIR}/dhcp.rc7 dhcp
108     }

  ViewVC Help
Powered by ViewVC 1.1.20