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 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
|
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
debver = $(shell LC_ALL=C dpkg-parsechangelog | grep '^Version:' | cut -d ' ' -f 2,2 )
# if this package is built in an i386 build environment on an amd64 host,
# a toolchain file is required so cmake uses the right CMAKE_SYSTEM_PROCESSOR
CMAKE_SYSTEM_PROCESSOR = $(shell cmake --system-information | grep CMAKE_SYSTEM_PROCESSOR | cut -d'"' -f2)
DEB_TARGET_ARCH = $(shell dpkg --print-architecture)
export CMAKE_TOOLCHAIN := ""
ifeq ($(DEB_TARGET_ARCH), i386)
ifeq ($(CMAKE_SYSTEM_PROCESSOR), x86_64)
export CMAKE_TOOLCHAIN := "-DCMAKE_TOOLCHAIN_FILE=$(CURDIR)/debian/i386-toolchain.cmake"
endif
endif
%:
dh $@ --with python3
override_dh_auto_configure:
dh_auto_configure -- \
$(CMAKE_TOOLCHAIN) \
-DPACKAGEID:STRING="$(debver)"\
-DBUILD_TESTING:BOOL=ON \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DCONDOR_PACKAGE_BUILD:BOOL=ON \
-DCMAKE_INSTALL_PREFIX:PATH=/
override_dh_auto_build: docs/build
dh_auto_build --parallel
# 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_shlibdeps:
dh_shlibdeps -l$(CURDIR)/debian/tmp/usr/lib/ -l$(CURDIR)/debian/tmp/usr/lib/condor --dpkg-shlibdeps-params=--ignore-missing-info
docs/build:
mkdir -p $@
$(MAKE) -C docs man
mkdir -p $@/man
mv docs/_build/man/* $@/man
override_dh_auto_install:
dh_auto_install
rm -rf debian/tmp/etc/rc.d
# Remove tarball files that we do not use
rm -f debian/tmp/usr/bin/make-ap-from-tarball
rm -f debian/tmp/usr/bin/make-personal-from-tarball
rm -f debian/tmp/usr/sbin/condor_configure
rm -f debian/tmp/usr/sbin/condor_install
# create blahp files
mkdir --mode 0755 debian/tmp/etc/blahp
for batch_system in condor kubernetes lsf nqs pbs sge slurm; do \
mv debian/tmp/usr/libexec/blahp/$${batch_system}_local_submit_attributes.sh debian/tmp/etc/blahp/; \
ln -s ../../../etc/blahp/$${batch_system}_local_submit_attributes.sh \
debian/tmp/usr/libexec/blahp/$${batch_system}_local_submit_attributes.sh; \
done
# Remove extranenous files
rm debian/tmp/usr/share/doc/condor/LICENSE
rm debian/tmp/usr/share/doc/condor/README
# This isn't ready for release yet.
rm -fr debian/tmp/usr/lib/python3/dist-packages/classad3
# Temporarily remove sif file until apptainer is fully supported
rm -f debian/tmp/usr/libexec/condor/exit_37.sif
override_dh_fixperms-arch:
dh_fixperms
chmod a-x debian/condor/usr/libexec/condor/interactive.sub
chmod a-x debian/condor/usr/libexec/condor/ce-audit.so
chmod a-x debian/condor/usr/libexec/condor/libclassad_python_user.*.so
override_dh_install-arch:
dh_install
# fix permissions
# remove duplicate that is also installed as a config file
rm -f debian/condor/usr/libexec/condor/linux-kernel-tuning
# move etc/bash_completion.d/ to usr/share/bash-completion/completions
mkdir -p debian/condor/usr/share/bash-completion/completions
mv debian/condor/etc/bash_completion.d/* debian/condor/usr/share/bash-completion/completions
rmdir debian/condor/etc/bash_completion.d
override_dh_auto_clean:
dh_auto_clean
# clean up our own mess
find $(CURDIR) -name '*.class' -delete -o -name '*.jar' -delete
find . -name '*.pyc' -delete
# clean leftovers of upstream clean run
rm -f src/condor_tests/list*
rm -f src/condor_examples/condor.boot.debian \
src/condor_examples/condor_config.patched
rm -f 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 \
src/condor_tests/condor_credmon_oauth_dummy
rm -f src/condor_utils/param_info.c
# docs
$(MAKE) -C docs clean
rm -rf docs/just-man-pages
rm -rf docs/_build
override_dh_installdocs:
dh_installdocs
for html in `find debian -name "*.html"` ; do \
sed -i \
-e 's#https://maxcdn.bootstrapcdn.com/bootstrap/[^/]*/css/bootstrap.min.css#file:///usr/share/javascript/bootstrap/css/bootstrap.min.css#' \
-e 's#https://maxcdn.bootstrapcdn.com/bootstrap/.*/js/bootstrap.min.js#file:///usr/share/javascript/bootstrap/js/bootstrap.min.js#' \
-e 's#[htps:]*//code.jquery.com/jquery-[^/]*\.min\.js#file:///usr/share/javascript/jquery/jquery.min.js#' \
$${html} ; \
done
# PDF come in dedicated doc package -- no compression
override_dh_compress:
dh_compress -X.pdf
override_dh_installinit:
dh_installinit -pcondor --onlyscripts --noscripts
override_dh_strip:
dh_strip --dbgsym-migration='condor-dbg (<< 9.3.1~dfsg-1~)'
override_dh_auto_test:
override_dh_gencontrol:
dh_gencontrol -- \
-Vlib:Depends="$(foreach package, libscitokens libssl, \
$(shell dpkg-query -W -f '$${Depends}' $(package)-dev \
| sed -E 's/.*($(package)[[:alnum:].-]+).*/\1,/' )) \
$(shell dpkg-query -W -f '$${Depends}' voms-dev \
| sed -E 's/.*(libvomsapi[[:alnum:].-]+).*/\1,/' )"
|