1.1 --- a/dhcpd/dhcpd.spec Thu Sep 15 11:03:52 2011 +0200 1.2 +++ b/dhcpd/dhcpd.spec Thu Sep 15 11:49:33 2011 +0200 1.3 @@ -1,6 +1,6 @@ 1.4 ## 1.5 ## dhcpd.spec -- OpenPKG RPM Package Specification 1.6 -## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> 1.7 +## Copyright (c) 2000-2011 OpenPKG Foundation e.V. <http://openpkg.net/> 1.8 ## 1.9 ## Permission to use, copy, modify, and distribute this software for 1.10 ## any purpose with or without fee is hereby granted, provided that 1.11 @@ -21,6 +21,10 @@ 1.12 ## SUCH DAMAGE. 1.13 ## 1.14 1.15 +# package version 1.16 +%define V_opkg 4.2.1 1.17 +%define V_dist 4.2.1 1.18 + 1.19 # package information 1.20 Name: dhcpd 1.21 Summary: DHCP Daemon 1.22 @@ -31,23 +35,26 @@ 1.23 Class: BASE 1.24 Group: DHCP 1.25 License: ISC/BSD 1.26 -Version: 4.1.0 1.27 -Release: 20090105 1.28 +Version: %{V_opkg} 1.29 +Release: 20110424 1.30 1.31 # package options 1.32 %option with_fsl yes 1.33 1.34 # list of sources 1.35 -Source0: ftp://ftp.isc.org/isc/dhcp/dhcp-%{version}.tar.gz 1.36 +Source0: ftp://ftp.isc.org/isc/dhcp/dhcp-%{V_dist}.tar.gz 1.37 Source1: dhcpd.conf 1.38 Source2: rc.dhcpd 1.39 Source3: fsl.dhcpd 1.40 +Patch0: dhcpd.patch 1.41 1.42 # build information 1.43 Prefix: %{l_prefix} 1.44 BuildRoot: %{l_buildroot} 1.45 BuildPreReq: OpenPKG, openpkg >= 20060823 1.46 PreReq: OpenPKG, openpkg >= 20060823 1.47 +BuildPreReq: openssl 1.48 +PreReq: openssl 1.49 %if "%{with_fsl}" == "yes" 1.50 BuildPreReq: fsl 1.51 PreReq: fsl 1.52 @@ -60,13 +67,14 @@ 1.53 1.54 %track 1.55 prog dhcpd = { 1.56 - version = %{version} 1.57 + version = %{V_dist} 1.58 url = ftp://ftp.isc.org/isc/dhcp/ 1.59 regex = dhcp-(\d+\.\d+\.\d+)\.tar\.gz 1.60 } 1.61 1.62 %prep 1.63 - %setup -q -n dhcp-%{version} 1.64 + %setup -q -n dhcp-%{V_dist} 1.65 + %patch -p0 1.66 1.67 %build 1.68 # configure program 1.69 @@ -75,12 +83,6 @@ 1.70 -e 's;^[^#]*\(#define[^_]*_PATH_DHCPD_DB[^"]*\).*;\1 "%{l_prefix}/var/dhcpd/db/dhcpd.leases";' \ 1.71 -e 's;^[^#]*\(#define[^_]*_PATH_DHCPD_CONF[^"]*\).*;\1 "%{l_prefix}/etc/dhcpd/dhcpd.conf";' \ 1.72 includes/site.h 1.73 - %{l_shtool} subst \ 1.74 - -e 's;struct option\([, )]\);struct option_dhcpd\1;g' \ 1.75 - includes/*.h \ 1.76 - client/*.c \ 1.77 - common/*.c \ 1.78 - server/*.c 1.79 CC="%{l_cc}" \ 1.80 CFLAGS="%{l_cflags -O}" \ 1.81 CPPFLAGS="%{l_cppflags} -DNOMINUM" \ 1.82 @@ -91,19 +93,21 @@ 1.83 --mandir=%{l_prefix}/man \ 1.84 --sysconfdir=%{l_prefix}/etc/dhcpd \ 1.85 --localstatedir=%{l_prefix}/var/dhcpd \ 1.86 - --disable-dhcpv6 \ 1.87 --with-srv-lease-file=%{l_prefix}/var/dhcpd/db/dhcpd.leases \ 1.88 --with-cli-lease-file=%{l_prefix}/var/dhcpd/db/dhclient.leases \ 1.89 --with-srv-pid-file=%{l_prefix}/var/dhcpd/run/dhcpd.pid \ 1.90 --with-cli-pid-file=%{l_prefix}/var/dhcpd/run/dhclient.pid \ 1.91 - --with-relay-pid-file=%{l_prefix}/var/dhcpd/run/dhrelay.pid 1.92 + --with-relay-pid-file=%{l_prefix}/var/dhcpd/run/dhrelay.pid \ 1.93 + --disable-dhcpv6 1.94 1.95 # build program 1.96 %{l_make} %{l_mflags} 1.97 1.98 %install 1.99 + # clean up build cruft 1.100 + rm -rf $RPM_BUILD_ROOT 1.101 + 1.102 # install program 1.103 - rm -rf $RPM_BUILD_ROOT 1.104 %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 1.105 1.106 # install default configuration