build-sys: Create compressed policy package files

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
Stefan Berger 2018-09-04 12:39:12 -04:00
parent b88244ebeb
commit 0f05604869
2 changed files with 11 additions and 3 deletions

1
.gitignore vendored
View File

@ -32,6 +32,7 @@ Makefile
/.pc/*
/patches/*
/include/swtpm.h
/src/selinux/*.pp.bz2
/src/selinux/swtpm.pp
/src/selinux/swtpm_svirt.fc
/src/selinux/swtpm_svirt.if

View File

@ -11,6 +11,9 @@ POLICIES = \
swtpm_svirt.pp \
swtpmcuse.pp
POLICIES_BZ2 = \
$(addsuffix .bz2,$(POLICIES))
policiesconf_DATA = \
$(POLICIES)
@ -26,10 +29,14 @@ swtpmcuse.pp_FILES = \
$(addprefix $(top_srcdir)/src/selinux/,\
swtpmcuse.te swtpmcuse.fc swtpmcuse.if)
all: $(POLICIES)
all: $(POLICIES_BZ2)
clean:
$(RM) -r tmp $(POLICIES)
$(RM) -r tmp $(POLICIES) $(POLICIES_BZ2)
%.pp.bz2: %.pp
@echo Compressing $^ -\> $@
bzip2 -f -9 $^
.SECONDEXPANSION:
%.pp : $$($$@_FILES)
@ -53,4 +60,4 @@ EXTRA_DIST = \
swtpmcuse.if \
swtpmcuse.te
CLEANFILES = *.pp
CLEANFILES = *.pp *.pp.bz2