[go: up one dir, main page]

File: local.mk

package info (click to toggle)
setools 2.4-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 9,680 kB
  • ctags: 8,392
  • sloc: ansic: 96,778; tcl: 21,447; yacc: 4,341; makefile: 874; lex: 304; sh: 164
file content (384 lines) | stat: -rw-r--r-- 15,536 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
############################ -*- Mode: Makefile -*- ###########################
## local.mk --- 
## Author           : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) 
## Created On       : Sat Nov 15 10:42:10 2003
## Created On Node  : glaurung.green-gryphon.com
## Last Modified By : Manoj Srivastava
## Last Modified On : Mon Nov  6 09:53:02 2006
## Last Machine Used: glaurung.internal.golden-gryphon.com
## Update Count     : 71
## Status           : Unknown, Use with caution!
## HISTORY          : 
## Description      : 
## 
## arch-tag: b07b1015-30ba-4b46-915f-78c776a808f4
## 
###############################################################################

testdir:
	$(testdir)

BUILD/setools:: build/setools
INST/setools:: install/setools
BIN/setools:: binary/setools

INST/libsefs1:: install/libsefs1
BIN/libsefs1:: binary/libsefs1

INST/libsefs-dev:: install/libsefs-dev
BIN/libsefs-dev:: binary/libsefs-dev


INST/libseaudit1:: install/libseaudit1
BIN/libseaudit1:: binary/libseaudit1

INST/libseaudit-dev:: install/libseaudit-dev
BIN/libseaudit-dev:: binary/libseaudit-dev


INST/libapol1:: install/libapol1
BIN/libapol1:: binary/libapol1

INST/libapol-dev:: install/libapol-dev
BIN/libapol-dev:: binary/libapol-dev


CLN-common::
	$(REASON)
	-test ! -f Makefile || $(MAKE) clean

CLEAN/setools::
	-rm -rf $(TMPTOP)

CLEAN/libsefs1::
	-rm -rf $(TMPTOP)
CLEAN/libsef-dev::
	-rm -rf $(TMPTOP)

CLEAN/libseaudit1::
	-rm -rf $(TMPTOP)
CLEAN/libseaudit-dev::
	-rm -rf $(TMPTOP)

CLEAN/libapol1::
	-rm -rf $(TMPTOP)
CLEAN/libapol-dev::
	-rm -rf $(TMPTOP)

build/setools:
	$(checkdir)
	$(REASON)
	$(MAKE) $(BUILD_FLAGS) all
	bash -n debian/preinst
	touch stamp-build-setools

STAMPS_TO_CLEAN += stamp-build-setools

install/setools: testroot
	$(checkdir)
	$(REASON)
	rm -rf               $(TMPTOP)
	$(make_directory)    $(TMPTOP)
	$(make_directory)    $(BINDIR)
	$(make_directory)    $(MAN1DIR)
	$(make_directory)    $(MAN8DIR)
	$(make_directory)    $(DOCDIR)
	$(make_directory)    $(ETCDIR)/$(package)
	$(MAKE)              DESTDIR=$(TMPTOP) INCLUDE_DIR=$(TMPTOP)/usr/include         \
                             INSTALL_LIBDIR=$(TMPTOP)/usr/share/$(package)               \
                             install-dirs install-apol install-awish install-secmds      \
                             install-seaudit install-sediff install-docs install-sechecker
	rm -rf               $(LIBDIR)
	$(install_file)      debian/changelog       $(DOCDIR)/changelog.Debian
	$(install_file)      ChangeLog-setools      $(DOCDIR)/changelog
	$(install_file)      README KNOWN-BUGS      $(DOCDIR)/
	gzip -9frq           $(DOCDIR)/
# Make sure the copyright file is not compressed
	$(install_file)      debian/copyright       $(DOCDIR)/copyright
	gzip -9fqr           $(MANDIR)/
	chmod 0755           $(TMPTOP)/usr/share/$(package)/apol.tcl
	(cd $(TMPTOP)/usr/share/$(package); for i in *.conf *.css; do                     \
           mv $$i $(ETCDIR)/$(package); ln -s /etc/$(package)/$$i $$i; done;)
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	find $(TMPTOP) -type f | while read i; do                                         \
           if file -b $$i | egrep -q "^ELF.*executable"; then                             \
             strip --strip-all --remove-section=.comment --remove-section=.note $$i;      \
           fi;                                                                            \
         done
