2019-02-18 16:27:44 +00:00
|
|
|
PYTHON ?= python3
|
2014-09-10 19:01:28 +00:00
|
|
|
|
2013-01-11 19:23:09 +00:00
|
|
|
# Installation directories.
|
2018-12-25 15:25:05 +00:00
|
|
|
LINGUAS ?= ru
|
2018-02-14 09:57:10 +00:00
|
|
|
PREFIX ?= /usr
|
2013-01-11 19:23:09 +00:00
|
|
|
BINDIR ?= $(PREFIX)/bin
|
|
|
|
MANDIR ?= $(PREFIX)/share/man
|
2018-02-14 09:57:10 +00:00
|
|
|
BASHCOMPLETIONDIR ?= $(PREFIX)/share/bash-completion/completions
|
2016-02-05 20:55:50 +00:00
|
|
|
CFLAGS ?= -Wall -Werror -Wextra -W
|
2017-04-24 17:59:56 +00:00
|
|
|
override CFLAGS += -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:
|
2020-05-04 17:55:01 +00:00
|
|
|
$(PYTHON) setup.py install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` $(PYTHON_SETUP_ARGS)
|
2018-02-14 09:57:10 +00:00
|
|
|
[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR)
|
|
|
|
install -m 755 sepolicy.py $(DESTDIR)$(BINDIR)/sepolicy
|
|
|
|
(cd $(DESTDIR)$(BINDIR); ln -sf sepolicy sepolgen)
|
|
|
|
-mkdir -p $(DESTDIR)$(MANDIR)/man8
|
|
|
|
install -m 644 *.8 $(DESTDIR)$(MANDIR)/man8
|
2018-12-25 15:25:05 +00:00
|
|
|
for lang in $(LINGUAS) ; do \
|
|
|
|
if [ -e $${lang} ] ; then \
|
|
|
|
mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man8 ; \
|
|
|
|
install -m 644 $${lang}/*.8 $(DESTDIR)$(MANDIR)/$${lang}/man8/ ; \
|
|
|
|
fi ; \
|
|
|
|
done
|
2018-02-14 09:57:10 +00:00
|
|
|
-mkdir -p $(DESTDIR)$(BASHCOMPLETIONDIR)
|
|
|
|
install -m 644 $(BASHCOMPLETIONS) $(DESTDIR)$(BASHCOMPLETIONDIR)/sepolicy
|
2013-10-23 16:43:15 +00:00
|
|
|
|
|
|
|
relabel:
|