File radvd.spec of Package radvd
#
# spec file for package radvd
#
# Copyright (c) 2011 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: radvd
BuildRequires: bison flex
License: BSD 3-clause (or similar)
Group: Productivity/Networking/Routing
PreReq: %insserv_prereq %fillup_prereq
AutoReqProv: on
Summary: Router ADVertisement Daemon for IPv6
Version: 1.3
Release: 6.<RELEASE2>
Source0: %{name}-%{version}.tar.bz2
Source1: radvd.init
Source2: sysconfig.radvd
Patch0: bnc721968_2.patch
Patch1: bnc721968_3.patch
Patch2: bnc721968_4.patch
Patch3: bnc721968_5.patch
Patch4: bnc721968_6.patch
Patch5: bnc721968_7.patch
Patch6: bnc721968_8.patch
Patch7: bnc721968_9.patch
Url: http://v6web.litech.org/radvd
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
RADVD is the Router ADVertisement Daemon. It is used for automated
configuration of IPv6 networks. Most people will not need this.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%build
autoreconf -fi
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} --mandir=%{_mandir} --sysconfdir=%{_sysconfdir} --with-configfile=%{_sysconfdir}/radvd.conf --with-pidfile=/var/run/radvd/radvd.pid
make
%install
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m 0755 $RPM_SOURCE_DIR/radvd.init $RPM_BUILD_ROOT/etc/init.d/radvd
ln -sf /etc/init.d/radvd $RPM_BUILD_ROOT/usr/sbin/rcradvd
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 644 $RPM_SOURCE_DIR/sysconfig.radvd $RPM_BUILD_ROOT/var/adm/fillup-templates/
install -m 644 $RPM_BUILD_DIR/radvd-%{version}/radvd.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/radvd.conf
mkdir -p $RPM_BUILD_ROOT/var/run/radvd
%post
%{fillup_and_insserv radvd}
%postun
%{insserv_cleanup}
%preun
%stop_on_removal radvd
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%dir %attr(-,daemon,daemon) /var/run/radvd/
%config(noreplace) %{_sysconfdir}/radvd.conf
/var/adm/fillup-templates/sysconfig.radvd
/usr/sbin/radvd
/usr/sbin/radvdump
%doc %{_mandir}/man8/radvd.8.gz
%doc %{_mandir}/man8/radvdump.8.gz
%doc %{_mandir}/man5/radvd.conf.5.gz
%doc CHANGES COPYRIGHT TODO INTRO.html
%config /etc/init.d/radvd
/usr/sbin/rcradvd
%changelog