X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=bird.spec;h=58eb8c370b1fcbac87334c8f9875ec6880fcb88b;hb=refs%2Ftags%2Fauto%2Fth%2Fbird-1.6.2-1;hp=55ad904607075df96b3145b8305851823e921ca1;hpb=2c57648db5dc00025c3b4fe9a7ce4e86be0e9b17;p=packages%2Fbird.git diff --git a/bird.spec b/bird.spec index 55ad904..58eb8c3 100644 --- a/bird.spec +++ b/bird.spec @@ -9,18 +9,20 @@ Summary: The BIRD Internet Routing Daemon Summary(pl.UTF-8): Demon BIRD Internetowego Routingu Dynamicznego Name: bird -Version: 1.3.6 -Release: 2 +Version: 1.6.2 +Release: 1 License: GPL v2+ Group: Networking/Daemons Source0: ftp://bird.network.cz/pub/bird/%{name}-%{version}.tar.gz -# Source0-md5: fa5621a41dcd86b6cb8cbe4fbd74af7e +# Source0-md5: 36bc84db93ae7a2fe10194075331e1b9 Source1: %{name}-ipv4.init Source2: %{name}-ipv4.sysconfig Source3: %{name}-ipv6.init Source4: %{name}-ipv6.sysconfig Source5: ftp://bird.network.cz/pub/bird/%{name}-doc-%{version}.tar.gz -# Source5-md5: 88fa1713bfb0fedc2be9e078f22bd437 +# Source5-md5: cf68d4b2b249e66ce1841fc757c8809b +Source6: %{name}-ipv4.service +Source7: %{name}-ipv6.service Patch0: %{name}-allowalien.patch URL: http://bird.network.cz/ BuildRequires: autoconf @@ -112,7 +114,7 @@ filtrów o dużych możliwościach. cp -f /usr/share/automake/config.* tools %{__autoconf} -export CFLAGS="%{rpmcflags} -I%{_includedir}/ncursesw" +export CFLAGS="%{rpmcflags} -I%{_includedir}/ncursesw -fno-strict-aliasing -fno-strict-overflow" %if %{with ipv6} %configure \ @@ -136,7 +138,8 @@ mv bird bird-6 %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_sbindir}} +install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{_sbindir}} \ + $RPM_BUILD_ROOT%{systemdunitdir} install birdc $RPM_BUILD_ROOT%{_sbindir} @@ -145,16 +148,19 @@ install bird $RPM_BUILD_ROOT%{_sbindir} install doc/bird.conf.example $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv4 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv4 +install %{SOURCE6} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-ipv4.service %endif %if %{with ipv6} install bird-6 $RPM_BUILD_ROOT%{_sbindir} cat < $RPM_BUILD_ROOT%{_sbindir}/birdc-6 #!/bin/sh -exec %{_sbindir}/birdc -s /var/run/bird-6.ctl +exec %{_sbindir}/birdc -s /var/run/bird6.ctl EOF +:> $RPM_BUILD_ROOT%{_sysconfdir}/%{name}6.conf install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ipv6 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ipv6 +install %{SOURCE7} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-ipv6.service %endif %clean @@ -173,27 +179,43 @@ fi %post ipv4 /sbin/chkconfig --add %{name}-ipv4 %service %{name}-ipv4 restart "routing daemon" +%systemd_post %{name}-ipv4.service %preun ipv4 if [ "$1" = "0" ]; then %service %{name}-ipv4 stop /sbin/chkconfig --del %{name}-ipv4 fi +%systemd_preun %{name}-ipv4.service + +%postun ipv4 +%systemd_reload %post ipv6 /sbin/chkconfig --add %{name}-ipv6 %service %{name}-ipv6 restart "routing daemon" +%systemd_post %{name}-ipv6.service %preun ipv6 if [ "$1" = "0" ]; then %service %{name}-ipv6 stop /sbin/chkconfig --del %{name}-ipv6 fi +%systemd_preun %{name}-ipv6.service + +%postun ipv6 +%systemd_reload %triggerpostun ipv4 -- %{name}-ipv4 < 1.3.4-3 chmod 0640 /etc/bird.conf chgrp bird /etc/bird.conf +%triggerpostun -- %{name}-ipv4 < 1.4.5-2 +%systemd_trigger %{name}-ipv4.service + +%triggerpostun -- %{name}-ipv6 < 1.4.5-2 +%systemd_trigger %{name}-ipv6.service + %files %defattr(644,root,root,755) %doc doc/*.html doc/reply_codes %{name}-doc-%{version}/doc/*.ps ChangeLog NEWS README TODO @@ -206,6 +228,7 @@ chgrp bird /etc/bird.conf %attr(754,root,root) /etc/rc.d/init.d/bird-ipv4 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv4 %attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird.conf +%{systemdunitdir}/%{name}-ipv4.service %endif %if %{with ipv6} @@ -215,5 +238,6 @@ chgrp bird /etc/bird.conf %attr(755,root,root) %{_sbindir}/birdc-6 %attr(754,root,root) /etc/rc.d/init.d/bird-ipv6 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bird-ipv6 -#%attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird-6.conf +%attr(640,root,bird) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bird6.conf +%{systemdunitdir}/%{name}-ipv6.service %endif