File: rules

package info (click to toggle)
ircii 4.4-3
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 4,256 kB
  • ctags: 2,797
  • sloc: ansic: 36,743; sh: 907; makefile: 483; lex: 16
file content (79 lines) | stat: -rwxr-xr-x 2,518 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
#!/usr/bin/make -f
#
# debian/rules	for ircII
#
# Copyright 1996,1997,1998 by Bernd Eckenfels
#
# Based on Example Copyright 1994,1995 by Ian Jackson.
#

package=ircii
default_server=irc.debian.org

build:
	$(checkdir)
	./configure --prefix=/usr --with-default-server=$(default_server) --with-non-blocking=posix
	$(MAKE) CFLAGS="-O2 -DDEBIAN" LDFLAGS="-s" IRC_PATH=".:.irc:/etc/irc/script/:/usr/lib/irc/script/"
#	$(MAKE) CFLAGS="-g -DDEBIAN" LDFLAGS="" IRC_PATH=".:.irc:/etc/irc/script/:/usr/lib/irc/script/"
	touch build

clean:
	$(checkdir)
	-rm -f build
	-$(MAKE) -f Makefile.in -i distclean RM=/bin/rm
	-rm -f *~ */*~ */*/*~ core */core
	-rm -rf DEADJOE */DEADJOE *~ debian/tmp debian/*~ debian/files* debian/substvars

binary-indep:	checkroot build
	$(checkdir)

# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch:	checkroot build
	-rm -rf debian/tmp debian/files
	install -d debian/tmp debian/tmp/DEBIAN
	install -d debian/tmp/usr/doc/$(package)
	install -d debian/tmp/usr/bin/  debian/tmp/usr/man/man1
	install -d debian/tmp/etc/irc/script
	install -d debian/tmp/usr/lib/irc/{help,script,translation}
	cp debian/conffiles debian/tmp/DEBIAN
	cp debian/prerm debian/tmp/DEBIAN
	sed "s/__default_server__/$(default_server)/g" debian/postinst > debian/tmp/DEBIAN/postinst
	chmod a+rx debian/tmp/DEBIAN/postinst debian/tmp/DEBIAN/prerm
	cp -Ra help/* debian/tmp/usr/lib/irc/help/
	cp -Ra script/* debian/tmp/usr/lib/irc/script/
	cp -Ra translation/* debian/tmp/usr/lib/irc/translation/
	cp debian/debian.script debian/tmp/etc/irc/script/local
	cp debian/debian.motd debian/tmp/etc/irc/motd
	cp source/{ircflush,ircio,wserv} debian/tmp/usr/bin/
	cp source/irc debian/tmp/usr/bin/ircII
	cp doc/ircII.1 debian/tmp/usr/man/man1/
	(cd debian/tmp/usr/man/man1 ; gzip -9v * )
	cp debian/changelog debian/tmp/usr/doc/$(package)/changelog.Debian
	cp ChangeLog NEWS README debian/tmp/usr/doc/$(package)/
	(cd debian/tmp/usr/doc/$(package)/ ; gzip -9v *)
	cp debian/copyright debian/tmp/usr/doc/$(package)/copyright
	dpkg-shlibdeps source/irc
	dpkg-gencontrol
	chown -R root.root debian/tmp
	chmod -R g-ws debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f source/irc.c
endef

# Below here is fairly generic really

binary:	binary-indep binary-arch

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

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

.PHONY: binary clean checkroot