File: rules

package info (click to toggle)
efte 1.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 3,800 kB
  • sloc: cpp: 43,587; ansic: 1,228; makefile: 271; objc: 92; sh: 40
file content (141 lines) | stat: -rw-r--r-- 3,886 bytes parent folder | download | duplicates (3)
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#!/usr/bin/make -f

# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatability version to use.
export DH_COMPAT=1

# This has to be exported to make some magic below work.
export DH_OPTIONS

#
# Modified to be a prototype for debmake by Christoph Lameter <clameter@debian.org>
#
# Modified to work for fte by Riku Voipio <riku.voipio@iki.fi>
#
# Modified to work for fte by Zdenek Kabelac <kabi@debian.org>


INST=install -p
DEBSTD=debstd
package=fte
docs=$(package)-docs
console=$(package)-console
terminal=$(package)-terminal
xwindow=$(package)-xwindow

allpackages=\
	debian/tmp\
	debian/$(docs)\
        debian/$(console)\
        debian/$(terminal)\
        debian/$(xwindow)

build:
	@dh_testdir
	$(MAKE) -C src -j 2 -f fte-unix.mak
	touch build

cleanB:
	@dh_testdir
	@dh_clean

clean: cleanB
	@dh_testdir
	@rm -f build
	@$(MAKE) -C src -f fte-unix.mak clean

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

binary-arch: cleanB checkroot checkscripts build
	@dh_testdir
	@echo ":: Preparing packages"
#	@$(INST) -d debian
#	@cd debian; install -d `cat *.dirs`
	dh_testdir
	dh_testroot
	dh_installdirs

	@echo "/etc/fte/system.fterc" >debian/conffiles
##	find config -type f | sed -e 's/^/\/etc\/fte\//g' >>debian/conffiles
	@$(INST) -s src/cfte debian/tmp/usr/bin/

	@tar cf debian/$(docs)/usr/share/doc/fte/config-example.tar config
	@$(INST) -s -m 4755 src/vfte debian/$(console)/usr/bin/
	@$(INST) -s src/sfte debian/$(terminal)/usr/bin/
	@$(INST) -s src/xfte debian/$(xwindow)/usr/X11R6/bin/
	@$(INST) -m 755 debian/fte debian/tmp/usr/bin/fte
	@ln -s ../../../share/man/man1/fte.1.gz debian/$(xwindow)/usr/X11R6/man/man1/xfte.1.gz
	@ln -s fte.1.gz debian/$(console)/usr/share/man/man1/vfte.1.gz
	@ln -s fte.1.gz debian/$(terminal)/usr/share/man/man1/sfte.1.gz
	@cp -a debian/fte-console.lintian debian/$(console)/usr/share/lintian/overrides/fte-console

#	@cp -a debian/cfte.1 debian/$(docs)/usr/share/man/man1
#	@find doc -type f | grep -v INDEX >debian/$(docs).docs
# Must have debmake installed for this to work. Otherwise please copy
# /usr/bin/debstd into the debian directory and change debstd to debian/debstd
#	@chown -R root.root $(allpackages)
#	@chmod -R go=rX $(allpackages)
#	@$(DEBSTD) -m BUGS HISTORY README TODO

	dh_installdocs BUGS HISTORY README TODO

	dh_installexamples
	dh_installchangelogs

# this way we are saving few inodes and making it more user friendly
	@rm -rf debian/$(docs)/usr/share/doc/$(docs)
	@rm -rf debian/$(console)/usr/share/doc/$(console)
	@rm -rf debian/$(terminal)/usr/share/doc/$(terminal)
	@rm -rf debian/$(xwindow)/usr/share/doc/$(xwindow)
	@ln -s fte debian/$(docs)/usr/share/doc/$(docs)
	@ln -s fte debian/$(console)/usr/share/doc/$(console)
	@ln -s fte debian/$(terminal)/usr/share/doc/$(terminal)
	@ln -s fte debian/$(xwindow)/usr/share/doc/$(xwindow)

	@cp -a doc/*.html debian/$(docs)/usr/share/doc/$(docs)

	dh_installmenu
	dh_installcron
	dh_installmanpages -pfte
	dh_movefiles
	dh_strip
	dh_compress
	dh_fixperms -Xvfte
#obsoleted	dh_suidregister
	dh_shlibdeps
	dh_gencontrol
	dh_makeshlibs
	dh_installdeb
	dh_md5sums
	dh_builddeb -v

#	dpkg-shlibdeps debian/tmp/usr/X11R6/bin/xfte -drecommends debian/tmp/usr/bin/vfte debian/tmp/usr/bin/cfte
#	@dpkg-gencontrol -pfte
#	dpkg --build debian/tmp ..

checkscripts:
	@echo ":: Checking scripts"
	@bash -n debian/postrm
	@bash -n debian/postinst

# 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:
	@dh_testdir
	@echo ":: Checking ROOT user"
	@test root = "`whoami`"

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