| 1 |
#!/usr/bin/make -f |
| 2 |
#DH_VERBOSE = 1 |
| 3 |
|
| 4 |
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* |
| 5 |
DPKG_EXPORT_BUILDFLAGS = 1 |
| 6 |
include /usr/share/dpkg/default.mk |
| 7 |
|
| 8 |
ifeq ($(origin CC),default) |
| 9 |
CC = $(DEB_HOST_GNU_TYPE)-gcc |
| 10 |
endif |
| 11 |
|
| 12 |
# see FEATURE AREAS in dpkg-buildflags(1) |
| 13 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 14 |
|
| 15 |
# see ENVIRONMENT in dpkg-buildflags(1) |
| 16 |
# package maintainers to append CFLAGS |
| 17 |
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic |
| 18 |
# package maintainers to append LDFLAGS |
| 19 |
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed |
| 20 |
|
| 21 |
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) |
| 22 |
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) |
| 23 |
|
| 24 |
%: |
| 25 |
dh $@ |
| 26 |
|
| 27 |
override_dh_auto_configure: |
| 28 |
./configure --prefix=/usr --includedir=/usr/include --mandir=/usr/share/man --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) --pkgconfdir=/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig --privsep-user=sndiod --with-libbsd "CFLAGS=$(CFLAGS) $(CPPFLAGS)" "LDFLAGS=$(LDFLAGS)" "CC=$(CC)" |
| 29 |
|
| 30 |
override_dh_installinit: |
| 31 |
cp contrib/init.d.sndiod debian/sndiod.init |
| 32 |
cp contrib/default.sndiod debian/sndiod.default |
| 33 |
dh_installinit |
| 34 |
|
| 35 |
override_dh_installsystemd: |
| 36 |
cp contrib/sndiod.service debian/sndiod.service |
| 37 |
dh_installsystemd |
| 38 |
|
| 39 |
override_dh_clean: |
| 40 |
rm -f debian/sndiod.init debian/sndiod.default debian/sndiod.service |
| 41 |
dh_clean |