2014-09-10 19:01:28 +00:00
|
|
|
PYTHON ?= python
|
|
|
|
|
2013-01-11 19:23:09 +00:00
|
|
|
# Installation directories.
|
|
|
|
PREFIX ?= $(DESTDIR)/usr
|
|
|
|
SYSCONFDIR ?= $(DESTDIR)/etc/sysconfig
|
|
|
|
LIBDIR ?= $(PREFIX)/lib
|
|
|
|
BINDIR ?= $(PREFIX)/bin
|
|
|
|
SBINDIR ?= $(PREFIX)/sbin
|
2013-10-11 14:16:57 +00:00
|
|
|
DATADIR ?= $(PREFIX)/share
|
2013-01-11 19:23:09 +00:00
|
|
|
MANDIR ?= $(PREFIX)/share/man
|
|
|
|
LOCALEDIR ?= /usr/share/locale
|
2013-10-11 14:16:57 +00:00
|
|
|
BASHCOMPLETIONDIR ?= $(DESTDIR)/usr/share/bash-completion/completions
|
2013-01-11 19:23:09 +00:00
|
|
|
SHAREDIR ?= $(PREFIX)/share/sandbox
|
2016-02-05 20:55:50 +00:00
|
|
|
CFLAGS ?= -Wall -Werror -Wextra -W
|
|
|
|
override CFLAGS += -I$(PREFIX)/include -DPACKAGE="policycoreutils" -DSHARED -shared
|
2013-01-11 19:23:09 +00:00
|
|
|
|
2013-10-11 12:33:47 +00:00
|
|
|
BASHCOMPLETIONS=sepolicy-bash-completion.sh
|
2013-01-11 19:23:09 +00:00
|
|
|
|
|
|
|
all: python-build
|
|
|
|
|
2016-09-23 03:12:13 +00:00
|
|
|
python-build:
|
2013-01-11 19:23:09 +00:00
|
|
|
$(PYTHON) setup.py build
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(PYTHON) setup.py clean
|
|
|
|
-rm -rf build *~ \#* *pyc .#*
|
|
|
|
|
2013-10-11 14:16:57 +00:00
|
|
|
sepolgen:
|
|
|
|
ln -sf sepolicy sepolgen
|
|
|
|
|
2013-10-11 13:55:35 +00:00
|
|
|
test:
|
2014-09-10 19:01:28 +00:00
|
|
|
@$(PYTHON) test_sepolicy.py -v
|
2013-10-11 13:55:35 +00:00
|
|
|
|
2013-01-11 19:23:09 +00:00
|
|
|
install:
|
|
|
|
$(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
|
|
|
|
[ -d $(BINDIR) ] || mkdir -p $(BINDIR)
|
|
|
|
install -m 755 sepolicy.py $(BINDIR)/sepolicy
|
2013-10-11 14:16:57 +00:00
|
|
|
(cd $(BINDIR); ln -sf sepolicy sepolgen)
|
2013-01-11 19:23:09 +00:00
|
|
|
-mkdir -p $(MANDIR)/man8
|
|
|
|
install -m 644 *.8 $(MANDIR)/man8
|
|
|
|
-mkdir -p $(BASHCOMPLETIONDIR)
|
2013-10-11 14:16:57 +00:00
|
|
|
install -m 644 $(BASHCOMPLETIONS) $(BASHCOMPLETIONDIR)/sepolicy
|
2013-10-23 16:43:15 +00:00
|
|
|
|
|
|
|
relabel:
|