File: rules

package info (click to toggle)
backuppc 4.4.0-10
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 4,744 kB
  • sloc: perl: 37,523; sh: 606; javascript: 176; makefile: 38; ansic: 6
file content (46 lines) | stat: -rwxr-xr-x 2,240 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
#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic

%:
	dh $@

override_dh_auto_build:
	dh_auto_build $@
	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) debian/setuidwrapper.c -o index.cgi
	pod2man --section=8 --center="BackupPC manual" doc/BackupPC.pod backuppc.8
	perl -e "s/.IX Title.*/.SH NAME\nbackuppc \\- BackupPC manual/g" -p -i.tmp backuppc.8

override_dh_install:
	perl configure.pl --batch --no-fhs --hostname XXXXXX --uid-ignore \
		--config-dir=/etc/backuppc --run-dir=/run/backuppc \
	    --install-dir /usr/share/backuppc --dest-dir $(CURDIR)/debian/backuppc/ \
	    --data-dir /var/lib/backuppc --cgi-dir /usr/share/backuppc/cgi-bin \
	    --html-dir /usr/share/backuppc/image --html-dir-url /backuppc/image \
	    --bin-path perl=/usr/bin/perl --bin-path tar=/bin/tar \
	    --bin-path smbclient=/usr/bin/smbclient \
	    --bin-path nmblookup=/usr/bin/nmblookup \
	    --bin-path rsync_bpc=/usr/libexec/backuppc-rsync/rsync_bpc \
	    --bin-path rsync=/usr/bin/rsync --bin-path ping=/bin/ping \
	    --bin-path df=/bin/df --bin-path ssh=/usr/bin/ssh \
	    --bin-path sendmail=/usr/sbin/sendmail \
	    --bin-path hostname=/bin/hostname --bin-path split=/usr/bin/split \
	    --bin-path par2=/usr/bin/par2 --bin-path cat=/bin/cat \
	    --bin-path gzip=/bin/gzip --bin-path bzip2=/bin/bzip2 \
	    --bin-path ping6=/bin/ping6
	mv -f debian/backuppc/usr/share/backuppc/cgi-bin/* debian/backuppc/usr/share/backuppc/lib/realindex.cgi
	install --mode=755 index.cgi debian/backuppc/usr/lib/backuppc/cgi-bin
	install --mode=644 conf/hosts debian/backuppc/etc/backuppc
	install --mode=644 debian/localhost.pl debian/backuppc/etc/backuppc
	install --mode=644 debian/apache.conf debian/backuppc/etc/backuppc
	-rmdir debian/backuppc/var/lib/backuppc/conf/
	(cd debian/backuppc/usr/share/backuppc/cgi-bin; ln -s ../image; ln -s /usr/lib/backuppc/cgi-bin/index.cgi )
	patch --no-backup-if-mismatch -p0 < debian/config.pl.diff
	install --mode=644 debian/backuppc/etc/backuppc/config.pl debian/backuppc/usr/share/backuppc/conf
	rm -rf debian/backuppc/etc/backuppc/config.pl
	rm -rf debian/backuppc/run
	dh_install