- Change the way libdhcp4client is compiled (patch main source, create new
Makefile rather than copy and patch code after main patches) - Fix up problems generating compiler warnings - Use 'gcc' for making dependencies
This commit is contained in:
parent
ab966510fa
commit
3c1d581943
1045
dhcp-3.0.5-libdhcp4client.patch
Normal file
1045
dhcp-3.0.5-libdhcp4client.patch
Normal file
File diff suppressed because it is too large
Load Diff
109
dhcp.spec
109
dhcp.spec
@ -1,7 +1,14 @@
|
|||||||
|
# Use 64-bit pointers on POWER and z/Series
|
||||||
|
%ifarch ppc64 s390x
|
||||||
|
%define bigptrs -DPTRSIZE_64BIT
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%define workdir work.linux-2.2
|
||||||
|
|
||||||
Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent.
|
Summary: DHCP (Dynamic Host Configuration Protocol) server and relay agent.
|
||||||
Name: dhcp
|
Name: dhcp
|
||||||
Version: 3.0.5
|
Version: 3.0.5
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Epoch: 12
|
Epoch: 12
|
||||||
License: distributable
|
License: distributable
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -24,11 +31,10 @@ Patch6: dhcp-3.0.5-minires.patch
|
|||||||
Patch7: dhcp-3.0.5-omapip.patch
|
Patch7: dhcp-3.0.5-omapip.patch
|
||||||
Patch8: dhcp-3.0.5-relay.patch
|
Patch8: dhcp-3.0.5-relay.patch
|
||||||
Patch9: dhcp-3.0.5-server.patch
|
Patch9: dhcp-3.0.5-server.patch
|
||||||
Patch10: dhcp-3.0.4-lib-makefile.patch
|
Patch10: dhcp-3.0.5-libdhcp4client.patch
|
||||||
|
Patch11: dhcp-3.0.5-timeouts.patch
|
||||||
# patches that _must_ go after the split (in %%build)
|
Patch12: dhcp-3.0.5-mkdep.patch
|
||||||
Patch500: dhcp-3.0.4-libdhcp4client.patch
|
Patch13: dhcp-3.0.5-fix-warnings.patch
|
||||||
Patch501: dhcp-3.0.4-timeouts.patch
|
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||||
Requires(post): chkconfig, coreutils
|
Requires(post): chkconfig, coreutils
|
||||||
@ -74,7 +80,7 @@ provides the ISC DHCP client daemon.
|
|||||||
Libraries for interfacing with the ISC DHCP server.
|
Libraries for interfacing with the ISC DHCP server.
|
||||||
|
|
||||||
%package -n libdhcp4client
|
%package -n libdhcp4client
|
||||||
Summary: The ISC DHCP IPv4 client in a library for invocation from other programs
|
Summary: ISC DHCP IPv4 client in a library for invocation from other programs
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
|
|
||||||
%description -n libdhcp4client
|
%description -n libdhcp4client
|
||||||
@ -103,8 +109,12 @@ client library .
|
|||||||
%patch7 -p1 -b .omapip
|
%patch7 -p1 -b .omapip
|
||||||
%patch8 -p1 -b .relay
|
%patch8 -p1 -b .relay
|
||||||
%patch9 -p1 -b .server
|
%patch9 -p1 -b .server
|
||||||
%patch10 -p1 -b .lib-makefile
|
%patch10 -p1 -b .libdhcp4client
|
||||||
|
%patch11 -p1 -b .timeouts
|
||||||
|
%patch12 -p1 -b .mkdep
|
||||||
|
%patch13 -p1 -b .warnings
|
||||||
|
|
||||||
|
%build
|
||||||
cp %SOURCE1 .
|
cp %SOURCE1 .
|
||||||
cat <<EOF >site.conf
|
cat <<EOF >site.conf
|
||||||
VARDB=%{_localstatedir}/lib/dhcpd
|
VARDB=%{_localstatedir}/lib/dhcpd
|
||||||
@ -120,50 +130,35 @@ cat <<EOF >>includes/site.h
|
|||||||
#define _PATH_DHCLIENT_DB "%{_localstatedir}/lib/dhclient/dhclient.leases"
|
#define _PATH_DHCLIENT_DB "%{_localstatedir}/lib/dhclient/dhclient.leases"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
FLAGS="-Dlint -Werror -Wno-unused -DEXTENDED_NEW_OPTION_INFO"
|
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Werror -Dlint -DEXTENDED_NEW_OPTION_INFO"
|
||||||
|
|
||||||
%ifarch ppc64 s390x
|
# DO NOT use the %%configure macro because this configure script is not autognu
|
||||||
FLAGS="$FLAGS -DPTRSIZE_64BIT"
|
CC="%{__cc}" ./configure \
|
||||||
%endif
|
--copts "${RPM_OPT_FLAGS} %{?bigptrs}" \
|
||||||
|
--work-dir %{workdir}
|
||||||
|
|
||||||
%ifarch s390 s390x
|
sed 's/@DHCP_VERSION@/'%{version}'/' < %SOURCE5 > libdhcp4client.pc
|
||||||
FLAGS="$FLAGS -fPIE"
|
%{__make} %{?_smp_mflags} CC="%{__cc}"
|
||||||
%else
|
|
||||||
FLAGS="$FLAGS -fpie"
|
|
||||||
%endif
|
|
||||||
|
|
||||||
RPM_OPT_FLAGS="$RPM_OPT_FLAGS $FLAGS"
|
|
||||||
CC="%{__cc}" ./configure --copts "$RPM_OPT_FLAGS"
|
|
||||||
|
|
||||||
sed 's/@DHCP_VERSION@/'%{version}'/' < %SOURCE5 >libdhcp4client.pc
|
|
||||||
make -f libdhcp4client.Makefile CC="%{__cc}" libdhcp4client/.
|
|
||||||
%patch500 -p1 -b .lib
|
|
||||||
%patch501 -p1 -b .timeouts
|
|
||||||
|
|
||||||
%build
|
|
||||||
make %{?_smp_mflags} CC="%{__cc}"
|
|
||||||
sed 's/@DHCP_VERSION@/'%{version}'/' < %SOURCE5 >libdhcp4client.pc
|
|
||||||
make -f libdhcp4client.Makefile CC="%{__cc}"
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf $RPM_BUILD_ROOT
|
||||||
mkdir -p %{buildroot}/etc/sysconfig
|
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
|
||||||
|
|
||||||
make install DESTDIR=%{buildroot}
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
mkdir -p %{buildroot}/etc/rc.d/init.d
|
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
|
||||||
install -m 0755 %SOURCE2 %{buildroot}/etc/rc.d/init.d/dhcpd
|
install -m 0755 %SOURCE2 %{buildroot}/etc/rc.d/init.d/dhcpd
|
||||||
|
|
||||||
touch %{buildroot}%{_localstatedir}/lib/dhcpd/dhcpd.leases
|
touch $RPM_BUILD_ROOT%{_localstatedir}/lib/dhcpd/dhcpd.leases
|
||||||
mkdir -p %{buildroot}%{_localstatedir}/lib/dhclient/
|
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dhclient/
|
||||||
cat <<EOF > %{buildroot}/etc/sysconfig/dhcpd
|
cat <<EOF > $RPM_BUILD_ROOT/etc/sysconfig/dhcpd
|
||||||
# Command line options here
|
# Command line options here
|
||||||
DHCPDARGS=
|
DHCPDARGS=
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
install -m0755 %SOURCE3 %{buildroot}/etc/rc.d/init.d/dhcrelay
|
install -m0755 %SOURCE3 $RPM_BUILD_ROOT/etc/rc.d/init.d/dhcrelay
|
||||||
|
|
||||||
cat <<EOF > %{buildroot}/etc/sysconfig/dhcrelay
|
cat <<EOF > $RPM_BUILD_ROOT/etc/sysconfig/dhcrelay
|
||||||
# Command line options here
|
# Command line options here
|
||||||
INTERFACES=""
|
INTERFACES=""
|
||||||
DHCPSERVERS=""
|
DHCPSERVERS=""
|
||||||
@ -171,15 +166,15 @@ EOF
|
|||||||
|
|
||||||
# Copy sample dhclient.conf file into position
|
# Copy sample dhclient.conf file into position
|
||||||
cp client/dhclient.conf dhclient.conf.sample
|
cp client/dhclient.conf dhclient.conf.sample
|
||||||
chmod 755 %{buildroot}/sbin/dhclient-script
|
chmod 755 $RPM_BUILD_ROOT/sbin/dhclient-script
|
||||||
|
|
||||||
# Create per-package copies of dhcp-options and dhcp-eval common man-pages:
|
# Create per-package copies of dhcp-options and dhcp-eval common man-pages:
|
||||||
cp -fp ${RPM_BUILD_ROOT}%{_mandir}/man5/dhcp-options.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/dhcpd-options.5
|
cp -fp $RPM_BUILD_ROOT%{_mandir}/man5/dhcp-options.5 $RPM_BUILD_ROOT%{_mandir}/man5/dhcpd-options.5
|
||||||
cp -fp ${RPM_BUILD_ROOT}%{_mandir}/man5/dhcp-options.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/dhclient-options.5
|
cp -fp $RPM_BUILD_ROOT%{_mandir}/man5/dhcp-options.5 $RPM_BUILD_ROOT%{_mandir}/man5/dhclient-options.5
|
||||||
cp -fp ${RPM_BUILD_ROOT}%{_mandir}/man5/dhcp-eval.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/dhcpd-eval.5
|
cp -fp $RPM_BUILD_ROOT%{_mandir}/man5/dhcp-eval.5 $RPM_BUILD_ROOT%{_mandir}/man5/dhcpd-eval.5
|
||||||
cp -fp ${RPM_BUILD_ROOT}%{_mandir}/man5/dhcp-eval.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/dhclient-eval.5
|
cp -fp $RPM_BUILD_ROOT%{_mandir}/man5/dhcp-eval.5 $RPM_BUILD_ROOT%{_mandir}/man5/dhclient-eval.5
|
||||||
|
|
||||||
# Why not ship the doc/ documentation ? Some of it is quite useful.
|
# Why not ship the doc/ documentation? Some of it is quite useful.
|
||||||
# Also generate DHCP options tables for C, perl, python:
|
# Also generate DHCP options tables for C, perl, python:
|
||||||
/usr/bin/perl %SOURCE6 > doc/dhcp_options.h
|
/usr/bin/perl %SOURCE6 > doc/dhcp_options.h
|
||||||
/usr/bin/perl %SOURCE6 -pe > doc/dhcp_options.pl
|
/usr/bin/perl %SOURCE6 -pe > doc/dhcp_options.pl
|
||||||
@ -187,20 +182,18 @@ cp -fp ${RPM_BUILD_ROOT}%{_mandir}/man5/dhcp-eval.5 ${RPM_BUILD_ROOT}%{_mandir}/
|
|||||||
/usr/bin/perl %SOURCE6 -d > doc/dhcp_options.txt
|
/usr/bin/perl %SOURCE6 -d > doc/dhcp_options.txt
|
||||||
|
|
||||||
# Install default (empty) dhcpd.conf:
|
# Install default (empty) dhcpd.conf:
|
||||||
cp -fp %SOURCE4 %{buildroot}/etc
|
cp -fp %SOURCE4 $RPM_BUILD_ROOT/etc
|
||||||
|
|
||||||
# libdhcp4client install
|
install -p -m 0644 -D libdhcp4client.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libdhcp4client.pc
|
||||||
sed 's/@DHCP_VERSION@/'%{version}'/' < %SOURCE5 >libdhcp4client.pc
|
|
||||||
make -f libdhcp4client.Makefile install DESTDIR=$RPM_BUILD_ROOT LIBDIR=%{_libdir}
|
|
||||||
|
|
||||||
# Fix debuginfo files list - don't ship links to .c files in the buildroot :-)
|
# Sources files can't be symlinks for debuginfo package generation
|
||||||
work=work.`./configure --print-sysname`;
|
find %{workdir} -type l |
|
||||||
find $work -type l -a -name '*.c' |
|
|
||||||
while read f; do
|
while read f; do
|
||||||
rm -f $f;
|
rm -f linkderef
|
||||||
cp -fp ${f#$work/} $f;
|
cp $f linkderef
|
||||||
|
rm -f $f
|
||||||
|
mv linkderef $f
|
||||||
done
|
done
|
||||||
:;
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
@ -325,6 +318,12 @@ exit 0
|
|||||||
%{_libdir}/libdhcp4client.so
|
%{_libdir}/libdhcp4client.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 09 2006 David Cantrell <dcantrell@redhat.com> - 12:3.0.5-2
|
||||||
|
- Change the way libdhcp4client is compiled (patch main source, create new
|
||||||
|
Makefile rather than copy and patch code after main patches)
|
||||||
|
- Fix up problems generating compiler warnings
|
||||||
|
- Use 'gcc' for making dependencies
|
||||||
|
|
||||||
* Tue Nov 07 2006 David Cantrell <dcantrell@redhat.com> - 12:3.0.5-1
|
* Tue Nov 07 2006 David Cantrell <dcantrell@redhat.com> - 12:3.0.5-1
|
||||||
- Upgrade to ISC dhcp-3.0.5
|
- Upgrade to ISC dhcp-3.0.5
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
Name: libdhcp4client
|
ISC.Cflags=-I/usr/include/dhcp4client/isc_dhcp
|
||||||
Description: ISC DHCP IPv4 client library
|
|
||||||
Version: @DHCP_VERSION@
|
Name: libdhcp4client
|
||||||
Libs: -ldhcp4client
|
Description: ISC DHCP IPv4 client library
|
||||||
Cflags: -I/usr/include/dhcp4client
|
Version: @DHCP_VERSION@
|
||||||
ISC.Cflags= -I/usr/include/dhcp4client/isc_dhcp
|
Libs: -ldhcp4client
|
||||||
|
Cflags: -I/usr/include/dhcp4client
|
||||||
|
Loading…
Reference in New Issue
Block a user