-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
79 lines (62 loc) · 2.23 KB
/
Makefile
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
TARGET?=glusterd
MODULES?=${TARGET:=.pp.bz2}
SHAREDIR?=/usr/share
SELINUXTYPE?=targeted
VERSION = 2.0.1
PACKAGE = glusterfs-selinux
distdir = $(PACKAGE)-$(VERSION)
DIST_TARGETS = dist-gzip
am__remove_distdir = \
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
all: ${TARGET:=.pp.bz2}
%.pp.bz2: %.pp
@echo Compressing $^ -\> $@
bzip2 -9 $^
%.pp: %.te
make -f ${SHAREDIR}/selinux/devel/Makefile $@
clean:
rm -f *~ *.tc *.pp *.pp.bz2
rm -rf tmp *.tar.gz
man: install-policy
sepolicy manpage --path . --domain ${TARGET}_t
install-policy: all
semodule -i ${TARGET}.pp.bz2
install:
install -D -m 644 ${TARGET}.pp.bz2 ${DESTDIR}${SHAREDIR}/selinux/packages/${SELINUXTYPE}/${TARGET}.pp.bz2
# install -D -p -m 644 ${TARGET}.if ${DESTDIR}${SHAREDIR}/selinux/devel/include/contrib/ipp-${TARGET}.if
# install -D -m 644 ${TARGET}_selinux.8 ${DESTDIR}${SHAREDIR}/man/man8/
am__tar = $${TAR-tar} chof - "$$tardir"
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
test -f "$(distdir)/glusterd.fc" || cp -p glusterd.fc "$(distdir)/glusterd.fc"
test -f "$(distdir)/glusterd.if" || cp -p glusterd.if "$(distdir)/glusterd.if"
test -f "$(distdir)/glusterd.te" || cp -p glusterd.te "$(distdir)/glusterd.te"
test -f "$(distdir)/Makefile" || cp -p Makefile "$(distdir)/Makefile"
test -f "$(distdir)/COPYING" || cp -p Makefile "$(distdir)/COPYING"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__remove_distdir)
dist dist-all:
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
$(am__remove_distdir)
prep:
$(MAKE) dist;
-mkdir -p rpmbuild/BUILD
-mkdir -p rpmbuild/SPECS
-mkdir -p rpmbuild/RPMS
-mkdir -p rpmbuild/SRPMS
-mkdir -p rpmbuild/SOURCES
-rm -rf rpmbuild/SOURCES/*
cp *.tar.gz ./rpmbuild/SOURCES
cp glusterfs-selinux.spec ./rpmbuild/SPECS
srcrpm:
rpmbuild --define '_topdir $(shell pwd)/rpmbuild' -bs rpmbuild/SPECS/glusterfs-selinux.spec
mv rpmbuild/SRPMS/* .
rpms:
rpmbuild --define '_topdir $(shell pwd)/rpmbuild' -bb rpmbuild/SPECS/glusterfs-selinux.spec
mv rpmbuild/RPMS/*/* .