| 1 |
#!/usr/bin/make -f |
| 2 |
export DH_VERBOSE=1 |
| 3 |
export DEB_BUILD_MAINT_OPTIONS=hardening=+all |
| 4 |
|
| 5 |
%: |
| 6 |
dh $@ -Scmake |
| 7 |
|
| 8 |
override_dh_auto_configure: |
| 9 |
dh_auto_configure -Bbuild-static -- -DBUILD_TESTING=ON -DLUABIND_BUILD_HEADER_TESTS=ON -DBUILD_SHARED_LIBS=OFF -DLUABIND_DYNAMIC_LINK=OFF -DLUABIND_LIBRARY_VERSION=0.9.1d1 -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_TARGET_MULTIARCH)" |
| 10 |
dh_auto_configure -Bbuild-shared -- -DBUILD_TESTING=ON -DLUABIND_BUILD_HEADER_TESTS=ON -DBUILD_SHARED_LIBS=ON -DLUABIND_DYNAMIC_LINK=ON -DLUABIND_LIBRARY_VERSION=0.9.1d1 -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_TARGET_MULTIARCH)" |
| 11 |
|
| 12 |
override_dh_auto_build: |
| 13 |
dh_auto_build -Bbuild-static |
| 14 |
dh_auto_build -Bbuild-shared |
| 15 |
ifneq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS))) |
| 16 |
echo "Found 'nodoc' in 'DEB_BUILD_OPTIONS'; not building documentation" |
| 17 |
else |
| 18 |
# Upstream's documentation build is broken, so perform the steps manually |
| 19 |
cd build-shared/doc && \ |
| 20 |
cp -rf ../../doc/policies ../../doc/*.rst ../../doc/*.py . && \ |
| 21 |
$(MAKE) -f ../../doc/Makefile man && \ |
| 22 |
$(MAKE) -f ../../doc/Makefile html |
| 23 |
endif |
| 24 |
|
| 25 |
override_dh_auto_test: |
| 26 |
dh_auto_test -Bbuild-static |
| 27 |
dh_auto_test -Bbuild-shared |
| 28 |
|
| 29 |
override_dh_auto_install: |
| 30 |
dh_auto_install -Bbuild-static |
| 31 |
dh_auto_install -Bbuild-shared |
| 32 |
install -d $(CURDIR)/debian/tmp/usr/lib/$(DEB_TARGET_MULTIARCH)/pkgconfig |
| 33 |
install -p -m0644 debian/luabind.pc $(CURDIR)/debian/tmp/usr/lib/$(DEB_TARGET_MULTIARCH)/pkgconfig |
| 34 |
install -d $(CURDIR)/debian/tmp/examples |
| 35 |
cp -rf $(CURDIR)/examples/* $(CURDIR)/debian/tmp/examples/ |
| 36 |
find $(CURDIR)/debian/tmp/examples -type f -name "*.cpp" -or -name "*.hpp" -or -name "*.lua" | xargs chmod 644 |
| 37 |
find $(CURDIR)/debian/tmp/examples -type f -name "Jamfile" -or -name "*.jam" -or -name "makefile" | xargs rm -f |