File: rules

package info (click to toggle)
sdf 2.001-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 868 kB
  • ctags: 15
  • sloc: makefile: 128; sh: 114; perl: 63
file content (56 lines) | stat: -rwxr-xr-x 1,545 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
#!/usr/bin/make -f

include debian/sys-build.mk

dh_mak_deps := $(shell perl debian/scripts/dh_split makedeps)
dh_gen_deps := $(shell perl debian/scripts/dh_split gendeps)

TMP     := $(shell pwd)/debian/tmp
archlib := $(shell perl -MConfig -e 'print $$Config{installarchlib}')
config  := INSTALLDIRS=perl INSTALLMAN1DIR=$(TMP)/usr/share/man/man1 \
	   INSTALLMAN3DIR=$(TMP)/usr/share/man/man3 INSTALLBIN=$(TMP)/usr/bin \
	   INSTALLPRIVLIB=$(TMP)/usr/lib/perl5 INSTALLARCHLIB=$(TMP)$(archlib) \
	   INSTALLSCRIPT=$(TMP)/usr/bin

build: $(STAMP_DIR)/build-stamp
$(STAMP_DIR)/build-stamp: source.make
	dh_testdir
	cd $(BUILD_TREE) && perl Makefile.PL && $(MAKE)
	touch $(STAMP_DIR)/build-stamp

clean:
	dh_testdir
	rm -rf $(STAMP_DIR) $(SOURCE_DIR)
	perl debian/scripts/dh_split clean
	dh_clean

# Build architecture-independent files here.
binary-indep: build $(dh_mak_deps)
	dh_testdir -i
	dh_testroot -i
	dh_clean -i -k
	dh_installdirs -i

	cd $(BUILD_TREE) && $(MAKE) install_perl $(config)
	rm -rf $(TMP)/usr/lib/perl5/5.*
	chmod -x `find $(TMP)/usr/lib/perl5/sdf -type f`

	dh_installexamples -psdf-doc $(BUILD_TREE)/examples/*/stylesheets
	dh_installdocs -i $(BUILD_TREE)/README
	dh_installdocs -psdf-doc $(BUILD_TREE)/doc/*
	dh_undocumented -i
	dh_installchangelogs -i
	dh_compress -i -X.html
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch:

$(dh_mak_deps): $(dh_gen_deps)
	perl debian/scripts/dh_split

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary