File: rules

package info (click to toggle)
lintian 1.23.28%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 2,044 kB
  • ctags: 295
  • sloc: perl: 5,038; makefile: 702; python: 431; sh: 329; ansic: 30; tcl: 4; sed: 1
file content (77 lines) | stat: -rwxr-xr-x 2,091 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/make -f

VER := $(shell head -1 debian/changelog | sed -e 's/^.*(//' -e 's/).*$$//')
tmp := $(CURDIR)/debian/lintian
usl := $(tmp)/usr/share/lintian
neededfiles := debian/rules frontend/lintian
allchecks := $(wildcard checks/*)
allcollect := $(wildcard collection/*)
tagfiles := $(wildcard testset/tags.*)
onlyrun =

runtests: $(neededfiles) $(allchecks) $(allcollect) $(tagfiles)
	@echo .... running tests ....
	[ -d debian/tests ] || mkdir debian/tests
	LINTIAN_ROOT="" /usr/bin/perl testset/runtests -k testset debian/tests $(onlyrun)
	touch $@

build: $(neededfiles)
	@echo .... running build ....
	dh_testdir
	cd doc && LANG=C debiandoc2html lintian.sgml
	cd doc && LANG=C debiandoc2text lintian.sgml

clean: $(neededfiles)
	@echo .... cleaning ....
	dh_testdir
	dh_testroot
	rm -f runtests
	rm -rf doc/lintian.html/ doc/lintian.txt
	rm -rf debian/tests
	find -name "*.py?" -print0 | xargs -0r rm
	dh_clean -Xtestset/diffs/binary.c~

binary-indep: $(neededfiles) build
	@echo .... binary-indep ....
	dh_testdir
	dh_testroot
	dh_clean -k -Xtestset/diffs/binary.c~
	dh_installdirs

# frontends
	@echo .... install frontends ....
	install -m 755 frontend/lintian $(tmp)/usr/bin/
	sed -i 's/<VERSION>/$(VER)/' $(tmp)/usr/bin/lintian
	install -m 755 frontend/lintian-info $(tmp)/usr/bin/
# library files
	@echo .... install library files ....
	for d in checks collection lib unpack; do \
	  install -d $(usl)/$$d; \
	  find $$d -type f ! -path '*/CVS/*' ! -path '*/.svn/*' \
	  	| xargs -iFILE cp -p FILE $(usl)/$$d/; \
	done
# documentation
	@echo .... install documentation ....
	dh_installdocs
	dh_installchangelogs
# manual pages
	@echo .... install manual pages ....
	dh_installman man/*.1
# config file
	@echo .... install config file ....
	install -m 644 doc/lintianrc.example $(tmp)/etc/lintianrc
# control files
	@echo .... fix things up and build packages ....
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch:

binary:	binary-indep binary-arch

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