File: rules

package info (click to toggle)
shapetools 1.4pl6-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 3,676 kB
  • ctags: 4,637
  • sloc: ansic: 39,064; makefile: 4,011; sh: 1,269; lisp: 773; sed: 55; awk: 10
file content (177 lines) | stat: -rwxr-xr-x 4,663 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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
#! /usr/bin/make -f
# -*- mode: makefile -*-
# Made with the iad of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Also some stuff taken from debmake scripts, by Cristopt Lameter.

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

p_shape		= shapetools
p_atfs		= atfs
p_atfsdev	= atfs-dev

d		= debian/tmp
d_shape		= $(d)
d_atfs		= debian/$(p_atfs)
d_atfsdev	= debian/$(p_atfsdev)

dirs_shape = \
	usr/doc/$(p_shape) \
	usr/bin \
	usr/lib/shape \
	usr/include \
	usr/man/{man1,man3,man5,man7}
files_shape = \
	usr/bin/{lastrelease,sfind,shape} \
	usr/man/man1/{lastrelease,sfind,shape} \
	usr/lib/shape/*

dirs_atfs = \
	usr/doc/$(p_atfs) \
	usr/lib/shape \
	usr/man/{man1,man5,man7}
files_atfs = \
	usr/bin/{vbind,vcat,vdiff,v*grep,vfind,vl,vlog,vp} \
	usr/bin/{retrv,Save,save,vsave} \
	usr/bin/{accs,frze,publ,sbmt,vadm,vattr,vrm} \
	usr/bin/{atfsit,atfsrepair,cacheadm,cphist,mkatfs,rmhist} \
	usr/bin/{rcs2atfs,utime} \
	usr/man/man1/{vbind,vcat,vdiff,v*grep,vfind,vl,vlog,vp}.1 \
	usr/man/man1/{retrv,Save,save,vsave}.1 \
	usr/man/man1/{accs,frze,publ,sbmt,vadm,vattr,vrm}.1 \
	usr/man/man1/{atfsit,atfsrepair,cacheadm,mkatfs}.1 \
	usr/man/man1/{rcs2atfs,utime}.1 \
	usr/lib/lib*.so.* \
	usr/lib/shape/BindRules \
	usr/man/man7/bindrules.7

dirs_atfsdev = \
	usr/doc/$(p_atfsdev) \
	usr/lib \
	usr/include \
	usr/man/man3
files_atfsdev = \
	usr/lib/lib*.a \
	usr/lib/lib*.so \
	usr/include/* \
	usr/man/man3

v_atfs	= 1.71
v_atfstk= 7.0
v_sttk	= 1.7

CC := $(shell if [ -x /usr/bin/egcc ]; then echo egcc; else echo cc; fi)
PWD := $(shell pwd)

build: build-stamp build-grep-stamp
build-stamp:
	dh_testdir
	rm -f build-stamp
	-chmod a+x configure
	CC=$(CC) ./configure --prefix=/usr --enable-shared
	$(MAKE)
	touch build-stamp

build-grep-stamp:
	dh_testdir
	rm -f build-grep-stamp
	cd vgrep-2.0 && CC=$(CC) ./configure --prefix/usr
	$(MAKE) -C vgrep-2.0 SHAPETOOLS=$(PWD)
	touch build-grep-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f *-stamp
	-$(MAKE) clean
	-$(MAKE) doclean
	-$(MAKE) -C vgrep-2.0 -f Makefile.in distclean
	rm -f config.{cache,log,status}
	-find src -name '*.so*' | xargs rm -f
	dh_clean

install: install-stamp first-move-stamp
install-stamp: build-stamp build-grep-stamp
	dh_testversion 1.1.15
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs -p$(p_shape) $(dirs_shape)
	dh_installdirs -p$(p_atfs) $(dirs_atfs)
	dh_installdirs -p$(p_atfsdev) $(dirs_atfsdev)
	$(MAKE) install INSTALLBASE=$(PWD)/$(d)/usr
	( \
	  cd $(d)/usr/man/man1; \
	  ln -s save.1 Save.1; \
	  ln -s save.1 vsave.1; \
	  rm -f vlog.1 vcat.1; \
	  ln -s vl.1 vlog.1; \
	  ln -s retrv.1 vcat.1; \
	  for i in accs frze publ sbmt vattr vrm; do \
	    rm -f $$i.1; \
	    ln -s vadm.1 $$i.1; \
	  done; \
	)
	cp debian/vp.1 $(d)/usr/man/man1/
	chmod a-x $(d)/usr/lib/lib*.a
	$(MAKE) -C vgrep-2.0 install prefix=$(PWD)/$(d)/usr
	mv $(d)/usr/man/man1/grep.1 $(d)/usr/man/man1/vgrep.1
	ln -s vgrep.1 $(d)/usr/man/man1/vegrep.1
	ln -s vgrep.1 $(d)/usr/man/man1/vfgrep.1
	touch install-stamp

first-move-stamp: install-stamp
	dh_testversion 1.1.15
	dh_testdir
	dh_testroot
	rm -f install-stamp
	dh_movefiles -p$(p_atfs) $(files_atfs)
	dh_movefiles -p$(p_atfsdev) $(files_atfsdev)
	touch first-move-stamp

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
#	dh_testversion
	dh_testdir
	dh_testroot

	dh_installdocs -a Questionnaire README SUPPORT TODO
#	dh_installexamples
#	dh_installmenu
#	dh_installinit
#	dh_installcron
#	dh_installmanpages
	dh_undocumented -p$(p_shape) lastrelease.1
	dh_undocumented -p$(p_atfs) cphist.1 rmhist.1
	dh_installchangelogs -a CHANGES-1.4
	dh_strip -a -X.a
	dh_compress -a
	dh_fixperms -a
	dh_suidregister -a
	rm -f debian/$(p_atfs).shlibs
	echo "libAtFS $(shell echo $(v_atfs) | cut -d . -f 1) $(p_atfs)" \
		>> debian/$(p_atfs).shlibs
	echo "libAtFStk $(shell echo $(v_atfstk) | cut -d . -f 1) $(p_atfs)" \
		>> debian/$(p_atfs).shlibs
	echo "libsttk $(shell echo $(v_sttk) | cut -d . -f 1) $(p_atfs)" \
		>> debian/$(p_atfs).shlibs
	dh_shlibdeps -a
	sed -e 's/[, 	]*$(p_atfs)[, 	]*//' debian/$(p_atfs).substvars \
		> debian/$(p_atfs).substvars.new
	mv -f debian/$(p_atfs).substvars.new debian/$(p_atfs).substvars
	dh_installdeb -a
	dh_gencontrol -a
#	dh_makeshlibs
	dh_md5sums -a
	dh_builddeb -a

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

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