1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DOCDIR=$(CURDIR)/debian/libgoogle-glog-doc/
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
BUILDDIR = obj-$(DEB_HOST_MULTIARCH)
CONFIGURE_ARGS= \
-DCMAKE_BUILD_TYPE=Release \
-DLIB_INSTALL_DIR:STRING="lib/$(DEB_HOST_MULTIARCH)"
override_dh_installdocs-indep:
dh_installdocs
sed -i 's|http.*/favicon.ico||' \
$(DOCDIR)/usr/share/doc/libgoogle-glog-dev/glog.html
override_dh_auto_build:
# dynamically linked
dh_auto_build -B $(BUILDDIR)
# statically linked
dh_auto_build -B $(BUILDDIR)-static
override_dh_auto_configure:
# dynamically linked
dh_auto_configure -B $(BUILDDIR) \
-- $(CONFIGURE_ARGS) \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=ON
# statically linked
dh_auto_configure -B $(BUILDDIR)-static \
-- $(CONFIGURE_ARGS) \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF
override_dh_auto_install:
dh_auto_install -O--buildsystem=cmake -B $(BUILDDIR)
find $(CURDIR)/debian/tmp/ -type d -name .cmake | xargs -r rm -rfv
execute_before_dh_install:
# put the static libs together with the rest of the stuff
cp -v $(BUILDDIR)-static/*.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/
-$(RM) -r $(BUILDDIR)-static
override_dh_auto_test:
-if [ -f /proc/version ]; then $(MAKE) check; fi
%:
dh $@ --buildsystem=cmake
get-orig-source:
uscan --verbose --force-download --rename
.PHONY: override_dh_installdocs-indep override_dh_auto_install \
execute_before_dh_install override_dh_auto_build \
override_dh_auto_test override_dh_auto_configure
|