mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-18 11:20:44 +00:00
libsepol compilation fixes for macOS.
ln on macOS doesn't support --relative, so use the gnu version by default. Also document how to build on macOS. Signed-off-by: Karl MacMillan <karlwmacmillan@gmail.com>
This commit is contained in:
parent
cdc653a447
commit
4a05e95f19
5
README
5
README
@ -17,3 +17,8 @@ make install install-pywrap relabel
|
|||||||
This may render your system unusable if the upstream SELinux userspace
|
This may render your system unusable if the upstream SELinux userspace
|
||||||
lacks library functions or other dependencies relied upon by your
|
lacks library functions or other dependencies relied upon by your
|
||||||
distribution. If it breaks, you get to keep both pieces.
|
distribution. If it breaks, you get to keep both pieces.
|
||||||
|
|
||||||
|
To install libsepol on macOS (mainly for policy analysis):
|
||||||
|
cd libsepol; make DESTDIR=/usr/local PREFIX=/usr/local install
|
||||||
|
|
||||||
|
This requires GNU coreutils (brew install coreutils).
|
||||||
|
@ -32,10 +32,12 @@ endif
|
|||||||
|
|
||||||
LD_SONAME_FLAGS=-soname,$(LIBSO),--version-script=$(LIBMAP),-z,defs
|
LD_SONAME_FLAGS=-soname,$(LIBSO),--version-script=$(LIBMAP),-z,defs
|
||||||
|
|
||||||
|
LN=ln
|
||||||
OS := $(shell uname)
|
OS := $(shell uname)
|
||||||
ifeq ($(OS), Darwin)
|
ifeq ($(OS), Darwin)
|
||||||
LD_SONAME_FLAGS=-install_name,$(LIBSO)
|
LD_SONAME_FLAGS=-install_name,$(LIBSO)
|
||||||
LDFLAGS += -undefined dynamic_lookup
|
LDFLAGS += -undefined dynamic_lookup
|
||||||
|
LN=gln
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: $(LIBA) $(LIBSO) $(LIBPC)
|
all: $(LIBA) $(LIBSO) $(LIBPC)
|
||||||
@ -84,7 +86,7 @@ install: all
|
|||||||
install -m 755 $(LIBSO) $(SHLIBDIR)
|
install -m 755 $(LIBSO) $(SHLIBDIR)
|
||||||
test -d $(LIBDIR)/pkgconfig || install -m 755 -d $(LIBDIR)/pkgconfig
|
test -d $(LIBDIR)/pkgconfig || install -m 755 -d $(LIBDIR)/pkgconfig
|
||||||
install -m 644 $(LIBPC) $(LIBDIR)/pkgconfig
|
install -m 644 $(LIBPC) $(LIBDIR)/pkgconfig
|
||||||
ln -sf --relative $(SHLIBDIR)/$(LIBSO) $(LIBDIR)/$(TARGET)
|
$(LN) -sf --relative $(SHLIBDIR)/$(LIBSO) $(LIBDIR)/$(TARGET)
|
||||||
|
|
||||||
relabel:
|
relabel:
|
||||||
/sbin/restorecon $(SHLIBDIR)/$(LIBSO)
|
/sbin/restorecon $(SHLIBDIR)/$(LIBSO)
|
||||||
|
Loading…
Reference in New Issue
Block a user