| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
# Sample debian/rules that uses debhelper. |
| 4 |
# This file was originally written by Joey Hess and Craig Small. |
| 5 |
# As a special exception, when this file is copied by dh-make into a |
| 6 |
# dh-make output file, you may use that output file without restriction. |
| 7 |
# This special exception was added by Craig Small in version 0.37 of dh-make. |
| 8 |
|
| 9 |
# Uncomment this to turn on verbose mode. |
| 10 |
#export DH_VERBOSE=1 |
| 11 |
|
| 12 |
export DEB_CXXFLAGS_MAINT_APPEND := -Wall -Werror -pedantic -Wno-unused-function |
| 13 |
|
| 14 |
%: |
| 15 |
dh $@ --with autoreconf |
| 16 |
|
| 17 |
DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) |
| 18 |
DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) |
| 19 |
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) |
| 20 |
|
| 21 |
override_dh_auto_clean: |
| 22 |
dh_auto_clean |
| 23 |
$(RM) -r libltdl |
| 24 |
|
| 25 |
override_dh_auto_configure: |
| 26 |
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ |
| 27 |
--prefix=/usr --mandir=\$${prefix}/share/man \ |
| 28 |
--infodir=\$${prefix}/share/info \ |
| 29 |
--disable-update-makefiles \ |
| 30 |
CXXFLAGS="$(CXXFLAGS)" # LDFLAGS="-Wl,-z,defs" |
| 31 |
|
| 32 |
override_dh_auto_test: |
| 33 |
# run all internal tests |
| 34 |
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) |
| 35 |
$(MAKE) check CXXFLAGS="$(filter-out -Werror, $(CXXFLAGS))" |
| 36 |
endif |
| 37 |
|
| 38 |
override_dh_auto_install: |
| 39 |
dh_auto_install |
| 40 |
|
| 41 |
sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'` |
| 42 |
|
| 43 |
#pkg-config .pc install: |
| 44 |
install -d $(CURDIR)/debian/tmp/usr/lib/pkgconfig |
| 45 |
install -m 644 debian/*.pc $(CURDIR)/debian/tmp/usr/lib/pkgconfig |
| 46 |
|