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
|
#!/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
|