• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1PYTHON ?= python3
2
3# Installation directories.
4LINGUAS ?= ru
5PREFIX ?= /usr
6SYSCONFDIR ?= /etc/sysconfig
7BINDIR ?= $(PREFIX)/bin
8SBINDIR ?= $(PREFIX)/sbin
9MANDIR ?= $(PREFIX)/share/man
10SHAREDIR ?= $(PREFIX)/share/sandbox
11override CFLAGS += -DPACKAGE="\"policycoreutils\"" -Wall -Werror -Wextra -W
12override LDLIBS += -lselinux -lcap-ng
13SEUNSHARE_OBJS = seunshare.o
14
15all: sandbox seunshare sandboxX.sh start
16	(cd po && $(MAKE) $@)
17
18seunshare: $(SEUNSHARE_OBJS)
19
20install: all
21	-mkdir -p $(DESTDIR)$(BINDIR)
22	install -m 755 sandbox $(DESTDIR)$(BINDIR)
23	-mkdir -p $(DESTDIR)$(MANDIR)/man8
24	install -m 644 sandbox.8 $(DESTDIR)$(MANDIR)/man8/
25	install -m 644 seunshare.8 $(DESTDIR)$(MANDIR)/man8/
26	-mkdir -p $(DESTDIR)$(MANDIR)/man5
27	install -m 644 sandbox.5 $(DESTDIR)$(MANDIR)/man5/
28	for lang in $(LINGUAS) ; do \
29		if [ -e $${lang} ] ; then \
30			mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man5 ; \
31			mkdir -p $(DESTDIR)$(MANDIR)/$${lang}/man8 ; \
32			install -m 644 $${lang}/*.5 $(DESTDIR)$(MANDIR)/$${lang}/man5/ ; \
33			install -m 644 $${lang}/*.8 $(DESTDIR)$(MANDIR)/$${lang}/man8/ ; \
34		fi ; \
35	done
36	-mkdir -p $(DESTDIR)$(SBINDIR)
37	install -m 4755 seunshare $(DESTDIR)$(SBINDIR)/
38	-mkdir -p $(DESTDIR)$(SHAREDIR)
39	install -m 755 sandboxX.sh $(DESTDIR)$(SHAREDIR)
40	install -m 755 start $(DESTDIR)$(SHAREDIR)
41	-mkdir -p $(DESTDIR)$(SYSCONFDIR)
42	install -m 644 sandbox.conf $(DESTDIR)$(SYSCONFDIR)/sandbox
43	(cd po && $(MAKE) $@)
44
45test:
46	@$(PYTHON) test_sandbox.py -v
47
48clean:
49	-rm -f seunshare *.o *~
50	(cd po && $(MAKE) $@)
51
52indent:
53	../../scripts/Lindent $(wildcard *.[ch])
54
55relabel:
56