File: rules

package info (click to toggle)
squidtaild 2.1a6-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 256 kB
  • sloc: perl: 1,054; makefile: 376; sh: 51
file content (39 lines) | stat: -rwxr-xr-x 1,239 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
#!/usr/bin/make -f

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

tmp=$(CURDIR)/debian/squidtaild

ifndef PERL
PERL=/usr/bin/perl
endif

%:
	dh $@

override_dh_auto_build:
	( cd perl_modules/ConfigReader-Simple-0.5 ; \
	$(PERL) Makefile.PL INSTALLDIRS=vendor; \
	$(MAKE) )

override_dh_auto_clean:
	( cd perl_modules/ConfigReader-Simple-0.5 ; perl Makefile.PL ; make distclean )

override_dh_auto_install:
	( cd perl_modules/ConfigReader-Simple-0.5 ; make pure_install DESTDIR=$(tmp) )
	[ ! -d $(tmp)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(tmp)/usr/lib/perl5

override_dh_install:
	dh_install
	touch $(tmp)/etc/squidtaild/history
	touch $(tmp)/etc/squidtaild/violators
	chmod 644 $(tmp)/etc/squidtaild/squidtaild.conf
	# Remove code copy of libconfigreader-simple-perl
	rm -rf $(tmp)/usr/share/perl5 \
	       $(tmp)/usr/share/man/man3

override_dh_installdocs:
	dh_installdocs
	touch $(tmp)/usr/share/doc/squidtaild/overview.txt
	(for i in perl_modules/ConfigReader-Simple-0.5/blib/lib/ConfigReader/*.pm; do echo ConfigReader::`basename $$i .pm` ; pod2text $$i | perl -ne '$$/=""; s/^DESCRIPTION// && print'; done) >> $(CURDIR)/debian/squidtaild/usr/share/doc/squidtaild/overview.txt