File: rules

package info (click to toggle)
condor 8.4.11~dfsg.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 87,900 kB
  • sloc: cpp: 617,074; perl: 99,766; python: 21,685; ansic: 20,584; sh: 19,673; fortran: 3,340; yacc: 1,844; makefile: 1,277; xml: 1,003; sql: 767; java: 703; ruby: 512; awk: 497; lex: 248; f90: 64; csh: 24
file content (192 lines) | stat: -rwxr-xr-x 6,154 bytes parent folder | download
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#!/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_INSTALL_RPATH:STRING="/usr/lib/condor" \
		-DHAVE_EXT_GSOAP:BOOL=ON \
		-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 release-html MANDIR=$(CURDIR)/$@/html
		TARGETDIR=$(CURDIR)/$@/html
	# remove archives
	-rm $@/html/*.Z $@/html/*.gz
	$(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
	# make sure to have the few binaries to carry an RPATH converted to RUNPATH
	chrpath -c -k ./debian/tmp/usr/lib/condor/*.so || true
	chrpath -c -k ./debian/tmp/usr/sbin/* || true
	chrpath -c -k ./debian/tmp/usr/lib/condor/libexec/* || true


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 RPATH from public lib
	chrpath -d debian/libclassad*/usr/lib/libclassad.so.*.*
	# 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 reallyclean
	-rm -f doc/condor-*-Manual.tar
	-rm -rf doc/just-man-pages
	-rm -rf doc/build
	-rm -f doc/symbol.tex 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 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