File: rules

package info (click to toggle)
lynx 2.8.3-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 8,540 kB
  • ctags: 9,352
  • sloc: ansic: 116,677; sh: 1,974; makefile: 973; perl: 342; sed: 93
file content (98 lines) | stat: -rwxr-xr-x 4,060 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#! /usr/bin/make -f
#

build:
	$(checkdir)
	test -f config.cache || ./configure --prefix=/usr \
		    --libexecdir=/usr/lib --sysconfdir=/etc \
		    --localstatedir=/var --libdir=/etc \
		    --with-screen=slang --enable-8bit-toupper \
		    --enable-externs --enable-nsl-fork \
		    --enable-cgi-links --enable-exec-links --enable-exec-scripts \
		    --enable-persistent-cookies --enable-nls \
		    --enable-prettysrc --enable-source-cache \
		    --with-zlib
	$(MAKE) CPPFLAGS="-DNSL_FORK"
	touch build

clean:
	$(checkdir)
	-rm -rf build debian/tmp debian/files debian/substvars debian/*~ *~
	-$(MAKE) distclean
	-rm -f lynx

binary-indep: checkroot build
	$(checkdir)

binary-arch: checkroot build
	$(checkdir)
	-rm -rf debian/files debian/tmp
	install -d -o root -g root -m 755 debian/tmp
# Create the directory hierarchy
	install -d -o root -g root -m 755 debian/tmp/DEBIAN
	install -d -o root -g root -m 755 debian/tmp/usr/bin
	install -d -o root -g root -m 755 debian/tmp/etc
	install -d -o root -g root -m 755 debian/tmp/usr/share/man/man1
	install -d -o root -g root -m 755 debian/tmp/usr/share/doc/lynx{,/about_lynx,/test}
	install -d -o root -g root -m 755 debian/tmp/usr/lib/menu
	install -d -o root -g root -m 755 debian/tmp/usr/lib/mime/packages
	install -d -o root -g root -m 755 debian/tmp/usr/share/locale
# Copy lynx files...
	install -s -o root -g root -m 755 lynx debian/tmp/usr/bin
	install -o root -g root -m 644 lynx.cfg debian/tmp/etc
	install -o root -g root -m 644 debian/menu debian/tmp/usr/lib/menu/lynx
	install -o root -g root -m 644 debian/mime debian/tmp/usr/lib/mime/packages/lynx
	install -o root -g root -m 644 lynx.man debian/tmp/usr/share/man/man1/lynx.1
	cp -R lynx_help debian/tmp/usr/share/doc/lynx
	chmod -R u=rwX,go=rX debian/tmp/usr/share/doc/lynx
	cat CHANGES `ls docs/CHANGES* |sort -t . -rn -k 2,2 -k 3,3` \
		> debian/tmp/usr/share/doc/lynx/changelog
	chmod 644 debian/tmp/usr/share/doc/lynx/changelog
	install -o root -g root -m 644 docs/CRAWL.announce docs/FM.announce \
		docs/README.chartrans PROBLEMS README debian/copyright \
		samples/jumpsUnix.html samples/cernrules.txt \
		samples/lynx-keymaps debian/tmp/usr/share/doc/lynx
	install -o root -g root -m 644 test/* debian/tmp/usr/share/doc/lynx/test
	install -o root -g root -m 644 debian/dhelp debian/tmp/usr/share/doc/lynx/.dhelp
	install -o root -g root -m 644 debian/changelog \
		debian/tmp/usr/share/doc/lynx/changelog.Debian
	install -o root -g root -m 644 debian/README.Debian \
		debian/tmp/usr/share/doc/lynx/README.Debian
# Compress /usr/share/doc/lynx files and manpages...
	find debian/tmp/usr/share/doc/lynx -type f -size +6k -maxdepth 1 -print \
		| xargs gzip -9
	test -f debian/tmp/usr/share/doc/lynx/changelog.Debian.gz || gzip -9 debian/tmp/usr/share/doc/lynx/changelog.Debian
	test -f debian/tmp/usr/share/doc/lynx/changelog.gz || gzip -9 debian/tmp/usr/share/doc/lynx/changelog
	find debian/tmp/usr/share/man -type f -print | xargs gzip -9
# Copy message catalogues.
	for f in po/*.gmo; do \
		cat=`basename $$f`; \
		lang=`echo $$cat | sed 's/\.gmo$$//'`; \
		install -d -o root -g root -m 755 debian/tmp/usr/share/locale/$$lang/LC_MESSAGES; \
		install -o root -g root -m 644 $$f debian/tmp/usr/share/locale/$$lang/LC_MESSAGES/lynx.mo; \
	done
# Make the debian control area.
	install -o root -g root -m 644 debian/conffiles debian/tmp/DEBIAN
	install -o root -g root -m 755 debian/post{inst,rm} debian/tmp/DEBIAN
	install -o root -g root -m 755 debian/prerm debian/tmp/DEBIAN
	install -o root -g root -m 755 debian/config debian/tmp/DEBIAN
	install -o root -g root -m 644 debian/templates debian/tmp/DEBIAN
	dpkg-shlibdeps debian/tmp/usr/bin/lynx
	dpkg-gencontrol -isp
# And finally, build the Debian package!
	dpkg --build debian/tmp ..

define checkdir
	test -f src/LYMain.c -a -f debian/rules
endef

binary:	binary-indep binary-arch

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

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

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