File dhcpv6.spec of Package dhcpv6
#
# spec file for package dhcpv6 (Version 1.0.22)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: dhcpv6
BuildRequires: bison flex libnl-devel linux-kernel-headers openssl-devel pkg-config
Url: http://dcantrel.fedorapeople.org/dhcpv6/
%define prefix /usr
License: BSD3c ; LGPLv2.1+
Group: Productivity/Networking/System
Summary: DHCP Client and Server for IPv6
Version: 1.0.22
Release: 6
Source0: %{name}-%{version}.tar.bz2
Patch1: %{name}-%{version}-destdir.patch
Patch2: %{name}-%{version}-cmd.patch
Patch3: %{name}-%{version}-netconfig.dif
Patch4: dhcp6c-move_new_link-sles11beta3.patch
Patch5: %{name}-%{version}-memleak-fix
Patch6: dhcpv6-1.0.22-correct-DUID-time-generation-and-save-server-DUID.patch
Patch7: dhcpv6-1.0.22-correct-mac-address-in-DUID-type1-generation.patch
Patch8: dhcpv6-1.0.22-invalid-request-address-message.diff
Patch9: dhcpv6-1.0.22-remove-released-leases.bnc524687.diff
Patch10: dhcpv6-1.0.22-dhcp5r-pid-directory.diff
Provides: dhcp6 = 1.0.11
Obsoletes: dhcp6 < 1.0.11
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A stateful address autoconfiguration protocol for IPv6, labelled
DHCPv6. This package contains the server and the client.
Authors:
--------
Shirley Ma, xma@us.ibm.com
Elizabeth Kon, beth@us.ibm.com
David Cantrell <dcantrell@redhat.com>
Kazuo Hiekata <hiekata@yamato.ibm.com>
Mitsuru Chinen <mitch@linux.vnet.ibm.com>
Cristian Cadar <cadar@ccrle.nec.de>
and more
%prep
%setup -q -n %{name}-%{version}
%patch1 -p1
%patch2 -p1
%patch3
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p0
%patch8 -p0
%patch9 -p0
%patch10 -p0
%build
touch NEWS
rm -f missing
aclocal -I m4
libtoolize --copy --force
autoconf
autoheader
automake --foreign --add-missing --copy
autoconf
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -DWITH_NETCONFIG" \
./configure --prefix=/usr \
--libdir=%{_libdir} \
--mandir=%{_mandir} \
--sysconfdir=/etc \
--enable-libdhcp=no
make clean
make %{?_smp_mflags}
%install
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man{8,5}
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/var/lib/dhcpv6/
# client should be available even if /usr is on remote FS and not mounted yet
# libnl is not ready for this
mkdir -p $RPM_BUILD_ROOT/sbin
mv $RPM_BUILD_ROOT/usr/sbin/dhcp6c $RPM_BUILD_ROOT/sbin/dhcp6c
ln -s /etc/init.d/dhcp6s $RPM_BUILD_ROOT/usr/sbin/rcdhcp6s
ln -s /etc/init.d/dhcp6r $RPM_BUILD_ROOT/usr/sbin/rcdhcp6r
###
rm -rf $RPM_BUILD_ROOT%{_includedir}/dhcp6client \
$RPM_BUILD_ROOT%{_libdir}/libdhcp6client* \
$RPM_BUILD_ROOT%{_libdir}/pkgconfig
%post
mkdir -p var/run/dhcpv6
%preun
%{stop_on_removal dhcp6r}
%{stop_on_removal dhcp6s}
%postun
%{insserv_cleanup dhcp6r}
%{insserv_cleanup dhcp6s}
%files
%defattr(-,root,root)
%doc README ChangeLog AUTHORS LICENSE
/sbin/*
/usr/sbin/*
%{_mandir}/man?/*
%dir /var/lib/dhcpv6
%config /etc/sysconfig/network/dhcp*
%config /etc/dhcp6c.conf
%config /etc/dhcp6s.conf
/etc/init.d/*
%changelog