File: rules

package info (click to toggle)
felt 3.02-4
  • links: PTS
  • area: main
  • in suites: slink
  • size: 16,460 kB
  • ctags: 6,885
  • sloc: ansic: 72,103; fortran: 3,614; yacc: 2,825; lex: 1,172; sh: 311; makefile: 279
file content (73 lines) | stat: -rwxr-xr-x 2,470 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
#!/usr/bin/make -f

package=felt
DESTDIR=`pwd`/debian/tmp

SHELL=/bin/bash

build:
	$(checkdir)
	./configure --prefix=/usr --contrib
	-rm -f `find . \( -name 'parser.c' -o -name 'lexer.c' \) -print`
	make
	touch build

clean:
	$(checkdir)
	-rm -f build
	-make clobber
	-rm -f `find . \( -name '*~' -o -name '*.bak' \) -print`
	-rm -rf debian/tmp* debian/files* core debian/substvars*

binary-indep: checkroot build
	$(checkdir)

binary-arch: checkroot build
	$(checkdir)
	-rm -rf debian/tmp*
	install -d -m755 debian/tmp/usr/doc/$(package) debian/tmp/DEBIAN
	install -m 755 debian/postinst debian/tmp/DEBIAN/postinst
	install -m 755 debian/postrm debian/tmp/DEBIAN/postrm
	install -d -m755 debian/tmp/usr/man/{man1,man3,man4}
	install -d -m755 debian/tmp/usr/X11R6/{bin,man/man1,lib/X11/app-defaults}
	install -d -m755 debian/tmp-doc/usr/doc/$(package)/manual debian/tmp-doc/DEBIAN
	cp FAQ REA* TODO debian/tmp/usr/doc/$(package)
	cp CHANGELOG  debian/tmp/usr/doc/$(package)/changelog
	cp debian/changelog  debian/tmp/usr/doc/$(package)/changelog.Debian
	ln -sf $(package) debian/tmp-doc/usr/doc/$(package)-doc
	cat felt-3.02.ps | \
 gzip -c9 >debian/tmp-doc/usr/doc/$(package)/manual/felt-3.02.ps.gz
	gzip -9f debian/tmp/usr/doc/$(package)/*
	cp debian/copyright debian/tmp/usr/doc/$(package)
	install -d -m755 debian/tmp/usr/doc/$(package)/examples/{Burlap,Corduroy}
	./configure --prefix=$(DESTDIR)/usr --x-defaults=$(DESTDIR)/usr/X11R6/lib/X11/app-defaults --contrib
	make install
	gzip -9f debian/tmp/usr/man/{man1,man3,man4}/*
	mv debian/tmp/usr/bin/velvet debian/tmp/usr/X11R6/bin
	mv debian/tmp/usr/man/man1/velvet.1.gz debian/tmp/usr/X11R6/man/man1
	cp src/Burlap/Examples/* debian/tmp/usr/doc/$(package)/examples/Burlap/
	cp src/Corduroy/Examples/* debian/tmp/usr/doc/$(package)/examples/Corduroy/
	cp examples/* debian/tmp/usr/doc/$(package)/examples/
	install -d -m755 debian/tmp/usr/lib/menu
	cp debian/menu  debian/tmp/usr/lib/menu/felt
	dpkg-shlibdeps debian/tmp/usr/bin/* debian/tmp/usr/X11R6/bin/*
	dpkg-gencontrol -p$(package) -Pdebian/tmp
	dpkg-gencontrol -p$(package)-doc -Pdebian/tmp-doc
	chown -R root.root debian/tmp*
	chmod -R go=rX debian/tmp*
	chmod 755 debian/md5_sums
	debian/md5_sums tmp tmp-doc
	dpkg --build debian/tmp ..
	dpkg --build debian/tmp-doc ..

define checkdir
	test -f debian/rules
endef

binary: binary-indep binary-arch

checkroot:
	$(checkdir)
	test root = "`whoami`"

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