]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Revert "bird: Drop package"
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 Dec 2018 13:30:46 +0000 (13:30 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 Dec 2018 13:30:46 +0000 (13:30 +0000)
This reverts commit 09c3106fb13fde1c815c9513fd89b402e344c05b.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
bird/bird.nm [new file with mode: 0644]
bird/systemd/bird.service [new file with mode: 0644]
bird/systemd/bird6.service [new file with mode: 0644]

diff --git a/bird/bird.nm b/bird/bird.nm
new file mode 100644 (file)
index 0000000..45b405a
--- /dev/null
@@ -0,0 +1,84 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+name       = bird
+version    = 1.6.0
+release    = 1
+
+groups     = Networking/Routing
+url        = http://bird.network.cz/
+license    = GPLv2+
+summary    = BIRD Internet Routing Daemon.
+
+description
+       BIRD is dynamic routing daemon supporting IPv4 and IPv6 versions of routing
+       protocols BGP, RIP and OSPF.
+end
+
+source_dl  = ftp://bird.network.cz/pub/bird/
+
+build
+       requires
+               bison
+               flex
+               ncurses-devel
+               readline-devel
+       end
+
+       prepare_cmds
+               mkdir -pv %{DIR_APP}/ipv6
+               tar c --exclude ipv6 . | tar x -C ipv6
+       end
+
+       build
+               ./configure %{configure_options}
+               make %{PARALLELISMFLAGS}
+
+               cd ipv6
+               ./configure %{configure_options} --enable-ipv6
+               make %{PARALLELISMFLAGS}
+       end
+
+       install
+               make install DESTDIR=%{BUILDROOT}
+
+               cd ipv6
+               make install DESTDIR=%{BUILDROOT}
+
+               rm -rfv %{BUILDROOT}/var
+       end
+end
+
+packages
+       package %{name}
+               prerequires = systemd-units
+
+               script postin
+                       /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script preun
+                       /bin/systemctl --no-reload disable bird.service > /dev/null 2>&1 || :
+                       /bin/systemctl stop bird.service > /dev/null 2>&1 || :
+
+                       /bin/systemctl --no-reload disable bird6.service > /dev/null 2>&1 || :
+                       /bin/systemctl stop bird6.service > /dev/null 2>&1 || :
+               end
+
+               script postun
+                       /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script postup
+                       /bin/systemctl daemon-reload 2>&1 || :
+                       /bin/systemctl reload-or-try-restart bird.service >/dev/null 2>&1 || :
+                       /bin/systemctl reload-or-try-restart bird6.service >/dev/null 2>&1 || :
+               end
+       end
+
+       package %{name}-debuginfo
+               template DEBUGINFO
+       end
+end
diff --git a/bird/systemd/bird.service b/bird/systemd/bird.service
new file mode 100644 (file)
index 0000000..438d6af
--- /dev/null
@@ -0,0 +1,13 @@
+[Unit]
+Description=BIRD Internet Routing Daemon
+Requires=network.target
+After=network.target
+After=syslog.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/bird
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/bird/systemd/bird6.service b/bird/systemd/bird6.service
new file mode 100644 (file)
index 0000000..0d8e9b5
--- /dev/null
@@ -0,0 +1,13 @@
+[Unit]
+Description=BIRD Internet Routing Daemon
+Requires=network.target
+After=network.target
+After=syslog.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/bird6
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target