File: local.mk

package info (click to toggle)
libsemanage 1.8-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,556 kB
  • ctags: 2,120
  • sloc: ansic: 21,308; python: 1,242; yacc: 270; sh: 191; makefile: 136; lex: 70
file content (203 lines) | stat: -rw-r--r-- 8,732 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
############################ -*- 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 : Tue Sep  5 22:31:49 2006
## Last Machine Used: glaurung.internal.golden-gryphon.com
## Update Count     : 57
## Status           : Unknown, Use with caution!
## HISTORY          : 
## Description      : 
## 
## arch-tag: b07b1015-30ba-4b46-915f-78c776a808f4
## 
###############################################################################

testdir:
	$(testdir)

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

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

INST/python-semanage:: install/python-semanage
BIN/python-semanage:: binary/python-semanage


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

CLEAN/libsemanage1-dev::
	test ! -d $(TMPTOP) || rm -rf $(TMPTOP)

CLEAN/libsemanage1::
	test ! -d $(TMPTOP) || rm -rf $(TMPTOP)

CLEAN/python-semanage::
	test ! -d $(TMPTOP) || rm -rf $(TMPTOP)

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

STAMPS_TO_CLEAN += stamp-build-libsemanage

install/libsemanage1: testroot
	$(checkdir)
	$(REASON)
	rm -rf		    $(TMPTOP)
	$(make_directory)   $(TMPTOP)
	$(make_directory)   $(DOCDIR)
	$(make_directory)   $(LIBDIR)
	$(MAKE)		    DESTDIR=$(TMPTOP)  -C src  install
	rm -rf              $(LIBDIR)
	chmod 0644          $(TMPTOP)/lib/libsemanage.so.1
	$(install_file)	    debian/changelog	     $(DOCDIR)/changelog.Debian
	$(install_file)	    ChangeLog		     $(DOCDIR)/changelog
	gzip -9fqr	    $(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/libsemanage1-dev: testroot
	$(checkdir)
	$(REASON)
	rm -rf		    $(TMPTOP)
	$(make_directory)   $(TMPTOP)
	$(make_directory)   $(DOCDIR)
	$(make_directory)   $(LIBDIR)
	$(make_directory)   $(INCDIR)
	$(make_directory)   $(ETCDIR)
	$(MAKE)		    DESTDIR=$(TMPTOP)        install
	mv	            $(ETCDIR)/semanage.conf  $(DOCDIR)/
	rm -rf              $(TMPTOP)/etc
	rm -rf              $(TMPTOP)/lib
	rm -f               $(LIBDIR)/libsemanage.so
	ln -s               /lib/libsemanage.so.1    $(LIBDIR)/libsemanage.so
	$(install_file)	    debian/changelog	     $(DOCDIR)/changelog.Debian
	$(install_file)	    ChangeLog		     $(DOCDIR)/changelog
	gzip -9fqr	    $(DOCDIR)/
	gzip -9fqr	    $(MANDIR)/
# 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.*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


install/python-semanage: testroot
	$(checkdir)
	$(REASON)
	rm -rf		    $(TMPTOP)
	$(make_directory)   $(TMPTOP)
	$(make_directory)   $(DOCDIR)
	$(make_directory)   $(LIBDIR)
	$(make_directory)   $(PY_SUPPORT_DIR)
	$(make_directory)   $(MODULES_DIR)
	$(make_directory)   $(EXTENSIONS_DIR)
	for version in $(ALL_PY_VERSIONS); do                          \
          rm -f             src/$(SWIGSO) src/$(SWIGLOBJ);             \
	  test -d $(EXTENSIONS_DIR)/python$$version ||                 \
            mkdir -p $(EXTENSIONS_DIR)/python$$version/site-packages;  \
          $(MAKE) -C src DESTDIR=$(TMPTOP) PYLIBVER=python$$version    \
                  PYLIBDIR=$(EXTENSIONS_DIR)/python$$version           \
                  pywrap install-pywrap;                               \
          chmod -x $(EXTENSIONS_DIR)/python$$version/site-packages/*;  \
          mv -f $(EXTENSIONS_DIR)/python$$version/site-packages/*.py   \
                $(MODULES_DIR)/;                                       \
          mv -f $(EXTENSIONS_DIR)/python$$version/site-packages/*      \
                $(EXTENSIONS_DIR)/python$$version/;                    \
	  rmdir $(EXTENSIONS_DIR)/python$$version/site-packages;       \
          if [ -z "$$versions" ]; then versions="$$version";           \
          else             versions="$$versions,$$version";            \
          fi;                                                          \
        done; echo "$$versions" > $(MODULES_DIR)/.version
	$(install_file)	    debian/changelog	     $(DOCDIR)/changelog.Debian
	$(install_file)	    ChangeLog		     $(DOCDIR)/changelog
	gzip -9fqr	    $(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/libsemanage1: testroot
	$(checkdir)
	$(REASON)
	$(make_directory)    $(TMPTOP)/DEBIAN
	$(install_script)    debian/postrm           $(TMPTOP)/DEBIAN/postrm
	$(install_script)    debian/postinst         $(TMPTOP)/DEBIAN/postinst
	$(install_file)      debian/shlibs           $(TMPTOP)/DEBIAN
	$(install_file)      debian/conffiles        $(TMPTOP)/DEBIAN
	k=`find $(TMPTOP) -type f | ( while read i; do          \
            if file -b $$i | egrep -q "^ELF.*"; then   \
                j="$$j $$i";                                     \
            fi;                                                  \
         done; echo $$j; )`; dpkg-shlibdeps $$k
	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/python-semanage: testroot
	$(checkdir)
	$(REASON)
	$(make_directory)    $(TMPTOP)/DEBIAN
	$(install_script)    debian/python_prerm             $(TMPTOP)/DEBIAN/prerm
	$(install_script)    debian/python_postinst          $(TMPTOP)/DEBIAN/postinst
	k=`find $(TMPTOP) -type f | ( while read i; do          \
            if file -b $$i | egrep -q "^ELF.*"; then   \
                j="$$j $$i";                                     \
            fi;                                                  \
         done; echo $$j; )`; dpkg-shlibdeps $$k
	if dpkg --compare-versions $(MIN_PY_VERSIONS) le $(PYDEFAULT); then              \
          echo 'python:Depends=python (>= $(MIN_PY_VERSIONS)), python (<< $(STOP_VERSION))'  >>  debian/substvars;     \
        else                                                                             \
          echo 'python:Depends=python (>= $(MIN_PY_VERSIONS)) | python$(MIN_PY_VERSIONS), python (<< $(STOP_VERSION))'\
                                                                  >>  debian/substvars;   \
        fi
	echo 'python:Provides=$(PY_PROVIDES)'                 >> debian/substvars
	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/libsemanage1-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) ..