| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export DH_VERBOSE = 1 |
| 4 |
|
| 5 |
DEB_BUILD_MAINT_OPTIONS += hardening=+all |
| 6 |
DPKG_EXPORT_BUILDFLAGS = 1 |
| 7 |
include /usr/share/dpkg/buildflags.mk |
| 8 |
|
| 9 |
%: |
| 10 |
dh $@ --buildsystem=cmake |
| 11 |
|
| 12 |
override_dh_installchangelogs: |
| 13 |
dh_installchangelogs ChangeLog.txt |
| 14 |
|
| 15 |
ifeq ($(DEB_BUILD_ARCH_OS), linux) |
| 16 |
SYSTEMD=ON |
| 17 |
else |
| 18 |
SYSTEMD=OFF |
| 19 |
endif |
| 20 |
|
| 21 |
override_dh_auto_configure: |
| 22 |
dh_auto_configure -- -DWITH_BUNDLED_DEPS=OFF -DWITH_ADNS=ON \ |
| 23 |
-DWITH_WEBSOCKETS=ON -DWITH_DLT=ON \ |
| 24 |
-DWITH_HTTP_API=ON -DUSE_LIBWRAP=ON \ |
| 25 |
-DWITH_SYSTEMD=${SYSTEMD} -DCMAKE_SKIP_BUILD_RPATH=ON |
| 26 |
|
| 27 |
# The patched tests run against the locally installed mosquitto package. |
| 28 |
ifeq (,$(filter check,$(DEB_BUILD_OPTIONS))) |
| 29 |
override_dh_auto_test: ; |
| 30 |
else |
| 31 |
# tests are not meant to be run in parallel |
| 32 |
override_dh_auto_test: |
| 33 |
-dh_auto_test --no-parallel |
| 34 |
endif |
| 35 |
|
| 36 |
override_dh_strip: |
| 37 |
dh_strip -p mosquitto -Xlibmosquitto |
| 38 |
dh_strip -p libmosquitto1 -Xlibmosquittopp -Xsbin/mosquitto |
| 39 |
dh_strip -p libmosquittopp1 -Xlibmosquitto.so -Xsbin/mosquitto |
| 40 |
dh_strip --remaining-packages |
| 41 |
|
| 42 |
override_dh_auto_install: |
| 43 |
dh_auto_install |
| 44 |
install -d debian/tmp/etc/mosquitto/conf.d/ |
| 45 |
install -m 644 debian/README-conf-d debian/tmp/etc/mosquitto/conf.d/README |
| 46 |
install -d debian/tmp/etc/mosquitto/ca_certificates/ |
| 47 |
install -m 644 debian/README-ca_certificates debian/tmp/etc/mosquitto/ca_certificates/README |
| 48 |
install -d debian/tmp/etc/mosquitto/certs/ |
| 49 |
install -m 644 debian/README-certs debian/tmp/etc/mosquitto/certs/README |
| 50 |
install -m 644 debian/mosquitto.conf debian/tmp/etc/mosquitto/mosquitto.conf |
| 51 |
install -d debian/tmp/usr/lib/systemd/system/ |
| 52 |
install -m 644 ./service/systemd/mosquitto.service.notify debian/tmp/usr/lib/systemd/system/mosquitto.service |
| 53 |
|
| 54 |
override_dh_makeshlibs: |
| 55 |
dh_makeshlibs -- -c4 |
| 56 |
|
| 57 |
override_dh_installsystemduser: |
| 58 |
dh_installsystemduser -pmosquitto --no-enable mosquitto.service |