#!/usr/bin/make -f include /usr/share/dpkg/architecture.mk export DEB_BUILD_MAINT_OPTIONS=hardening=+all ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) CFLAGS += -DOBEXFTP_DEBUG=5 endif ifeq (,$(filter noperl,$(DEB_BUILD_PROFILES))) PERL_VER := $(shell perl -MConfig -e 'print $$Config{version}') ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) export PERL5LIB := /usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERL_VER)$(if $(PERL5LIB),:$(PERL5LIB)) endif PERL_ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}') endif %: dh $@ override_dh_auto_configure: dh_auto_configure -- \ -DENABLE_PERL=$(if $(filter noperl,$(DEB_BUILD_PROFILES)),OFF,ON) \ -DENABLE_PYTHON=OFF \ -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON \ -DENABLE_RUBY=$(if $(filter noruby,$(DEB_BUILD_PROFILES)),OFF,ON) override_dh_auto_build: dh_auto_build doxygen override_dh_install: ifeq (,$(filter noperl,$(DEB_BUILD_PROFILES))) sed -e 's;@PERL_ARCHLIB@;$(PERL_ARCHLIB);g;' $(CURDIR)/debian/libobexftp-perl.install.in > $(CURDIR)/debian/libobexftp-perl.install endif dh_install -X.la override_dh_installdocs: dh_installdocs -XCOPYING -XINSTALL -Xobexftp.1 override_dh_installexamples: dh_installexamples chmod -x debian/obexftp/usr/share/doc/obexftp/examples/README_obexftpbackup dh_installexamples -plibobexftp0-dev examples/c_example*.c #dh_installexamples -plibobexftp0-dev examples/tcl_*.tcl # tcl is currently disabled dh_installexamples -plibobexftp-perl examples/perl_*.pl dh_installexamples -pruby-obexftp examples/ruby_*.rb override_dh_fixperms: dh_fixperms chmod 0644 debian/libobexftp0-dev/usr/share/doc/libobexftp0-dev/examples/c_example*.c