mirror of
https://github.com/SELinuxProject/selinux
synced 2025-03-04 17:27:32 +00:00
As reported by Nicolas Iooss, there are still some inconsistencies in the definitions and usage of Makefile variables related to bin and sbin directories. Since we need to still support non-usrmerge systems, we cannot completely synchronize them, but we can eliminate unnecessary differences, remove unused variables, and drop the USRSBINDIR variables. Before: $ find . -name Makefile -exec cat {} + |grep '^[A-Z_]*BINDIR' |sort -u BINDIR=$(PREFIX)/bin BINDIR ?= $(PREFIX)/bin BINDIR ?= $(PREFIX)/sbin SBINDIR ?= $(DESTDIR)/sbin SBINDIR ?= $(PREFIX)/sbin USRSBINDIR ?= $(PREFIX)/sbin After: $ find . -name Makefile -exec cat {} + | grep '^[A-Z_]*BINDIR' | sort -u BINDIR ?= $(PREFIX)/bin SBINDIR ?= $(DESTDIR)/sbin SBINDIR ?= $(PREFIX)/sbin This does not change the actual install location of any file. It does drop the legacy symlink from /usr/sbin/load_policy to /sbin/load_policy; packagers can create that separately if desired. Reported-by: Nicolas Iooss <nicolas.iooss@m4x.org> Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
44 lines
1.1 KiB
Makefile
44 lines
1.1 KiB
Makefile
PYTHON ?= python
|
|
|
|
# Installation directories.
|
|
PREFIX ?= $(DESTDIR)/usr
|
|
SYSCONFDIR ?= $(DESTDIR)/etc/sysconfig
|
|
LIBDIR ?= $(PREFIX)/lib
|
|
BINDIR ?= $(PREFIX)/bin
|
|
DATADIR ?= $(PREFIX)/share
|
|
MANDIR ?= $(PREFIX)/share/man
|
|
LOCALEDIR ?= /usr/share/locale
|
|
BASHCOMPLETIONDIR ?= $(DESTDIR)/usr/share/bash-completion/completions
|
|
SHAREDIR ?= $(PREFIX)/share/sandbox
|
|
CFLAGS ?= -Wall -Werror -Wextra -W
|
|
override CFLAGS += -DPACKAGE="policycoreutils" -DSHARED -shared
|
|
|
|
BASHCOMPLETIONS=sepolicy-bash-completion.sh
|
|
|
|
all: python-build
|
|
|
|
python-build:
|
|
$(PYTHON) setup.py build
|
|
|
|
clean:
|
|
$(PYTHON) setup.py clean
|
|
-rm -rf build *~ \#* *pyc .#*
|
|
|
|
sepolgen:
|
|
ln -sf sepolicy sepolgen
|
|
|
|
test:
|
|
@$(PYTHON) test_sepolicy.py -v
|
|
|
|
install:
|
|
$(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
|
|
[ -d $(BINDIR) ] || mkdir -p $(BINDIR)
|
|
install -m 755 sepolicy.py $(BINDIR)/sepolicy
|
|
(cd $(BINDIR); ln -sf sepolicy sepolgen)
|
|
-mkdir -p $(MANDIR)/man8
|
|
install -m 644 *.8 $(MANDIR)/man8
|
|
-mkdir -p $(BASHCOMPLETIONDIR)
|
|
install -m 644 $(BASHCOMPLETIONS) $(BASHCOMPLETIONDIR)/sepolicy
|
|
|
|
relabel:
|