diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile index 928cc049..d17792c1 100644 --- a/libselinux/src/Makefile +++ b/libselinux/src/Makefile @@ -15,6 +15,7 @@ INCLUDEDIR ?= $(PREFIX)/include PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX)) PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX)) PYSITEDIR ?= $(DESTDIR)$(shell $(PYTHON) -c 'import site; print(site.getsitepackages()[0])') +PYCEXT ?= $(shell $(PYTHON) -c 'import imp;print([s for s,m,t in imp.get_suffixes() if t == imp.C_EXTENSION][0])') RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" + RbConfig::CONFIG["rubyarchhdrdir"] + " -I" + RbConfig::CONFIG["rubyhdrdir"]') RUBYLIBS ?= $(shell $(RUBY) -e 'puts "-L" + RbConfig::CONFIG["libdir"] + " -lruby"') RUBYINSTALL ?= $(DESTDIR)$(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]') @@ -185,8 +186,8 @@ install: all install-pywrap: pywrap test -d $(PYSITEDIR)/selinux || install -m 755 -d $(PYSITEDIR)/selinux - install -m 755 $(SWIGSO) $(PYSITEDIR)/_selinux.so - install -m 755 $(AUDIT2WHYSO) $(PYSITEDIR)/selinux/audit2why.so + install -m 755 $(SWIGSO) $(PYSITEDIR)/_selinux$(PYCEXT) + install -m 755 $(AUDIT2WHYSO) $(PYSITEDIR)/selinux/audit2why$(PYCEXT) install -m 644 $(SWIGPYOUT) $(PYSITEDIR)/selinux/__init__.py install-rubywrap: rubywrap diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile index 5176582f..ef25902b 100644 --- a/libsemanage/src/Makefile +++ b/libsemanage/src/Makefile @@ -15,6 +15,7 @@ INCLUDEDIR ?= $(PREFIX)/include PYINC ?= $(shell $(PKG_CONFIG) --cflags $(PYPREFIX)) PYLIBS ?= $(shell $(PKG_CONFIG) --libs $(PYPREFIX)) PYSITEDIR ?= $(DESTDIR)$(shell $(PYTHON) -c 'import site; print(site.getsitepackages()[0])') +PYCEXT ?= $(shell $(PYTHON) -c 'import imp;print([s for s,m,t in imp.get_suffixes() if t == imp.C_EXTENSION][0])') RUBYINC ?= $(shell $(RUBY) -e 'puts "-I" + RbConfig::CONFIG["rubyarchhdrdir"] + " -I" + RbConfig::CONFIG["rubyhdrdir"]') RUBYLIBS ?= $(shell $(RUBY) -e 'puts "-L" + RbConfig::CONFIG["libdir"] + " -lruby"') RUBYINSTALL ?= $(DESTDIR)$(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]') @@ -145,7 +146,7 @@ install: all install-pywrap: pywrap test -d $(PYSITEDIR) || install -m 755 -d $(PYSITEDIR) - install -m 755 $(SWIGSO) $(PYSITEDIR)/_semanage.so + install -m 755 $(SWIGSO) $(PYSITEDIR)/_semanage$(PYCEXT) install -m 644 semanage.py $(PYSITEDIR)