2019-02-18 17:27:44 +01:00
|
|
|
PYTHON ?= python3
|
2014-09-10 21:01:28 +02:00
|
|
|
|
2010-06-10 22:35:55 +02:00
|
|
|
# Installation directories.
|
2018-12-25 16:25:05 +01:00
|
|
|
LINGUAS ?= ru
|
2018-02-14 10:57:13 +01:00
|
|
|
PREFIX ?= /usr
|
|
|
|
SYSCONFDIR ?= /etc/sysconfig
|
2010-06-10 22:35:55 +02:00
|
|
|
BINDIR ?= $(PREFIX)/bin
|
|
|
|
SBINDIR ?= $(PREFIX)/sbin
|
|
|
|
MANDIR ?= $(PREFIX)/share/man
|
|
|
|
SHAREDIR ?= $(PREFIX)/share/sandbox
|
2017-04-24 19:59:56 +02:00
|
|
|
override CFLAGS += -DPACKAGE="\"policycoreutils\"" -Wall -Werror -Wextra -W
|
2017-06-20 17:16:41 +02:00
|
|
|
override LDLIBS += -lselinux -lcap-ng
|
2011-12-05 20:05:39 +01:00
|
|
|
SEUNSHARE_OBJS = seunshare.o
|
2010-06-10 22:35:55 +02:00
|
|
|
|
2011-08-15 19:56:02 +02:00
|
|
|
all: sandbox seunshare sandboxX.sh start
|
2022-04-01 11:57:24 +02:00
|
|
|
(cd po && $(MAKE) $@)
|
2010-06-10 22:35:55 +02:00
|
|
|
|
2011-12-05 20:05:39 +01:00
|
|
|
seunshare: $(SEUNSHARE_OBJS)
|
2010-06-10 22:35:55 +02:00
|
|
|
|
|
|
|
install: all
|
2018-02-14 10:57:13 +01:00
|
|
|
-mkdir -p $(DESTDIR)$(BINDIR)
|
|
|
|
install -m 755 sandbox $(DESTDIR)$(BINDIR)
|
|
|
|
-mkdir -p $(DESTDIR)$(MANDIR)/man8
|
|
|
|
install -m 644 sandbox.8 $(DESTDIR)$(MANDIR)/man8/
|
|
|
|
install -m 644 seunshare.8 $(DESTDIR)$(MANDIR)/man8/
|
|
|
|
-mkdir -p $(DESTDIR)$(MANDIR)/man5
|
|
|
|
install -m 644 sandbox.5 $(DESTDIR)$(MANDIR)/man5/
|
2018-12-25 16:25:05 +01:00
|
|
|
for lang in $(LINGUAS) ; do \
|
|
|
|
if [ -e $${lang} ] ; then \
|
|
|
|
mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man5 ; \
|
|
|
|
mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man8 ; \
|
|
|
|
install -m 644 $${lang}/*.5 $(DESTDIR)$(MANDIR)/$${lang}/man5/ ; \
|
|
|
|
install -m 644 $${lang}/*.8 $(DESTDIR)$(MANDIR)/$${lang}/man8/ ; \
|
|
|
|
fi ; \
|
|
|
|
done
|
2018-02-14 10:57:13 +01:00
|
|
|
-mkdir -p $(DESTDIR)$(SBINDIR)
|
|
|
|
install -m 4755 seunshare $(DESTDIR)$(SBINDIR)/
|
|
|
|
-mkdir -p $(DESTDIR)$(SHAREDIR)
|
|
|
|
install -m 755 sandboxX.sh $(DESTDIR)$(SHAREDIR)
|
|
|
|
install -m 755 start $(DESTDIR)$(SHAREDIR)
|
|
|
|
-mkdir -p $(DESTDIR)$(SYSCONFDIR)
|
|
|
|
install -m 644 sandbox.conf $(DESTDIR)$(SYSCONFDIR)/sandbox
|
2022-04-01 11:57:24 +02:00
|
|
|
(cd po && $(MAKE) $@)
|
2010-06-10 22:35:55 +02:00
|
|
|
|
|
|
|
test:
|
2014-09-10 21:01:28 +02:00
|
|
|
@$(PYTHON) test_sandbox.py -v
|
2010-06-10 22:35:55 +02:00
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f seunshare *.o *~
|
2022-04-01 11:57:24 +02:00
|
|
|
(cd po && $(MAKE) $@)
|
2010-06-10 22:35:55 +02:00
|
|
|
|
|
|
|
indent:
|
|
|
|
../../scripts/Lindent $(wildcard *.[ch])
|
|
|
|
|
|
|
|
relabel:
|