endif

install/libsefs1: testroot
	$(checkdir)
	$(REASON)
	rm -rf               $(TMPTOP)
	$(make_directory)    $(TMPTOP)
	$(make_directory)    $(LIBDIR)
	$(make_directory)    $(DOCDIR)
	$(MAKE)              DESTDIR=$(TMPTOP) INCLUDE_DIR==$(TMPTOP)/usr/include         \
                             INSTALL_LIBDIR=$(TMPTOP)/usr/share/$(package) install-libsefs
	rm -f                $(LIBDIR)/*.a
	test ! -d            $(TMPTOP)$(PREFIX)/share/$(package) ||                       \
                   rm -rf    $(TMPTOP)$(PREFIX)/share/$(package)
	test ! -L            $(LIBDIR)/libsefs.so    || rm -f $(LIBDIR)/libsefs.so
	$(install_file)      debian/changelog        $(DOCDIR)/changelog.Debian
	$(install_file)      ChangeLog-setools       $(DOCDIR)/changelog
	$(install_file)      README KNOWN-BUGS       $(DOCDIR)/
	gzip -9frq           $(DOCDIR)/
# Make sure the copyright file is not compressed
	$(install_file)      debian/copyright       $(DOCDIR)/copyright
	chmod 0644 	     $(LIBDIR)/*.so.*
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	find $(TMPTOP) -type f | while read i; do					 \
	  if file -b $$i | egrep -q "^ELF.*shared object"; then				 \
	    strip --strip-unneeded --remove-section=.comment --remove-section=.note $$i; \
	  fi;										 \
	done
endif

install/libsefs-dev: testroot
	$(checkdir)
	$(REASON)
	rm -rf            $(TMPTOP)
	$(make_directory) $(TMPTOP)
	$(make_directory) $(LIBDIR)
	$(make_directory) $(DOCDIR)
	$(MAKE)           DESTDIR=$(TMPTOP) INCLUDE_DIR==$(TMPTOP)/usr/include        \
                          INSTALL_LIBDIR=$(TMPTOP)/usr/share/$(package) install-libsefs
	test ! -d            $(TMPTOP)$(PREFIX)/share/$(package) ||                       \
                   rm -rf    $(TMPTOP)$(PREFIX)/share/$(package)
	test ! -f         $(LIBDIR)/libsefs.so.1.3      || rm -f $(LIBDIR)/libsefs.so.1.3 
	test ! -L         $(LIBDIR)/libsefs.so.1        || rm -f $(LIBDIR)/libsefs.so.1
	$(install_file)   debian/changelog       	$(DOCDIR)/changelog.Debian
	$(install_file)   ChangeLog-setools      	$(DOCDIR)/changelog
	$(install_file)   README KNOWN-BUGS      	$(DOCDIR)/
	gzip -9frq        $(DOCDIR)/
# Make sure the copyright file is not compressed
	$(install_file)   debian/copyright              $(DOCDIR)/copyright
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	find $(TMPTOP) -type f | while read i; do					 \
	  if file -b $$i | egrep -q "^ELF.*shared object"; then				 \
	    strip --strip-unneeded --remove-section=.comment --remove-section=.note $$i; \
	  fi;										 \
	done
endif


install/libseaudit1: testroot
	$(checkdir)
	$(REASON)
	rm -rf               $(TMPTOP)
	$(make_directory)    $(TMPTOP)
	$(make_directory)    $(LIBDIR)
	$(make_directory)    $(DOCDIR)
	$(MAKE)              DESTDIR=$(TMPTOP) INCLUDE_DIR==$(TMPTOP)/usr/include         \
                             INSTALL_LIBDIR=$(TMPTOP)/usr/share/$(package) install-libseaudit
	rm -f                $(LIBDIR)/*.a
	test ! -d            $(TMPTOP)$(PREFIX)/share/$(package) ||                       \
                   rm -rf    $(TMPTOP)$(PREFIX)/share/$(package)
	test ! -L            $(LIBDIR)/libseaudit.so || rm -f $(LIBDIR)/libseaudit.so
	$(install_file)      debian/changelog        $(DOCDIR)/changelog.Debian
	$(install_file)      ChangeLog-setools       $(DOCDIR)/changelog
	$(install_file)      README KNOWN-BUGS       $(DOCDIR)/
	gzip -9frq           $(DOCDIR)/
# Make sure the copyright file is not compressed
	$(install_file)      debian/copyright       $(DOCDIR)/copyright
	chmod 0644 	     $(LIBDIR)/*.so.*
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	find $(TMPTOP) -type f | while read i; do					 \
	  if file -b $$i | egrep -q "^ELF.*shared object"; then				 \
	    strip --strip-unneeded --remove-section=.comment --remove-section=.note $$i; \
	  fi;										 \
	done
endif

install/libseaudit-dev: testroot
	$(checkdir)
	$(REASON)
	rm -rf            $(TMPTOP)
	$(make_directory) $(TMPTOP)
	$(make_directory) $(LIBDIR)
	$(make_directory) $(DOCDIR)
	$(MAKE)           DESTDIR=$(TMPTOP) INCLUDE_DIR==$(TMPTOP)/usr/include        \
                          INSTALL_LIBDIR=$(TMPTOP)/usr/share/$(package) install-libseaudit
	test ! -d            $(TMPTOP)$(PREFIX)/share/$(package) ||                       \
                   rm -rf    $(TMPTOP)$(PREFIX)/share/$(package)
	test ! -f         $(LIBDIR)/libseaudit.so.1.2.7 || rm -f $(LIBDIR)/libseaudit.so.1.2.7
	test ! -L         $(LIBDIR)/libseaudit.so.1     || rm -f $(LIBDIR)/libseaudit.so.1
	$(install_file)   debian/changelog       	$(DOCDIR)/changelog.Debian
	$(install_file)   ChangeLog-setools      	$(DOCDIR)/changelog
	$(install_file)   README KNOWN-BUGS      	$(DOCDIR)/
	gzip -9frq        $(DOCDIR)/
# Make sure the copyright file is not compressed
	$(install_file)   debian/copyright              $(DOCDIR)/copyright
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	find $(TMPTOP) -type f | while read i; do					 \
	  if file -b $$i | egrep -q "^ELF.*shared object"; then				 \
	    strip --strip-unneeded --remove-section=.comment --remove-section=.note $$i; \
	  fi;										 \
	done
endif


install/libapol1: testroot
	$(checkdir)
	$(REASON)
	rm -rf               $(TMPTOP)
	$(make_directory)    $(TMPTOP)
	$(make_directory)    $(LIBDIR)
	$(make_directory)    $(DOCDIR)
	$(MAKE)              DESTDIR=$(TMPTOP) INCLUDE_DIR==$(TMPTOP)/usr/include         \
                             INSTALL_LIBDIR=$(TMPTOP)/usr/share/$(package) install-libapol
	rm -f                $(LIBDIR)/*.a
	test ! -d            $(TMPTOP)$(PREFIX)/share/$(package) ||                       \
                   rm -rf    $(TMPTOP)$(PREFIX)/share/$(package)
	test ! -L            $(LIBDIR)/libapol.so    || rm -f $(LIBDIR)/libapol.so
	$(install_file)      debian/changelog        $(DOCDIR)/changelog.Debian
	$(install_file)      ChangeLog-setools       $(DOCDIR)/changelog
	$(install_file)      README KNOWN-BUGS       $(DOCDIR)/
	gzip -9frq           $(DOCDIR)/
# Make sure the copyright file is not compressed
	$(install_file)      debian/copyright       $(DOCDIR)/copyright
	chmod 0644 	     $(LIBDIR)/*.so.*
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	find $(TMPTOP) -type f | while read i; do					 \
	  if file -b $$i | egrep -q "^ELF.*shared object"; then				 \
	    strip --strip-unneeded --remove-section=.comment --remove-section=.note $$i; \
	  fi;										 \
	done
endif

install/libapol-dev: testroot
	$(checkdir)
	$(REASON)
	rm -rf            $(TMPTOP)
	$(make_directory) $(TMPTOP)
	$(make_directory) $(LIBDIR)
	$(make_directory) $(DOCDIR)
	$(MAKE)           DESTDIR=$(TMPTOP) INCLUDE_DIR==$(TMPTOP)/usr/include        \
                          INSTALL_LIBDIR=$(TMPTOP)/usr/share/$(package) install-libapol
	test ! -f         $(LIBDIR)/libapol.so.2.4      || rm -f $(LIBDIR)/libapol.so.2.4
	test ! -L         $(LIBDIR)/libapol.so.1        || rm -f $(LIBDIR)/libapol.so.1
	test ! -d         $(TMPTOP)$(PREFIX)/share/$(package) ||                       \
                   rm -rf $(TMPTOP)$(PREFIX)/share/$(package)   
	$(install_file)   debian/changelog       	$(DOCDIR)/changelog.Debian
	$(install_file)   ChangeLog-setools      	$(DOCDIR)/changelog
	$(install_file)   README KNOWN-BUGS      	$(DOCDIR)/
	gzip -9frq        $(DOCDIR)/
# Make sure the copyright file is not compressed
	$(install_file)   debian/copyright              $(DOCDIR)/copyright
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	find $(TMPTOP) -type f | while read i; do					 \
	  if file -b $$i | egrep -q "^ELF.*shared object"; then				 \
	    strip --strip-unneeded --remove-section=.comment --remove-section=.note $$i; \
	  fi;										 \
	done
endif


binary/setools: testroot
	$(checkdir)
	$(REASON)
	$(make_directory)    $(TMPTOP)/DEBIAN
	$(install_file)      debian/conffiles        $(TMPTOP)/DEBIAN/
	$(install_program)   debian/preinst          $(TMPTOP)/DEBIAN/
	k=`find $(TMPTOP) -type f | ( while read i; do          \
            if file -b $$i | egrep -q "^ELF.*executable.*dynamically linked" ; then   \
                j="$$j $$i";                                     \
            fi;                                                  \
         done; echo $$j; )`; if [ -n "$$k" ]; then dpkg-shlibdeps $$k; fi
	dpkg-gencontrol      -p$(package) -isp      -P$(TMPTOP)
	$(create_md5sum)     $(TMPTOP)
	chown -R root:root   $(TMPTOP)
	chmod -R u+w,go=rX   $(TMPTOP)
	dpkg --build         $(TMPTOP) ..

binary/libsefs1: testroot
	$(checkdir)
	$(REASON)
	$(make_directory)                                       $(TMPTOP)/DEBIAN
	$(install_file)	                 debian/libsefs1.shlibs $(TMPTOP)/DEBIAN/shlibs 
	sed -e 's/%REPLACEME%/$(package)/g' < debian/postrm   > $(TMPTOP)/DEBIAN/postrm
	sed -e 's/%REPLACEME%/$(package)/g' < debian/postinst > $(TMPTOP)/DEBIAN/postinst
	chmod 0755                                              $(TMPTOP)/DEBIAN/postrm
	chmod 0755                                              $(TMPTOP)/DEBIAN/postinst
	k=`find $(TMPTOP) -type f | ( while read i; do		 \
	    if file -b $$i | egrep -q "^ELF.*shared object"; then	 \
	      j="$$j $$i";					 \
	    fi;							 \
	   done; echo $$j; )`; if [ -n "$$k" ]; then dpkg-shlibdeps $$k; fi
	dpkg-gencontrol	     -p$(package) -isp	     -P$(TMPTOP)
	$(create_md5sum)     $(TMPTOP)
	chown -R root:root   $(TMPTOP)
	chmod -R u+w,go=rX   $(TMPTOP)
	dpkg --build	     $(TMPTOP) ..

binary/libsefs-dev: testroot
	$(checkdir)
	$(REASON)
	$(make_directory)    $(TMPTOP)/DEBIAN
	dpkg-gencontrol	     -p$(package) -isp	     -P$(TMPTOP)
	$(create_md5sum)     $(TMPTOP)
	chown -R root:root   $(TMPTOP)
	chmod -R u+w,go=rX   $(TMPTOP)
	dpkg --build	     $(TMPTOP) ..


binary/libseaudit1: testroot
	$(checkdir)
	$(REASON)
	$(make_directory)                                       $(TMPTOP)/DEBIAN
	$(install_file)	              debian/libseaudit1.shlibs $(TMPTOP)/DEBIAN/shlibs
	sed -e 's/%REPLACEME%/$(package)/g' < debian/postrm   > $(TMPTOP)/DEBIAN/postrm
	sed -e 's/%REPLACEME%/$(package)/g' < debian/postinst > $(TMPTOP)/DEBIAN/postinst
	chmod 0755                                              $(TMPTOP)/DEBIAN/postrm
	chmod 0755                                              $(TMPTOP)/DEBIAN/postinst
	k=`find $(TMPTOP) -type f | ( while read i; do		 \
	    if file -b $$i | egrep -q "^ELF.*shared object"; then	 \
	      j="$$j $$i";					 \
	    fi;							 \
	   done; echo $$j; )`; if [ -n "$$k" ]; then dpkg-shlibdeps $$k; fi
	dpkg-gencontrol	     -p$(package) -isp	     -P$(TMPTOP)
	$(create_md5sum)     $(TMPTOP)
	chown -R root:root   $(TMPTOP)
	chmod -R u+w,go=rX   $(TMPTOP)
	dpkg --build	     $(TMPTOP) ..

binary/libseaudit-dev: testroot
	$(checkdir)
	$(REASON)
	$(make_directory)    $(TMPTOP)/DEBIAN
	dpkg-gencontrol	     -p$(package) -isp	     -P$(TMPTOP)
	$(create_md5sum)     $(TMPTOP)
	chown -R root:root   $(TMPTOP)
	chmod -R u+w,go=rX   $(TMPTOP)
	dpkg --build	     $(TMPTOP) ..

binary/libapol1: testroot
	$(checkdir)
	$(REASON)
	$(make_directory)                                       $(TMPTOP)/DEBIAN
	$(install_file)	                 debian/libapol1.shlibs $(TMPTOP)/DEBIAN/shlibs
	sed -e 's/%REPLACEME%/$(package)/g' < debian/postrm   > $(TMPTOP)/DEBIAN/postrm
	sed -e 's/%REPLACEME%/$(package)/g' < debian/postinst > $(TMPTOP)/DEBIAN/postinst
	chmod 0755                                              $(TMPTOP)/DEBIAN/postrm
	chmod 0755                                              $(TMPTOP)/DEBIAN/postinst
	k=`find $(TMPTOP) -type f | ( while read i; do		 \
	    if file -b $$i | egrep -q "^ELF.*shared object"; then	 \
	      j="$$j $$i";					 \
	    fi;							 \
	   done; echo $$j; )`; if [ -n "$$k" ]; then dpkg-shlibdeps $$k; fi
	dpkg-gencontrol	     -p$(package) -isp	     -P$(TMPTOP)
	$(create_md5sum)     $(TMPTOP)
	chown -R root:root   $(TMPTOP)
	chmod -R u+w,go=rX   $(TMPTOP)
	dpkg --build	     $(TMPTOP) ..

binary/libapol-dev: testroot
	$(checkdir)
	$(REASON)
	$(make_directory)    $(TMPTOP)/DEBIAN
	dpkg-gencontrol	     -p$(package) -isp	     -P$(TMPTOP)
	$(create_md5sum)     $(TMPTOP)
	chown -R root:root   $(TMPTOP)
	chmod -R u+w,go=rX   $(TMPTOP)
	dpkg --build	     $(TMPTOP) ..