2014-09-10 19:01:28 +00:00
|
|
|
PYTHON ?= python
|
|
|
|
|
2010-06-10 20:35:55 +00:00
|
|
|
# Installation directories.
|
2018-12-25 15:25:05 +00:00
|
|
|
LINGUAS ?= ru
|
2018-02-14 09:57:13 +00:00
|
|
|
PREFIX ?= /usr
|
|
|
|
SYSCONFDIR ?= /etc/sysconfig
|
2010-06-10 20:35:55 +00:00
|
|
|
BINDIR ?= $(PREFIX)/bin
|
|
|
|
SBINDIR ?= $(PREFIX)/sbin
|
|
|
|
MANDIR ?= $(PREFIX)/share/man
|
|
|
|
SHAREDIR ?= $(PREFIX)/share/sandbox
|
2017-04-24 17:59:56 +00:00
|
|
|
override CFLAGS += -DPACKAGE="\"policycoreutils\"" -Wall -Werror -Wextra -W
|
2017-06-20 15:16:41 +00:00
|
|
|
override LDLIBS += -lselinux -lcap-ng
|
2011-12-05 19:05:39 +00:00
|
|
|
SEUNSHARE_OBJS = seunshare.o
|
2010-06-10 20:35:55 +00:00
|
|
|
|
2011-08-15 17:56:02 +00:00
|
|
|
all: sandbox seunshare sandboxX.sh start
|
2010-06-10 20:35:55 +00:00
|
|
|
|
2011-12-05 19:05:39 +00:00
|
|
|
seunshare: $(SEUNSHARE_OBJS)
|
2010-06-10 20:35:55 +00:00
|
|
|
|
|
|
|
install: all
|
2018-02-14 09:57:13 +00: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 15:25:05 +00: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 09:57:13 +00: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
|
2010-06-10 20:35:55 +00:00
|
|
|
|
|
|
|
test:
|
2014-09-10 19:01:28 +00:00
|
|
|
@$(PYTHON) test_sandbox.py -v
|
2010-06-10 20:35:55 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -f seunshare *.o *~
|
|
|
|
|
|
|
|
indent:
|
|
|
|
../../scripts/Lindent $(wildcard *.[ch])
|
|
|
|
|
|
|
|
relabel:
|