summaryrefslogtreecommitdiff
path: root/distro/pkg/deb/rules
diff options
context:
space:
mode:
authorJakub Ružička <jakub.ruzicka@nic.cz>2021-04-06 18:13:16 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2021-05-19 17:22:11 +0200
commit329d6e3fbc5a09a9bc8800bd8a5d239dec1a3d24 (patch)
tree29bf25fc20a609c0d81469fc2e4e528b99d4f5bb /distro/pkg/deb/rules
parentc3c691e95cd40d8654b720be8d9a8ae9fb050951 (diff)
add apkg-powered upstream packaging for deb, rpm
Files in a single new distro/ dir allow apkg to build BIRD packages for various distros directly from upstream sources as well as from upstream archives. Please see distro/README.md for more detail as well as apkg docs: https://apkg.rtfd.io I've used these files to build bird-2.0.8 on all currently supported releases of following distros: * Debian * Ubuntu * Fedora * CentOS * openSUSE Please note that latest apkg with accumulated fixes for bird is needed: https://gitlab.nic.cz/packaging/apkg/-/merge_requests/35
Diffstat (limited to 'distro/pkg/deb/rules')
-rwxr-xr-xdistro/pkg/deb/rules56
1 files changed, 56 insertions, 0 deletions
diff --git a/distro/pkg/deb/rules b/distro/pkg/deb/rules
new file mode 100755
index 00000000..5630ed1c
--- /dev/null
+++ b/distro/pkg/deb/rules
@@ -0,0 +1,56 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
+
+COMMON_FLAGS= --prefix=/usr --sysconfdir=/etc/bird --mandir=\$${prefix}/share/man \
+ --infodir=\$${prefix}/share/info --localstatedir=/var --runstatedir=/run/bird \
+ --docdir=\$${prefix}/share/bird2 \
+ --enable-client
+
+CFLAGS += -g -O2 -fno-strict-aliasing -fno-strict-overflow -fPIC
+LDFLAGS += -g -O2 -fno-strict-aliasing -fno-strict-overflow -fPIC -Wl,-z,defs -Wl,--as-needed
+
+%:
+ dh $@
+
+override_dh_auto_configure:
+ CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" dh_auto_configure -- $(COMMON_FLAGS) --with-protocols=all
+
+override_dh_auto_build:
+ dh_auto_build
+ dh_auto_build -- docs
+
+override_dh_auto_install:
+ dh_auto_install --destdir=debian/tmp
+
+override_dh_installinit:
+ dh_installinit --name=bird --restart-after-upgrade
+
+override_dh_installsystemd:
+ dh_installsystemd --name=bird --restart-after-upgrade
+
+DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
+XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0"
+
+bird.8: debian/bird.xml
+ $(XP) $(DB2MAN) $<
+
+override_dh_installman: bird.8
+ dh_installman
+
+override_dh_clean:
+ dh_clean
+ -rm -f bird.8 birdc.8
+
+override_dh_missing:
+ dh_missing --fail-missing
+
+override_dh_compress:
+ dh_compress -X.conf