File: rules

package info (click to toggle)
tin 980226-3
  • links: PTS
  • area: non-free
  • in suites: hamm
  • size: 2,972 kB
  • ctags: 4,932
  • sloc: ansic: 45,907; sh: 1,577; makefile: 1,130; yacc: 698; perl: 103
file content (62 lines) | stat: -rwxr-xr-x 1,621 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
#!/usr/bin/make -f

package=tin

build:
	$(checkdir)
	./configure --prefix=/usr --with-domain-name=/etc/mailname --with-libdir=/var/lib/news --with-spooldir=/var/spool/news --with-mail-gateway=/etc/mailname --with-nov-dir=/var/spool/news/over.view --disable-mime-strict-charset --with-nntp-default-server=/etc/news/server --disable-locale --with-mime-default-charset=ISO-8859-1

	# change include/nntplib.h to support /etc/news/server
	sed -e"s|/etc/nntpserver|/etc/news/server|" < include/nntplib.h > include/nntplib.h2

	# move the tempfile made by sed
	mv include/nntplib.h2 include/nntplib.h

	make build 
	touch build

clean:
	$(checkdir)
	-rm -f build
	-make distclean
	-rm -f `find . -name "*~"`
	-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 debian/tmp
	install -d debian/tmp/etc/tin
	install -d debian/tmp/usr/bin
	install -d debian/tmp/usr/man/man1

	touch debian/tmp/usr/bin/rtin

	make install prefix=`pwd`/debian/tmp/usr
	install -m644 doc/tin.defaults debian/tmp/etc/tin

	install -m0644 doc/tin.1 debian/tmp/usr/man/man1
	(cd debian/tmp/usr/man/man1; ln -s tin.1.gz rtin.1.gz)

	debstd -m doc/CHANGES doc/TODO doc/WHATSNEW doc/auth.txt doc/filtering
	dpkg-gencontrol
	chown -R root.root debian/tmp
	chmod -R go=rX debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

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

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