#!/usr/bin/make -f srcpkg = $(shell LC_ALL=C dpkg-parsechangelog | grep '^Source:' | cut -d ' ' -f 2,2) debver = $(shell LC_ALL=C dpkg-parsechangelog | grep '^Version:' | cut -d ' ' -f 2,2 ) upstreamver = $(shell echo $(debver) | cut -d '-' -f 1,1 ) # this figures out the last merge point from 'master' into the Debian branch and # then described this commit relative to the last release tag (V...) # If this should make any sense the local upstream branch must track upstream's # master or whatever other source branch. gitver = $(shell [ -x /usr/bin/git ] && git describe --tags --match 'V[0-9]_[0-9]_*[0-9]' $$(git merge-base -a HEAD upstream) | sed -e 's/^V//' -e 's/_/./g' -e 's/-/+git/')~dfsg.1 # one ring to rule them all ... %: dh $@ --with autotools_dev --with python2 override_dh_auto_configure: dh_auto_configure -- \ -DCONDOR_PACKAGE_BUILD:BOOL=ON \ -DPROPER:BOOL=ON \ -DCLIPPED:BOOL=ON \ -DUW_BUILD:BOOL=OFF \ -D_DEBUG:BOOL=TRUE \ -DBUILDID:STRING="Debian-$(debver)"\ -DFORCE_PRE_RELEASE:STRING="Debian-$(debver)"\ -DCMAKE_SKIP_RPATH:BOOL=ON \ -DHAVE_EXT_GSOAP:BOOL=OFF \ -DWITH_GSOAP:BOOL=OFF \ -DHAVE_EXT_CURL:BOOL=ON \ -DHAVE_EXT_OPENSSL:BOOL=ON \ -DHAVE_EXT_BOOST:BOOL=ON \ -DHAVE_EXT_GLOBUS:BOOL=ON \ -DHAVE_EXT_KRB5:BOOL=ON \ -DHAVE_EXT_LIBVIRT:BOOL=ON \ -DHAVE_EXT_LIBXML2:BOOL=ON \ -DHAVE_EXT_OPENSSL:BOOL=ON \ -DHAVE_EXT_PCRE:BOOL=ON \ -DHAVE_EXT_VOMS:BOOL=OFF \ -DWITH_VOMS:BOOL=OFF \ -DWITH_LIBCGROUP:BOOL=ON \ -DWANT_CONTRIB:BOOL=OFF \ -DWITH_BOSCO:BOOL=OFF \ -DWITH_PYTHON_BINDINGS:BOOL=OFF \ -DWITH_CAMPUSFACTORY:BOOL=OFF # upstream says: tests aren't reliable enough yet #-DBUILD_TESTS:BOOL=OFF \ #-DHAVE_EXT_POSTGRESQL:BOOL=OFF \ #-DEXTERNAL_INCLUDES:STRING="/usr/include/postgresql" override_dh_auto_build: doc/build dh_auto_build -- VERBOSE=1 # post-fixing things that have to be done due to changes introduced by # repackaging # 1. rebuild java stuff #cd src/condor_starter.V6.1 && javac *.java #cp src/condor_chirp/*.java src/condor_chirp/chirp/java/client/ #$(MAKE) -C src/condor_chirp/chirp/java/client/ #cp src/condor_chirp/chirp/java/client/Chirp.jar src/condor_chirp/ override_dh_python2: dh_python2 $@ --no-guessing-versions override_dh_shlibdeps: dh_shlibdeps -l$(CURDIR)/debian/tmp/usr/lib/ doc/build: mkdir -p $@ $(MAKE) -C doc ref.html mv doc/ref.html $@/html $(MAKE) -C doc/makeman makeman for html in $@/html/condor_*.html; do \ doc/makeman/makeman -v -i $$html -s 1; \ done mkdir -p $@/man # sanitize and copy for man in $@/html/condor_*.1; do \ sed -r -e 's,$@/html/,,' -e "s/1 date$$/1 \"$$(date +'%B %Y')\"/" \ -e '/\.SH Name/{ n; n; s/\W/ \\- /; }' -e 's/ (\.[A-Z])/\1/' \ -e "s/($$(echo $$(basename $$man) | cut -d . -f1,1))/\1 /g" \ -e '/\\$$/{ n; s/\.br//; }' -e 's,/SPAN>, ,g' \ -e '/[ ]*\.P/{ n; s/^[ ]*\.P//; }' \ -e 's/^[ ]*\././' \ -e 's/^\s//' < $$man > $@/man/$$(basename $$man) ; \ done rm $@/html/condor_*.1 find $@/html -name '*.html.bak' -delete override_dh_auto_install: dh_auto_install # things we do not need in Debian rm debian/tmp/usr/sbin/condor_install* # remove compat symlinks rm debian/tmp/usr/sbin/condor_vm_vmware.pl rm debian/tmp/usr/sbin/grid_monitor.sh override_dh_fixperms-arch: chmod -x debian/htcondor/etc/default/condor chmod -x debian/htcondor/usr/lib/condor/libexec/interactive.sub override_dh_install-arch: dh_install # fix permissions # remove duplicate that is also installed as a config file rm -f debian/htcondor/usr/lib/condor/libexec/linux-kernel-tuning override_dh_auto_clean: dh_auto_clean # clean up our own mess -find $(CURDIR) -name '*.class' -delete -o -name '*.jar' -delete -rm src/condor_chirp/chirp/java/client/*.java # clean leftovers of upstream clean run -rm src/condor_tests/list* -rm src/condor_examples/condor.boot.debian \ src/condor_examples/condor_config.patched -rm src/condor_tests/Condor.pm src/condor_tests/CondorPersonal.pm \ src/condor_tests/CondorTest.pm src/condor_tests/CondorUtils.pm \ src/condor_tests/batch_test.pl -rm src/condor_utils/param_info.c # docs $(MAKE) -C doc clean -rm -f doc/condor-*-Manual.tar -rm -rf doc/just-man-pages -rm -rf doc/build -rm -f doc/figuresizing.tex doc/fontsize.tex override_dh_clean: dh_clean debconf-updatepo # PDF come in dedicated doc package -- no compression override_dh_compress: dh_compress -X.pdf override_dh_installinit: dh_installinit -phtcondor --onlyscripts --noscripts override_dh_strip: dh_strip --dbg-package=htcondor-dbg override_dh_auto_test: dfsg-source-tree: -quilt pop -a @echo "Testing for uncommited changes" @git diff --quiet HEAD # remove windows binaries that come without sources rm -rf msconfig # remove openstack_gahp to keep lintian happy # HTCondor doesn't include code that falls under the bad license # However, it feels wrong to edit the license file # The openstack_gahp is not currently used # This will need to be addressed in the future rm -rf src/openstack_gahp # remove embedded tarballs with 3rd-party software that is # currently not used in any way find . -name '*.tar.gz' -delete find . -name '*.tgz' -delete # remove all java binaries # and other stuff that will be deleted during clean runs anyway find $(CURDIR) -regextype posix-egrep -regex '.*(\.(jar|class|pdf)|TAGS)' -print0 \ | xargs -0 -i git rm -f --ignore-unmatch -- {} || true # commit any cleanup results @if ! git diff --quiet HEAD; then \ git commit -e -a -m "Remove unwanted (e.g. non-DFSG-compliant) content"; \ fi # make orig tarball from repository content get-orig-source: dfsg-source-tree # orig tarball, turn directory into something nicer git archive --format=tar --prefix=$(srcpkg)-$(gitver)/ HEAD | \ gzip -9 > $(srcpkg)_$(gitver).orig.tar.gz # check that DSC patches still apply maint-check-dsc-patches: @for p in debian/patches/*-dsc-patch; \ do echo "check $$p"; \ patch -p1 --dry-run < $$p || exit 1 ; \ done