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 14override CFLAGS = -I$(PREFIX)/include -DPACKAGE="policycoreutils" -Wall -Werror -Wextra -W -DSHARED -shared 15 16BASHCOMPLETIONS=sepolicy-bash-completion.sh 17 18all: python-build 19 20python-build: info.c search.c common.h policy.h policy.c 21 $(PYTHON) setup.py build 22 23clean: 24 $(PYTHON) setup.py clean 25 -rm -rf build *~ \#* *pyc .#* 26 27sepolgen: 28 ln -sf sepolicy sepolgen 29 30test: 31 @$(PYTHON) test_sepolicy.py -v 32 33install: 34 $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` 35 [ -d $(BINDIR) ] || mkdir -p $(BINDIR) 36 install -m 755 sepolicy.py $(BINDIR)/sepolicy 37 (cd $(BINDIR); ln -sf sepolicy sepolgen) 38 -mkdir -p $(MANDIR)/man8 39 install -m 644 *.8 $(MANDIR)/man8 40 -mkdir -p $(BASHCOMPLETIONDIR) 41 install -m 644 $(BASHCOMPLETIONS) $(BASHCOMPLETIONDIR)/sepolicy 42 -mkdir -p $(DESTDIR)/etc/dbus-1/system.d/ 43 install -m 644 org.selinux.conf $(DESTDIR)/etc/dbus-1/system.d/ 44 -mkdir -p $(DESTDIR)/usr/share/dbus-1/system-services 45 install -m 644 org.selinux.service $(DESTDIR)/usr/share/dbus-1/system-services 46 -mkdir -p $(DESTDIR)/usr/share/polkit-1/actions/ 47 install -m 644 org.selinux.policy $(DESTDIR)/usr/share/polkit-1/actions/ 48 -mkdir -p $(DESTDIR)/usr/share/system-config-selinux 49 install -m 755 selinux_server.py $(DESTDIR)/usr/share/system-config-selinux 50 install -m 644 *.desktop $(DATADIR)/system-config-selinux 51 -mkdir -p $(DESTDIR) $(DATADIR)/pixmaps 52 install -m 644 sepolicy_256.png $(DATADIR)/pixmaps/sepolicy.png 53 for i in 16 22 32 48 256; do \ 54 mkdir -p $(DESTDIR) $(DATADIR)/icons/hicolor/$${i}x$${i}/apps; \ 55 install -m 644 sepolicy_$${i}.png $(DATADIR)/icons/hicolor/$${i}x$${i}/apps/sepolicy.png; \ 56 done 57 58relabel: 59