File: local.mk

package info (click to toggle)
policycoreutils 1.22%2B0-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,260 kB
  • ctags: 314
  • sloc: ansic: 2,023; sh: 331; python: 244; makefile: 163; perl: 120
file content (115 lines) | stat: -rw-r--r-- 5,015 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
############################ -*- 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 : Sat Mar 12 19:14:26 2005
## Last Machine Used: glaurung.internal.golden-gryphon.com
## Update Count     : 20
## Status           : Unknown, Use with caution!
## HISTORY          : 
## Description      : 
## 
## arch-tag: b07b1015-30ba-4b46-915f-78c776a808f4
## 
###############################################################################

testdir:
	$(testdir)

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


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

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

build/policycoreutils:
	$(checkdir)
	$(REASON)
	$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
	touch stamp-build-policycoreutils

STAMPS_TO_CLEAN += stamp-build-policycoreutils


install/policycoreutils: testroot
	$(checkdir)
	$(REASON)
	rm -rf               $(TMPTOP)
	$(make_directory)    $(TMPTOP)
	$(make_directory)    $(BINDIR)
	$(make_directory)    $(SBINDIR)
	$(make_directory)    $(SELINUXDIR)
	$(make_directory)    $(PAMDIR)
	$(make_directory)    $(LIBDIR)
	$(make_directory)    $(INFODIR)
	$(make_directory)    $(MAN1DIR)
	$(make_directory)    $(DOCDIR)
	$(make_directory)    $(LINTIANDIR)
	echo '$(package): description-synopsis-might-not-be-phrased-properly'>> \
                             $(LINTIANDIR)/$(package)
	echo '$(package): non-standard-toplevel-dir selinux/'>> \
                             $(LINTIANDIR)/$(package)
	chmod 500	     $(SELINUXDIR)
	$(MAKE)              $(INT_INSTALL_TARGET)  DESTDIR=$(TMPTOP) \
                             INSTALL_PROGRAM="$(install_program)"
	$(install_file)      debian/run_init.pam	$(PAMDIR)/run_init
	$(install_file)      debian/newrole.pam		$(PAMDIR)/newrole
	$(install_script)    debian/se_dpkg             $(SBINDIR)
	ln -s                se_dpkg                    $(SBINDIR)/se_apt-get
	ln -s                se_dpkg                    $(SBINDIR)/se_dselect
	ln -s                se_dpkg                    $(SBINDIR)/se_dpkg-reconfigure
	ln -s                se_dpkg                    $(SBINDIR)/se_aptitude
	ln -s                se_dpkg                    $(SBINDIR)/se_synaptic
	test ! -d            $(TMPTOP)/etc/cron.weekly ||                              \
           rm -rf            $(TMPTOP)/etc/cron.weekly
	$(install_file)      debian/changelog       $(DOCDIR)/changelog.Debian
	$(install_file)      ChangeLog              $(DOCDIR)/changelog
	$(install_file)      debian/se_dpkg.8	    $(MAN8DIR)/
	echo                 ".so man8/se_dpkg.8"  >$(MAN8DIR)/se_apt-get.8
	echo                 ".so man8/se_dpkg.8"  >$(MAN8DIR)/se_aptitude.8
	echo                 ".so man8/se_dpkg.8"  >$(MAN8DIR)/se_dpkg-reconfigure.8
	echo                 ".so man8/se_dpkg.8"  >$(MAN8DIR)/se_dselect.8
	echo                 ".so man8/se_dpkg.8"  >$(MAN8DIR)/se_synaptic.8
	gzip -9frq           $(DOCDIR)/
# Make sure the copyright file is not compressed
	$(install_file)      debian/copyright       $(DOCDIR)/copyright
	gzip -9fqr            $(MANDIR)/
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
	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/policycoreutils: testroot
	$(checkdir)
	$(REASON)
	$(make_directory)    $(TMPTOP)/DEBIAN
	$(install_file)      debian/conffiles	    $(TMPTOP)/DEBIAN/
	$(install_script)    debian/postinst        $(TMPTOP)/DEBIAN/postinst
	$(install_script)    debian/preinst         $(TMPTOP)/DEBIAN/preinst 
	$(install_script)    debian/prerm           $(TMPTOP)/DEBIAN/prerm
	k=`find $(TMPTOP) -type f | ( while read i; do          \
            if file -b $$i | egrep -q "^ELF.*executable" ; then   \
                j="$$j $$i";                                     \
            fi;                                                  \
         done; echo $$j; )`; dpkg-shlibdeps $$k
	dpkg-gencontrol      -p$(package) -isp      -P$(TMPTOP)
	chown -R root:root   $(TMPTOP)
	chmod -R u+w,go=rX   $(TMPTOP)
	dpkg --build         $(TMPTOP) ..