All of lore.kernel.org
 help / color / mirror / Atom feed
* libselinux pkgconfig does not work correctly on lib64 machines.
@ 2010-02-24 19:24 Daniel J Walsh
  2010-02-24 19:35 ` updated " Daniel J Walsh
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel J Walsh @ 2010-02-24 19:24 UTC (permalink / raw)
  To: SELinux

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: selinux_pkgconfig.patch --]
[-- Type: text/plain, Size: 3072 bytes --]

diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
index cfd72e2..bf665ab 100644
--- a/libselinux/src/Makefile
+++ b/libselinux/src/Makefile
@@ -11,6 +11,7 @@ RUBYLIBVER ?= $(shell ruby -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
 RUBYPLATFORM ?= $(shell ruby -e 'print RUBY_PLATFORM')
 RUBYINC ?= $(LIBDIR)/ruby/$(RUBYLIBVER)/$(RUBYPLATFORM)
 RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM)
+LIBBASE=$(shell basename $(LIBDIR))
 
 VERSION = $(shell cat ../VERSION)
 LIBVERSION = 1
@@ -85,7 +86,7 @@ $(LIBSO): $(LOBJS)
 	ln -sf $@ $(TARGET) 
 
 $(LIBPC): $(LIBPC).in
-	sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBDIR):; s:@includedir@:$(INCLUDEDIR):' < $< > $@
+	sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBBASE):; s:@includedir@:$(INCLUDEDIR):' < $< > $@
 
 selinuxswig_python_exception.i: ../include/selinux/selinux.h
 	bash exception.sh > $@ 
diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile
index 67afc60..003b6f2 100644
--- a/libsemanage/src/Makefile
+++ b/libsemanage/src/Makefile
@@ -10,6 +10,7 @@ RUBYLIBVER ?= $(shell ruby -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
 RUBYPLATFORM ?= $(shell ruby -e 'print RUBY_PLATFORM')
 RUBYINC ?= $(LIBDIR)/ruby/$(RUBYLIBVER)/$(RUBYPLATFORM)
 RUBYINSTALL ?= $(LIBDIR)/ruby/site_ruby/$(RUBYLIBVER)/$(RUBYPLATFORM)
+LIBBASE=$(shell basename $(LIBDIR))
 
 DEFAULT_SEMANAGE_CONF_LOCATION=$(DESTDIR)/etc/selinux/semanage.conf
 
@@ -47,7 +48,7 @@ OBJS= $(patsubst %.c,%.o,$(SRCS)) conf-scan.o conf-parse.o
 LOBJS= $(patsubst %.c,%.lo,$(SRCS)) conf-scan.lo conf-parse.lo
 CFLAGS ?= -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wno-unused-parameter
 
-override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE 
+override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -fPIC
 
 SWIG = swig -Wall -python -o $(SWIGCOUT) -outdir ./
 
@@ -82,7 +83,7 @@ $(LIBSO): $(LOBJS)
 	ln -sf $@ $(TARGET)
 
 $(LIBPC): $(LIBPC).in
-	sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBDIR):; s:@includedir@:$(INCLUDEDIR):' < $< > $@
+	sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBBASE):; s:@includedir@:$(INCLUDEDIR):' < $< > $@
 
 conf-scan.c: conf-scan.l conf-parse.h
 	$(LEX) $(LFLAGS) -t $< > $@
diff --git a/libsepol/src/Makefile b/libsepol/src/Makefile
index 3b19e37..73fdef8 100644
--- a/libsepol/src/Makefile
+++ b/libsepol/src/Makefile
@@ -3,6 +3,7 @@ PREFIX ?= $(DESTDIR)/usr
 INCLUDEDIR ?= $(PREFIX)/include
 LIBDIR ?= $(PREFIX)/lib
 SHLIBDIR ?= $(DESTDIR)/lib
+LIBBASE=$(shell basename $(LIBDIR))
 
 VERSION = $(shell cat ../VERSION)
 LIBVERSION = 1
@@ -27,7 +28,7 @@ $(LIBSO): $(LOBJS)
 	ln -sf $@ $(TARGET) 
 
 $(LIBPC): $(LIBPC).in
-	sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBDIR):; s:@includedir@:$(INCLUDEDIR):' < $< > $@
+	sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBBASE):; s:@includedir@:$(INCLUDEDIR):' < $< > $@
 
 %.o:  %.c 
 	$(CC) $(CFLAGS) -fPIC -c -o $@ $<

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-03-06 23:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-24 19:24 libselinux pkgconfig does not work correctly on lib64 machines Daniel J Walsh
2010-02-24 19:35 ` updated " Daniel J Walsh
2010-02-26  1:44   ` Joshua Brindle
2010-02-26 18:10     ` Eamon Walsh
2010-02-26 19:49       ` Daniel J Walsh
2010-02-26 20:26         ` Eamon Walsh
2010-03-06 23:13           ` Joshua Brindle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.