• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1PYTHON ?= python
2
3# Installation directories.
4PREFIX ?= $(DESTDIR)/usr
5SYSCONFDIR ?= $(DESTDIR)/etc/sysconfig
6LIBDIR ?= $(PREFIX)/lib
7BINDIR ?= $(PREFIX)/bin
8SBINDIR ?= $(PREFIX)/sbin
9DATADIR ?= $(PREFIX)/share
10MANDIR ?= $(PREFIX)/share/man
11LOCALEDIR ?= /usr/share/locale
12BASHCOMPLETIONDIR ?= $(DESTDIR)/usr/share/bash-completion/completions
13SHAREDIR ?= $(PREFIX)/share/sandbox
14CFLAGS ?= -Wall -Werror -Wextra -W
15override CFLAGS += -DPACKAGE="policycoreutils" -DSHARED -shared
16
17BASHCOMPLETIONS=sepolicy-bash-completion.sh
18
19all: python-build
20
21python-build:
22	$(PYTHON) setup.py build
23
24clean:
25	$(PYTHON) setup.py clean
26	-rm -rf build *~ \#* *pyc .#*
27
28sepolgen:
29	ln -sf sepolicy sepolgen
30
31test:
32	@$(PYTHON) test_sepolicy.py -v
33
34install:
35	$(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
36	[ -d $(BINDIR) ] || mkdir -p $(BINDIR)
37	install -m 755 sepolicy.py $(BINDIR)/sepolicy
38	(cd $(BINDIR); ln -sf sepolicy sepolgen)
39	-mkdir -p $(MANDIR)/man8
40	install -m 644 *.8 $(MANDIR)/man8
41	-mkdir -p $(BASHCOMPLETIONDIR)
42	install -m 644 $(BASHCOMPLETIONS) $(BASHCOMPLETIONDIR)/sepolicy
43
44relabel:
45