File: rules

package info (click to toggle)
filerunner 2.5.1-12
  • links: PTS
  • area: main
  • in suites: woody
  • size: 676 kB
  • ctags: 148
  • sloc: tcl: 6,101; ansic: 561; sh: 347; makefile: 62
file content (80 lines) | stat: -rwxr-xr-x 2,666 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
78
79
80
#!/usr/bin/make -f

# Debian Package Building Makefile
# 

# Package maintainer: Muhammad Hussain Yusuf <muhammad_yusuf@lineone.net>
# Configuration and compilation

PACKAGE=filerunner
BINARY=fr
BASE=debian/tmp
LIBDIR=$(BASE)/usr/lib/$(PACKAGE)
DOCDIR=$(BASE)/usr/share/doc/$(PACKAGE)
TXTDIR=$(BASE)/usr/share/$(PACKAGE)
BINDIR=$(BASE)/usr/bin
CONFDIR=$(BASE)/etc/$(PACKAGE)
REALCONFDIR=/etc/$(PACKAGE)
CONFFILE=$(CONFDIR)/system.fr
REALCONFFILE=$(REALCONFDIR)/system.fr

build:
	make -f Makefiles/Makefile.linux_gcc

binary: binary-arch binary-indep

binary-indep:

# This one needs to be root.

binary-arch: build
	rm -rf debian/tmp
	install -d debian/tmp debian/tmp/DEBIAN $(BINDIR)
	install -d debian/tmp/usr/share/man/man1
	install -d $(DOCDIR) $(LIBDIR) $(CONFDIR) $(TXTDIR)
	install -d debian/tmp/usr/lib/menu
	install -d debian/tmp/usr/share/filerunner
	install -d debian/tmp/usr/share/doc
	install -d debian/tmp/usr/share/lintian/overrides
	cp debian/override debian/tmp/usr/share/lintian/overrides/filerunner
	cp debian/menu debian/tmp/usr/lib/menu/filerunner
	cp debian/changelog debian/tmp/usr/share/doc/$(PACKAGE)/changelog.Debian
	gzip -9vr debian/tmp/usr/share/doc/$(PACKAGE)/changelog.Debian
	cp debian/copyright debian/tmp/usr/share/doc/$(PACKAGE)/copyright
	cp debian/README.Debian debian/tmp/usr/share/doc/$(PACKAGE)/README.Debian
	
# This documentation must not be compressed -- it is referenced by the
# program while it is running and will not work if compressed.
	cp HISTORY *.txt QuickStart.txt Users_Guide.txt COPYING README FAQ \
		$(TXTDIR)
	cp -pr *.gif *.tcl fr frcolor frftp *.xpm tclIndex bitmaps \
		$(LIBDIR)
	install -s ext.so $(LIBDIR)
	chmod a+x $(LIBDIR)/$(BINARY)
	ln -s ../lib/$(PACKAGE)/$(BINARY)  $(BINDIR)/$(BINARY)
	ln -s fr $(BINDIR)/filerunner
	cp system.fr $(CONFFILE)
	pod2man "--center=Debian GNU/Linux Documentation" \
		"--release=Debian GNU/Linux" \
		debian/filerunner.pod > debian/tmp/usr/share/man/man1/fr.1
	gzip -9 debian/tmp/usr/share/man/man1/fr.1
	ln -s fr.1.gz debian/tmp/usr/share/man/man1/filerunner.1.gz
	ln -s $(REALCONFFILE) $(LIBDIR)/config
	cp debian/conffiles $(BASE)/DEBIAN
	cp debian/preinst $(BASE)/DEBIAN
	cp debian/postinst $(BASE)/DEBIAN
	cp debian/prerm $(BASE)/DEBIAN
	cp debian/postrm $(BASE)/DEBIAN
	chmod a+x $(BASE)/DEBIAN/preinst $(BASE)/DEBIAN/postinst \
	$(BASE)/DEBIAN/prerm $(BASE)/DEBIAN/postrm 
	chmod 644 $(LIBDIR)/ext.so
	dpkg-shlibdeps $(LIBDIR)/ext.so
	dpkg-gencontrol -isp
	chown -R root.root debian/tmp
	chmod -R go-ws debian/tmp
	dpkg --build debian/tmp ..

clean:
	rm -rf *.o *~ core ext.so
	rm -rf debian/tmp debian/files debian/substvars debian/*~
	rm -rf Makefiles/*~