File: rules

package info (click to toggle)
storebackup 3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,120 kB
  • ctags: 430
  • sloc: perl: 18,058; makefile: 52; sh: 37
file content (70 lines) | stat: -rwxr-xr-x 1,456 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
#!/usr/bin/make -f

destd=$(CURDIR)/debian/storebackup/
base_shared=usr/share/storebackup/
base_bin=usr/bin/
shared=$(destd)/$(base_shared)
bin=$(destd)/$(base_bin)

CMD=$(shell echo $@ | sed 's/^override_//')

build:
	dh $@

clean:
	dh $@
	rm -fr debian/man/

install: build
	dh $@

override_dh_install:
	$(CMD)
	for file in $(shared)/bin/*; \
	  do chmod 755 $$file; \
	  mv $$file $(shared)/bin/`basename $$file .pl`; \
	  dh_link $(base_shared)/bin/`basename $$file .pl` $(base_bin)/`basename $$file .pl`; \
	done

	rm -f $(bin)/multitail
	chmod 644 $(shared)/lib/*
	for file in $(shared)/lib/*; do \
	  if head -1 $$file | grep -q "#!"; then \
	    chmod +x $$file; \
	  fi \
	done

override_dh_installchangelogs:
	$(CMD) doc/ChangeLog

override_dh_installexamples:
	[ ! -f storeBackup_example ] || rm -f storeBackup_example
	/usr/bin/perl bin/storeBackup.pl -g storeBackup_example
	$(CMD)

override_dh_installcron:
	[ -f debian/storebackup.cron.daily ] || cp cron-storebackup debian/storebackup.cron.daily
	$(CMD)

override_dh_compres:
	$(CMD) -X storeBackup_example

override_dh_installman:
	rm -fr debian/man
	mkdir -p debian/man
	for file in $(bin)/*; do \
	  file=$$(basename $$file); \
	  pod2man $(bin)/$$file > debian/man/$$file.1; \
	done
	$(CMD)

binary-indep: build install
	dh $@

binary: binary-indep

get-orig-source:
	uscan --force-download --repack --debug

.PHONY: build clean binary-indep binary install get-orig-source binary-arch