Hi, Everyone,
As I started packaging libcgroup for debian, I came across a strange
problem with the Makefile. We are currently linking files as follows
libcgroup.so -> libcgroup.so.1
libcgroup.so.1 -> libcgroup-$(PACKAGE_VERSION).so
Ideally, we want
libcgroup.so -> libcgroup-$(PACKAGE_VERSION).so
libcgroup.so.1 -> libcgroup-$(PACKAGE_VERSION).so
The patch below achieves that purpose and also allows for better
packaging as a result of the change.
In addition, we also explicitly add a -lpthread when libcgroup.so is
being created. This helps avoid the no pthread functions found error
when debian runs shlib sanity checks.
Please review carefully! I have *not* tested the impact on a RPM
build, I'll try and do so soon.
Signed-off-by: Balbir Singh <[EMAIL PROTECTED]>
--- ../../trunk/Makefile.in 2008-11-28 22:01:04.000000000 +0530
+++ ./Makefile.in 2008-11-28 23:13:46.000000000 +0530
@@ -52,11 +52,14 @@ y.tab.c: parse.y lex.yy.c
lex.yy.c: lex.l
$(LEX) lex.l
-libcgroup.so: api.c libcgroup.h wrapper.c config.c lex.yy.c y.tab.c
- $(CC) $(CFLAGS) -shared -fPIC -Wl,--soname,[EMAIL PROTECTED](VERSION)
-o $@ \
+libcgroup.so: api.c libcgroup.h wrapper.c config.c \
+ lex.yy.c y.tab.c
+ $(CC) $(CFLAGS) -shared -fPIC -Wl,--soname,[EMAIL PROTECTED](VERSION)
-o \
+ libcgroup-$(PACKAGE_VERSION).so \
-Wl,--version-script,libcgroup.map,--allow-shlib-undefined \
- api.c wrapper.c lex.yy.c y.tab.c config.c
- ln -sf $@ [EMAIL PROTECTED](VERSION)
+ api.c wrapper.c lex.yy.c y.tab.c config.c -lpthread
+ ln -sf libcgroup-$(PACKAGE_VERSION).so libcgroup.so.$(VERSION)
+ ln -sf libcgroup-$(PACKAGE_VERSION).so libcgroup.so
test:
$(MAKE) -C tests
@@ -67,9 +70,11 @@ pam_cgroup.so: pam_cgroup.c
install: $(TARGETS)
$(INSTALL_DATA) -D libcgroup.h $(DESTDIR)$(includedir)/libcgroup.h
- $(INSTALL) -D libcgroup.so
$(DESTDIR)$(libdir)/libcgroup-$(PACKAGE_VERSION).so
- ln -sf libcgroup-$(PACKAGE_VERSION).so
$(DESTDIR)$(libdir)/libcgroup.so.$(VERSION)
- ln -sf libcgroup.so.$(VERSION) $(DESTDIR)$(libdir)/libcgroup.so
+ $(INSTALL) -D libcgroup-$(PACKAGE_VERSION).so \
+ $(DESTDIR)$(libdir)/libcgroup-$(PACKAGE_VERSION).so
+ ln -sf libcgroup-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libcgroup.so
+ ln -sf libcgroup-$(PACKAGE_VERSION).so \
+ $(DESTDIR)$(libdir)/libcgroup.so.$(VERSION)
$(INSTALL) -D cgconfigparser $(DESTDIR)$(sbindir)/cgconfigparser
$(INSTALL) -D cgexec $(DESTDIR)$(bindir)/cgexec
$(INSTALL) -D cgclassify $(DESTDIR)$(bindir)/cgclassify
@@ -87,4 +92,5 @@ uninstall: libcgroup.so
clean:
\rm -f y.tab.c y.tab.h lex.yy.c y.output libcgroup.so cgclassify \
- libcgroup.so.$(VERSION) $(TARGETS)
+ libcgroup.so.$(VERSION) libcgroup-$(PACKAGE_VERSION).so $(TARGETS)
+
--
Balbir
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel