File: local.mk

package info (click to toggle)
policycoreutils 2.0.49-8
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,024 kB
  • ctags: 677
  • sloc: ansic: 5,535; python: 2,125; sh: 452; makefile: 436
file content (146 lines) | stat: -rw-r--r-- 6,894 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
############################ -*- 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 : Wed Apr  2 23:02:24 2008
## Last Machine Used: anzu.internal.golden-gryphon.com
## Update Count     : 33
## Status           : Unknown, Use with caution!
## HISTORY          : 
## Description      : 
## 
## arch-tag: b07b1015-30ba-4b46-915f-78c776a808f4
## 
###############################################################################

testdir:
	$(testdir)

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


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

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

debian/stamp/build/policycoreutils:
	$(checkdir)
	$(REASON)
	@test -d debian/stamp/build || mkdir -p debian/stamp/build
	bash -n debian/preinst
	bash -n debian/postinst
	bash -n debian/prerm
	bash -n debian/postrm
	$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" PYLIBVER=$(PYDEFAULT) \
	    PYTHONLIBDIR=$(MODULES_DIR)
	@echo done > $@


debian/stamp/install/policycoreutils:
	$(checkdir)
	$(REASON)
	$(TESTROOT)
	@test -d debian/stamp/install || mkdir -p debian/stamp/install
	rm -rf               $(TMPTOP)
	$(make_directory)    $(TMPTOP)
	$(make_directory)    $(BINDIR)
	$(make_directory)    $(SBINDIR)
	$(make_directory)    $(SELINUXDIR)
	$(make_directory)    $(PAMDIR)
	$(make_directory)    $(MODULES_DIR)
	$(make_directory)    $(MAN1DIR)
	$(make_directory)    $(DOCDIR)
	$(make_directory)    $(LINTIANDIR)
	$(make_directory)    $(TMPTOP)/etc/selinux
	echo '$(package): description-synopsis-might-not-be-phrased-properly'>> \
                             $(LINTIANDIR)/$(package)
	echo '$(package): non-standard-toplevel-dir selinux/'>> \
                             $(LINTIANDIR)/$(package)
	echo '$(package): package-contains-empty-directory selinux/'>> \
                             $(LINTIANDIR)/$(package)
	chmod 500	     $(SELINUXDIR)
	$(MAKE)              $(INT_INSTALL_TARGET)  DESTDIR=$(TMPTOP)            \
                             INSTALL_PROGRAM="$(install_program)"                \
                             PYLIBVER=$(PYDEFAULT)  PYTHONLIBDIR=$(MODULES_DIR)
	mv -f                $(MODULES_DIR)/site-packages/*  $(MODULES_DIR)/;
	rmdir                $(MODULES_DIR)/site-packages;
	$(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/NEWS.Debian     $(DOCDIR)/NEWS.Debian 
	$(install_file)      debian/config	    $(DOCDIR)/etc_selinux_config
	$(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)/
	chmod 0755           $(TMPTOP)/etc/init.d/$(package)
	test ! -d            $(TMPTOP)/usr/share/locale/     ||                           \
                               find $(TMPTOP)/usr/share/locale/ -type d -name LC_MESSAGES \
                                  -depth -exec rmdir -p --ignore-fail-on-non-empty {} \;
	test ! -d            $(TMPTOP)/usr/lib/  ||                                       \
                               find $(TMPTOP)/usr/lib/  -type d -name LC_MESSAGES         \
                                 -depth -exec rmdir -p --ignore-fail-on-non-empty {} \;
ifneq ($(PYVERSION),$(PYDEFAULT))
	find $(TMPTOP) -type f | xargs file -N -f - \
                | sed -nr 's/^([^:]+):.*\<python\>.*\<script\>.*$$/\1/ip;' \
                | xargs sed -ri '1s/python($$| )/python$(PYVERSION)\1/;'
endif
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
	@echo done > $@

debian/stamp/binary/policycoreutils:
	$(checkdir)
	$(REASON)
	$(TESTROOT)
	@test -d debian/stamp/binary || mkdir -p debian/stamp/binary
	$(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
	$(install_script)    debian/postrm          $(TMPTOP)/DEBIAN/postrm
	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; )`; 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) ..
	@echo done > $@