Add pkg.unbound.libonly build profile. (Closes: #847130)
Helmut Grohne authored 7 years ago
Robert Edmonds committed 7 years ago
8 | 8 | autotools-dev, |
9 | 9 | bison, |
10 | 10 | debhelper (>= 9~), |
11 | dh-apparmor, | |
11 | dh-apparmor <!pkg.unbound.libonly>, | |
12 | 12 | dh-autoreconf, |
13 | dh-python, | |
14 | dh-systemd, | |
13 | dh-python <!pkg.unbound.libonly>, | |
14 | dh-systemd <!pkg.unbound.libonly>, | |
15 | 15 | dpkg-dev (>= 1.16.1~), |
16 | 16 | flex, |
17 | 17 | libevent-dev, |
18 | 18 | libexpat1-dev, |
19 | libfstrm-dev, | |
20 | libprotobuf-c-dev, | |
21 | libssl-dev, | |
19 | libfstrm-dev <!pkg.unbound.libonly>, | |
20 | libprotobuf-c-dev <!pkg.unbound.libonly>, | |
21 | libssl-dev <!pkg.unbound.libonly>, | |
22 | 22 | libtool, |
23 | 23 | nettle-dev, |
24 | 24 | pkg-config, |
25 | protobuf-c-compiler, | |
26 | python-all-dev:any (>= 2.6.6-3~), | |
27 | libpython-all-dev (>= 2.6.6-3~), | |
28 | python3-all-dev:any, | |
29 | libpython3-all-dev, | |
30 | swig, | |
25 | protobuf-c-compiler <!pkg.unbound.libonly>, | |
26 | python-all-dev:any (>= 2.6.6-3~) <!pkg.unbound.libonly>, | |
27 | libpython-all-dev (>= 2.6.6-3~) <!pkg.unbound.libonly>, | |
28 | python3-all-dev:any <!pkg.unbound.libonly>, | |
29 | libpython3-all-dev <!pkg.unbound.libonly>, | |
30 | swig <!pkg.unbound.libonly>, | |
31 | 31 | Standards-Version: 3.9.8 |
32 | 32 | Homepage: https://www.unbound.net/ |
33 | 33 | Vcs-Browser: https://anonscm.debian.org/cgit/pkg-dns/unbound.git |
68 | 68 | ${misc:Depends}, |
69 | 69 | ${python:Depends}, |
70 | 70 | ${shlibs:Depends}, |
71 | Build-Profiles: <!pkg.unbound.libonly> | |
71 | 72 | Description: library implementing DNS resolution and validation (Python bindings) |
72 | 73 | Python extension module for libunbound. |
73 | 74 | . |
82 | 83 | ${misc:Depends}, |
83 | 84 | ${python3:Depends}, |
84 | 85 | ${shlibs:Depends}, |
86 | Build-Profiles: <!pkg.unbound.libonly> | |
85 | 87 | Description: library implementing DNS resolution and validation (Python3 bindings) |
86 | 88 | Python3 extension module for libunbound. |
87 | 89 | . |
101 | 103 | Enhances: |
102 | 104 | munin-node, |
103 | 105 | Suggests: apparmor |
106 | Build-Profiles: <!pkg.unbound.libonly> | |
104 | 107 | Description: validating, recursive, caching DNS resolver |
105 | 108 | Unbound is a recursive-only caching DNS server which can perform DNSSEC |
106 | 109 | validation of results. It implements only a minimal amount of authoritative |
119 | 122 | unbound (<< 1.4.13-1), |
120 | 123 | Breaks: |
121 | 124 | unbound (<< 1.4.13-1), |
125 | Build-Profiles: <!pkg.unbound.libonly> | |
122 | 126 | Description: utility to securely fetch the root DNS trust anchor |
123 | 127 | unbound-anchor is a utility which securely fetches or updates the root DNS |
124 | 128 | zone trust anchor. A copy of the current root anchor and root update |
130 | 134 | Depends: |
131 | 135 | ${misc:Depends}, |
132 | 136 | ${shlibs:Depends}, |
137 | Build-Profiles: <!pkg.unbound.libonly> | |
133 | 138 | Description: reimplementation of the 'host' command |
134 | 139 | This package provides the 'unbound-host' program that is bundled with the |
135 | 140 | Unbound domain name server. This version differs from the one provided in the |
0 | usr/include/unbound.h usr/include | |
1 | usr/share/man/man3/libunbound.3 usr/share/man/man3 | |
0 | debian/tmp-lib/usr/include/unbound.h usr/include | |
1 | debian/tmp-lib/usr/share/man/man3/libunbound.3 usr/share/man/man3 |
7 | 7 | endif |
8 | 8 | |
9 | 9 | LIBRARY = libunbound2 |
10 | DOPACKAGES = $(shell dh_listpackages) | |
10 | 11 | |
11 | 12 | export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
12 | 13 | DPKG_EXPORT_BUILDFLAGS = 1 |
26 | 27 | dh_autoreconf |
27 | 28 | dh_autotools-dev_updateconfig |
28 | 29 | |
30 | ifneq (,$(filter unbound unbound-anchor unbound-host,$(DOPACKAGES))) | |
29 | 31 | # first build -- build unbound daemon |
30 | 32 | PYTHON_VERSION="$(shell py3versions -vd)" \ |
31 | 33 | CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="-Wl,--as-needed $(LDFLAGS)" \ |
42 | 44 | $(MAKE) |
43 | 45 | $(MAKE) install DESTDIR="$(CURDIR)/debian/tmp" |
44 | 46 | $(MAKE) clean |
47 | endif | |
45 | 48 | |
46 | 49 | # second build -- build libunbound only, against nettle |
47 | 50 | CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="-Wl,--as-needed $(LDFLAGS)" \ |
60 | 63 | $(CURDIR)/debian/libunbound-dev/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/libunbound.pc |
61 | 64 | $(MAKE) clean |
62 | 65 | |
66 | ifneq (,$(filter python-unbound,$(DOPACKAGES))) | |
63 | 67 | # third build - pyunbound for Python 2 |
64 | 68 | PYTHON_VERSION="$(shell pyversions -vd)" \ |
65 | 69 | CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="-Wl,--as-needed $(LDFLAGS)" \ |
76 | 80 | libunbound/python/unbound.py \ |
77 | 81 | debian/python-unbound/usr/lib/$(shell pyversions -d)/dist-packages |
78 | 82 | $(MAKE) clean |
83 | endif | |
79 | 84 | |
85 | ifneq (,$(filter python3-unbound,$(DOPACKAGES))) | |
80 | 86 | # fourth build - pyunbound for Python 3 |
81 | 87 | PYTHON_VERSION="$(shell py3versions -vd)" \ |
82 | 88 | CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="-Wl,--as-needed $(LDFLAGS)" \ |
93 | 99 | libunbound/python/unbound.py \ |
94 | 100 | debian/python3-unbound/usr/lib/$(shell py3versions -d)/dist-packages |
95 | 101 | $(MAKE) clean |
102 | endif | |
96 | 103 | |
97 | 104 | dh_installdirs |
98 | 105 | |
106 | ifneq (,$(filter unbound unbound-anchor unbound-host,$(DOPACKAGES))) | |
99 | 107 | dh_systemd_enable -p unbound |
100 | 108 | dh_systemd_enable -p unbound --name=unbound-resolvconf |
101 | 109 | dh_systemd_start -p unbound unbound.service |
108 | 116 | install -m 0644 doc/example.conf debian/unbound/usr/share/doc/unbound/examples/unbound.conf |
109 | 117 | install -m 0644 contrib/update-anchor.sh debian/unbound/usr/share/doc/unbound/contrib |
110 | 118 | install -D -m 0755 contrib/unbound_munin_ debian/unbound/usr/share/munin/plugins/unbound_munin_ |
119 | endif | |
111 | 120 | |
112 | 121 | mkdir -p debian/libunbound-dev/usr/lib/$(DEB_HOST_MULTIARCH) |
113 | 122 | mv \ |
125 | 134 | dh_installchangelogs |
126 | 135 | dh_installdocs |
127 | 136 | dh_installman |
137 | ifneq (,$(filter python-unbound,$(DOPACKAGES))) | |
128 | 138 | dh_python2 --no-guessing-versions |
139 | endif | |
140 | ifneq (,$(filter python3-unbound,$(DOPACKAGES))) | |
129 | 141 | dh_python3 |
142 | endif | |
130 | 143 | dh_strip |
131 | 144 | dh_compress -Xusr/share/doc/unbound/examples/unbound.conf |
132 | 145 | |
146 | ifneq (,$(filter unbound unbound-anchor unbound-host,$(DOPACKAGES))) | |
133 | 147 | mkdir -p debian/unbound/etc/apparmor.d |
134 | 148 | cp debian/apparmor-profile debian/unbound/etc/apparmor.d/usr.sbin.unbound |
135 | 149 | dh_apparmor --profile-name=usr.sbin.unbound -punbound |
150 | endif | |
136 | 151 | |
137 | 152 | dh_fixperms |
138 | 153 | dh_makeshlibs |