File dhcpv6.spec of Package dhcpv6

#
# spec file for package dhcpv6 (Version 1.0.22)
#
# Copyright (c) 2008 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:        BSD 3-Clause; LGPL v2.1 or later
Group:          Productivity/Networking/System
Summary:        DHCP Client and Server for IPv6
Version:        1.0.22
Release:        3
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
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

%package -n libdhcp6client-1_0-2
License:        BSD 3-Clause; LGPL v2.1 or later
Summary:        DHCP Client library for IPv6
Group:          Productivity/Networking/System

%description -n libdhcp6client-1_0-2
A library which allows to include DHCPv6 client support into network
control applications.



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

%package -n libdhcp6client-devel
License:        BSD 3-Clause; LGPL v2.1 or later
Requires:       libdhcp6client-1_0-2 = %{version} glibc-devel
Summary:        Development files for libdhcp6client
Group:          Development/Libraries/C and C++

%description -n libdhcp6client-devel
This are the header files and the static library for libdhcp6client.
The libdhcp6client library allows to include DHCPv6 client support into
network control applications.



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

%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

%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

%preun
%{stop_on_removal dhcp6r}
%{stop_on_removal dhcp6s}

%postun
%{insserv_cleanup dhcp6r}
%{insserv_cleanup dhcp6s}

%post -n libdhcp6client-1_0-2
/sbin/ldconfig 

%postun -n libdhcp6client-1_0-2
/sbin/ldconfig

%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/*

%files -n libdhcp6client-devel
%defattr(-,root,root)
%{_libdir}/pkgconfig/libdhcp6client.pc
/usr/include/*
%{_libdir}/libdhcp6client.a
%{_libdir}/libdhcp6client.la
%{_libdir}/libdhcp6client.so

%files -n libdhcp6client-1_0-2
%defattr(-,root,root)
%{_libdir}/libdhcp6client-1.0.so.*

%changelog
* Tue Oct 28 2008 kkeil@suse.de
- Get new address when moving into a new link (bnc#439591)
* Fri Oct 24 2008 kukuk@suse.de
- Adjust dhcp6 version numbers
* Mon Oct 13 2008 kkeil@suse.de
- move client to /sbin (bnc#428291)
- removed not longer needed config hooks and scripts
* Sun Oct 12 2008 kkeil@suse.de
- update update to 1.0.22 (bnc#431017)
  * include all our fixes
  * Check DAD necessity by the interface type
  * Clear request address list when a message is sent out successfully
  * Add Windows 2008 compatibility
  * Make sure not to free a return-IA when it is not used
  * Do not ignore an IA Address option without status code
  * Do not add an invalid IA Address option to an IA
* Mon Sep 01 2008 kkeil@suse.de
- Add netconfig support
* Sat Aug 30 2008 kkeil@suse.de
- Initialize variables in dhcp6_set_ia_options()
- Do not add an invalid IA Address option to an IA  (bnc#418705)
* Sun Aug 17 2008 kkeil@suse.de
- update update to 1.0.20
  * include all our patches
  * fix parsing config file (bnc#396831)
  * delay confirm message until DAD is finished (bnc#407957)
* Fri May 23 2008 kkeil@suse.de
- update to the certified version from SLES10 SP2
  * Added fixes for multiple trivial crashes (bnc#392335)
  * Added checking for duplicate duid and iaid on different hosts
  * Added handling for multiple DNS servers
  * Added error handling during initialisation to dhcp6c for easier
  problem tracking (bnc#392335)
  * Overwrites autogenerated config file automatically (bnc#392338)
  * Do not output Interface-ID option in messages to client with
  dhcp6r (bnc#377911)
  * start dhcp6c via if-up hook (bnc#377153)
  * make start scripts working for our init using rc_status
  * Revert "Return IA option with NoAddrAvail" (bnc#367296)
  * Add domain list option check to specify dnslist (bnc#367298)
  * Verify length of buffer for RELAY_REPL correctly (bnc#367299)
  * Update now whenever checking expiration for each timer (bnc#367633)
  * fix several issues in client mode (bnc#341616 )
* Tue May 06 2008 cthiel@suse.de
- fix obsoletes / provides for package rename from dhcp6 to dhcpv6
* Wed Jan 30 2008 kkeil@suse.de
- update to 1.0.10
  * build fix for ia64
  * minor bugfixes
  * License clarification: LGPLv2
* Mon Jan 14 2008 kkeil@suse.de
- rename to dhcpv6 to follow mainline name convention
* Fri Jan 11 2008 kkeil@suse.de
- update to version 1.0.4 (Fate 303301)
* Thu Mar 29 2007 meissner@suse.de
- buildrequires flex,bison
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jan 18 2006 schwab@suse.de
- Don't strip binaries.
- Don't build as root.
* Fri Nov 18 2005 meissner@suse.de
- no strict aliasing.
* Fri Oct 14 2005 meissner@suse.de
- fixed build.
* Wed May 12 2004 okir@suse.de
- use new IANA assigned numbers for dhcp6 (#40438)
* Wed Apr 21 2004 meissner@suse.de
- missing argument to dprintf added, spotted by
  compiler warning checks.
* Tue Mar 16 2004 meissner@suse.de
- Upgraded to 0.10.
  Fixed all important warnings and bugs from upstream.
* Fri Aug 22 2003 meissner@suse.de
- Upgraded to 0.85, added unsigned int configuration parse patch.
* Wed Jun 11 2003 meissner@suse.de
- Upgraded to 0.8, dropped some of the old patches.
* Mon May 05 2003 meissner@suse.de
- Updated to 0.6, redid patches.
* Wed Apr 02 2003 kukuk@suse.de
- Remove libinet6
- Fix compiler warnings for x86-64
* Wed Mar 26 2003 okir@suse.de
- backed out the previous patch as per request from Venkata -
  it's not required
* Mon Mar 24 2003 okir@suse.de
- dhcp6 client: drop the address if server returns UNSPECFAIL (#25782)
* Thu Mar 20 2003 kukuk@suse.de
- Fix last patch
* Wed Mar 19 2003 kukuk@suse.de
- Change /var/db -> /var/lib [Bug #25612]
* Fri Mar 14 2003 meissner@suse.de
- Updated to 0.3 version, adds prefix things.
* Tue Feb 25 2003 meissner@suse.de
- DHCP for ipv6, first revision. (from sourceforge, adapted to USAGI
  headers)
openSUSE Build Service is sponsored by