| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) |
| 4 |
|
| 5 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 6 |
|
| 7 |
CONFIGURE_OPTIONS = --with-gtk=3 |
| 8 |
|
| 9 |
ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),) |
| 10 |
CONFIGURE_OPTIONS += --with-extra-only |
| 11 |
else |
| 12 |
CONFIGURE_OPTIONS += --enable-udisks |
| 13 |
ifeq ($(filter nodoc,$(DEB_BUILD_OPTIONS)),) |
| 14 |
ifneq ($(filter libfm-doc,$(shell dh_listpackages)),) |
| 15 |
CONFIGURE_OPTIONS += --enable-gtk-doc |
| 16 |
endif |
| 17 |
endif |
| 18 |
endif |
| 19 |
|
| 20 |
%: |
| 21 |
dh ${@} |
| 22 |
|
| 23 |
override_dh_auto_configure: |
| 24 |
dh_auto_configure -- $(CONFIGURE_OPTIONS) |
| 25 |
|
| 26 |
override_dh_auto_install: |
| 27 |
dh_auto_install |
| 28 |
|
| 29 |
# split extra headers |
| 30 |
mkdir -p debian/libfm-extra-dev/usr/include/libfm-1.0 |
| 31 |
for file in fm-extra.h fm-version.h fm-xml-file.h; do \ |
| 32 |
mv debian/tmp/usr/include/libfm-1.0/$$file debian/libfm-extra-dev/usr/include/libfm-1.0/; \ |
| 33 |
done |
| 34 |
|
| 35 |
# removing unused files |
| 36 |
rm -f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.a |
| 37 |
rm -f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.la |
| 38 |
|
| 39 |
override_dh_install: |
| 40 |
ifneq ($(filter nodoc,$(DEB_BUILD_OPTIONS)),) |
| 41 |
# in nodoc mode no documentation will be installed |
| 42 |
mkdir -p debian/tmp/usr/share/gtk-doc/html/libfm |
| 43 |
endif |
| 44 |
dh_install |
| 45 |
|
| 46 |
override_dh_installchangelogs: |
| 47 |
dh_installchangelogs NEWS |
| 48 |
|
| 49 |
override_dh_makeshlibs: |
| 50 |
# modules are not shared libs so disable processing for them |
| 51 |
dh_makeshlibs -X/modules/ |
| 52 |
|
| 53 |
ifneq ($(filter stage1,$(DEB_BUILD_PROFILES)),) |
| 54 |
override_dh_auto_test: |
| 55 |
# will not work for stage1 |
| 56 |
endif |