-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/I/J0ACgkQrlYvE4MpobN6hACgzFwKrPR8Xm9E3yNyp1hy4VBo gvMAoKUq6WHYYzkwI+8wZdU3mQJ8sAYU =CXEV -----END PGP SIGNATURE-----
>From 7b58427eec335ef35e0d95cdf479c6d69f683434 Mon Sep 17 00:00:00 2001 From: Eric Paris <eparis@xxxxxxxxxx> Date: Fri, 1 Jun 2012 11:25:30 -0400 Subject: [PATCH 88/90] libselinux: libsemanage: more ruby python so file standardization --- libselinux/src/Makefile | 11 +++++++---- libsemanage/src/Makefile | 8 +++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile index 18c02dc..b333f07 100644 --- a/libselinux/src/Makefile +++ b/libselinux/src/Makefile @@ -3,6 +3,8 @@ # targets with "PYPREFIX": PYTHON ?= python PYPREFIX ?= $(notdir $(PYTHON)) +RUBY ?= ruby +RUBYPREFIX ?= $(notdir $(RUBY)) # Installation directories. PREFIX ?= $(DESTDIR)/usr @@ -13,9 +15,10 @@ PYLIBVER ?= $(shell $(PYTHON) -c 'import sys;print("python%d.%d" % sys.version_i PYINC ?= $(shell pkg-config --cflags $(PYPREFIX)) PYTHONLIBDIR ?= $(shell pkg-config --libs $(PYPREFIX)) PYLIBDIR ?= $(LIBDIR)/$(PYLIBVER) -RUBYLIBVER ?= $(shell ruby -e 'print RUBY_VERSION.split(".")[0..1].join(".")') -RUBYPLATFORM ?= $(shell ruby -e 'print RUBY_PLATFORM') -RUBYINC ?= -I$(LIBDIR)/ruby/$(RUBYLIBVER)/$(RUBYPLATFORM) +RUBYLIBVER ?= $(shell $(RUBY) -e 'print RUBY_VERSION.split(".")[0..1].join(".")') +RUBYPLATFORM ?= $(shell $(RUBY) -e 'print RUBY_PLATFORM') +RUBYINC ?= $(shell pkg-config --cflags ruby-$(RUBYLIBVER)) +RUBYLIBDIR ?= $(shell pkg-config --libs ruby-$(RUBYLIBVER)) RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM) LIBBASE=$(shell basename $(LIBDIR)) @@ -33,7 +36,7 @@ SWIGLOBJ:= $(patsubst %.c,$(PYPREFIX)%.lo,$(SWIGCOUT)) SWIGRUBYLOBJ:= $(patsubst %.c,%.lo,$(SWIGRUBYCOUT)) SWIGSO=$(PYPREFIX)_selinux.so SWIGFILES=$(SWIGSO) selinux.py -SWIGRUBYSO=_rubyselinux.so +SWIGRUBYSO=$(RUBYPREFIX)_selinux.so LIBSO=$(TARGET).$(LIBVERSION) AUDIT2WHYLOBJ=$(PYPREFIX)audit2why.lo AUDIT2WHYSO=$(PYPREFIX)audit2why.so diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile index aaa98d1..fc64919 100644 --- a/libsemanage/src/Makefile +++ b/libsemanage/src/Makefile @@ -17,8 +17,10 @@ PYTHONLIBDIR ?= $(shell pkg-config --libs $(PYPREFIX)) PYLIBDIR ?= $(LIBDIR)/$(PYLIBVER) RUBYLIBVER ?= $(shell $(RUBY) -e 'print RUBY_VERSION.split(".")[0..1].join(".")') RUBYPLATFORM ?= $(shell $(RUBY) -e 'print RUBY_PLATFORM') -RUBYINC ?= $(LIBDIR)/ruby/$(RUBYLIBVER)/$(RUBYPLATFORM) +RUBYINC ?= $(shell pkg-config --cflags ruby-$(RUBYLIBVER)) +RUBYLIBDIR ?= $(shell pkg-config --libs ruby-$(RUBYLIBVER)) RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM) + LIBBASE=$(shell basename $(LIBDIR)) DEFAULT_SEMANAGE_CONF_LOCATION=$(DESTDIR)/etc/selinux/semanage.conf @@ -47,7 +49,7 @@ SWIGLOBJ:= $(patsubst %.c,$(PYPREFIX)%.lo,$(SWIGCOUT)) SWIGRUBYLOBJ:= $(patsubst %.c,$(RUBYPREFIX)%.lo,$(SWIGRUBYCOUT)) SWIGSO=$(PYPREFIX)_semanage.so SWIGFILES=$(SWIGSO) semanage.py -SWIGRUBYSO=$(RUBYPREFIX)_rubysemanage.so +SWIGRUBYSO=$(RUBYPREFIX)_semanage.so LIBSO=$(TARGET).$(LIBVERSION) GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) semanageswig_python_exception.i @@ -79,7 +81,7 @@ $(SWIGLOBJ): $(SWIGCOUT) $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(PYINC) -fPIC -DSHARED -c -o $@ $< $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT) - $(CC) $(CFLAGS) $(SWIG_CFLAGS) -I$(RUBYINC) -fPIC -DSHARED -c -o $@ $< + $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $< $(SWIGSO): $(SWIGLOBJ) $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -L$(LIBDIR) -Wl,-soname,$@ -- 1.7.10.2