| 1 |
#!/usr/bin/make -f |
| 2 |
# debian/rules makefile that uses debhelper. |
| 3 |
|
| 4 |
# Uncomment this to turn on verbose mode. |
| 5 |
#export DH_VERBOSE=1 |
| 6 |
|
| 7 |
-include /usr/share/dpkg/buildtools.mk |
| 8 |
export CC |
| 9 |
|
| 10 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 11 |
export DEB_CFLAGS_MAINT_APPEND = -D_FILE_OFFSET_BITS=64 |
| 12 |
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) |
| 13 |
|
| 14 |
CONFIGURE_FLAGS = \ |
| 15 |
--prefix=/usr \ |
| 16 |
--sysconfdir=/etc \ |
| 17 |
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ |
| 18 |
--with-install="install -p -m 755" \ |
| 19 |
--enable-lib-static \ |
| 20 |
--enable-gettext \ |
| 21 |
--enable-openssl-runtime \ |
| 22 |
--extra-cflags="$(CPPFLAGS) $(CFLAGS)" \ |
| 23 |
--extra-ldflags="$(LDFLAGS)" \ |
| 24 |
--disable-shani |
| 25 |
|
| 26 |
%: |
| 27 |
dh $@ |
| 28 |
|
| 29 |
override_dh_auto_configure: |
| 30 |
./configure $(CONFIGURE_FLAGS) |
| 31 |
|
| 32 |
override_dh_auto_test: |
| 33 |
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) |
| 34 |
$(MAKE) print-info |
| 35 |
$(MAKE) test-lib-shared test-lib-static test |
| 36 |
endif |
| 37 |
|
| 38 |
override_dh_auto_install: |
| 39 |
# Install the program and its translation strings |
| 40 |
$(MAKE) DESTDIR=$(CURDIR)/debian/rhash install-binary install-data install-symlinks install-gmo |
| 41 |
# Install static library and so link |
| 42 |
$(MAKE) DESTDIR=$(CURDIR)/debian/librhash-dev install-lib-static install-lib-so-link install-pkg-config |
| 43 |
# Install shared library |
| 44 |
$(MAKE) DESTDIR=$(CURDIR)/debian/librhash1 install-lib-shared |
| 45 |
|
| 46 |
override_dh_auto_clean: |
| 47 |
[ -f config.mak ] && $(MAKE) distclean || true |