summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 928880859f5ef59b88f5fafd8135aeb08428a2d3 (plain)
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
#!/usr/bin/make -f

WSGI_LOC = $(shell find debian/bcfg2-server/ -name reports.wsgi | perl -p -e 's|debian/bcfg2-server||')

%:
	dh --with python-support $@

override_dh_auto_install:
	# Make the build destination dir consistent between pre-7.3 and 7.3 and 
	# later debhelper - see http://bcfg2.org/ticket/791
	dh_auto_install
	test -d debian/tmp/usr/local && mv debian/tmp/usr/local/* debian/tmp/usr || exit 0
	test -d debian/tmp/usr/local && rmdir debian/tmp/usr/local || exit 0

override_dh_installinit:
	# Install bcfg2 initscript without starting it on postinst
	dh_installinit --package=bcfg2 --no-start
	# Install bcfg2-server initscript without starting it on postinst
	dh_installinit --package=bcfg2-server --no-start

override_dh_installdeb:
	dh_installdeb
	perl -pi -e 's/^.*LoadModule.*//' debian/bcfg2-web/etc/apache2/conf.d/bcfg2.conf
	perl -pi -e 's|/usr.*/reports.wsgi|$(WSGI_LOC)|' debian/bcfg2-web/etc/apache2/conf.d/bcfg2.conf