File: rules

package info (click to toggle)
smokeping 2.7.3-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,816 kB
  • sloc: perl: 17,259; sh: 3,868; javascript: 668; xml: 293; makefile: 165
file content (56 lines) | stat: -rwxr-xr-x 2,095 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
#
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
#
# Modified to make a template file for a multi-binary package with separated
# build-arch and build-indep targets  by Bill Allombert 2001

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This has to be exported to make some magic below work.
export DH_OPTIONS

# smokeping doesn't like building with your locale
unexport LC_ALL

TMP=$(CURDIR)/debian/smokeping

SUBDIRS="doc etc htdocs lib bin"

override_dh_auto_configure:
	dh_auto_configure -- --prefix=/usr --with-htdocs-dir=/usr/share/smokeping/www --bindir=/usr/sbin --sysconfdir=/usr/share/doc/smokeping/

override_dh_auto_build:
	dh_auto_build -- SUBDIRS=$(SUBDIRS)

override_dh_auto_test:
	dh_auto_test -- SUBDIRS=$(SUBDIRS)

override_dh_auto_install:
	dh_auto_install -- SUBDIRS=$(SUBDIRS)

	dh_link /var/cache/smokeping/images /usr/share/smokeping/www/images
	install -v -m 644 $(CURDIR)/htdocs/js/smokeping.js $(TMP)/usr/share/smokeping/www/js
	for d in cropper prototype scriptaculous; do \
		rm -vrf $(TMP)/usr/share/smokeping/www/js/$$d ; \
	        dh_link /usr/share/javascript/$$d /usr/share/smokeping/www/js/$$d; \
	done
	rm -vf $(TMP)/usr/share/smokeping/www/js/prototype.js

	mv -v $(TMP)/usr/share/doc/smokeping/*.dist $(TMP)/etc/smokeping/
	rename -v 's/\.dist$$//' $(TMP)/etc/smokeping/*.dist
	rm -vf $(TMP)/usr/share/smokeping/smokeping.fcgi.dist
	rm -vf $(TMP)/usr/share/perl5/BER.pm $(TMP)/usr/share/perl5/SNMP_*
	mv -v $(TMP)/usr/sbin/smokeping_cgi $(TMP)/usr/share/smokeping/smokeping.cgi
	install -v -m 755 $(CURDIR)/debian/smokeping.cgi $(TMP)/usr/lib/cgi-bin/smokeping.cgi
	$(CURDIR)/debian/split_config $(TMP)
	install -v -m 644 $(CURDIR)/debian/default-config $(TMP)/etc/smokeping/config

%:
	dh $@ --with autoreconf,apache2