[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#295728: peercast and gnome peercast...


I've made a patch to peercast makefile for linux in order to have it built 
with shared libraries.

Then I'll modify my package in order to build a libpeercast and 
libpeercast-dev that gnome peercast coul use for its package.

The patch applies to peercast last trunk, and has been submitted to peercast 
upstream for an include.


If you are the big tree,
We are the small axe,
Ready to cut you down,
Sharpen to cut you down....
--- trunk.orig/ui/linux/makefile	2005-06-10 15:34:32.000000000 +0200
+++ trunk/ui/linux/makefile	2005-06-15 01:56:14.000000000 +0200
@@ -1,5 +1,6 @@
 LDFLAGS = -pthread 
+LDSOFLAGS = -shared -Wl,-soname
 #CPPFLAGS = -static -pthread -D__cplusplus -D_UNIX -D_LINUX_STATIC -D_REENTRANT $(INCLUDES)
 #LDFLAGS = -static -pthread 
@@ -10,15 +11,14 @@
 INCLUDES = -I../../core -I../../core/common 
-# Library and include paths.
-LIBS = 
 TARGET = peercast
 CORE = ../../core
 SRCHTML = ../html
 HTML = html
+LIBSONAME = libpeercast.so.1
+LIBOBJ = libpeercast.so.1.0
 CORESOURCE = $(CORE)/unix/usys.cpp \
 	 $(CORE)/unix/usocket.cpp \
@@ -73,7 +73,7 @@
 	tar -czf $(TAR) $(HTML) $(TARGET)
 %.o: %.cpp
 	$(CC) $(INCLUDES) $(CPPFLAGS) -c $< -o $@
@@ -85,8 +85,9 @@
 	echo > $(DEPENDFILE)
-	$(LD) $(LDFLAGS) -o $@ $(LINUXOBJ) $(COREOBJ) $(LIBS) 
+	$(LD) $(LDFLAGS) -o $@ $(LINUXOBJ) $(LIBOBJ) -ldl
 include $(DEPENDFILE)
--- trunk.orig/ui/linux/install.sh	2005-06-10 15:34:32.000000000 +0200
+++ trunk/ui/linux/install.sh	2005-06-15 02:11:02.000000000 +0200
@@ -22,21 +22,27 @@
 echo "Doing the install.."
 echo "- Peercast bin and file."
-mkdir -p $sharedir $libdir $insdir $libdir $kdedir
+mkdir -p $sharedir $insdir $peercastlibdir $kdedir
 cp -f ./peercast $insdir
+cp -f ./libpeercast.so.1.* $libdir
+echo "Please, make sure that the directory for shared library is listed in known by ldconfig"
+echo "Else, use this command: export LD_LIBRARY_PATH=$libdir:\$LD_LIBRARY_PATH"
+echo "Before launching peercast."
+/sbin/ldconfig -n $libdir
 cp -rf ./../html $sharedir
 chmod +x $insdir/peercast
 echo "- installing peercast protocol handler."
 echo "-> peercast:// handling scripts"
-cp -rf ./scripts $libdir
+cp -rf ./scripts $peercastlibdir
 echo "* Setting correct prefix for scripts"
 rm -f $libdir/scripts/peercast_khandler.sh
 cat ./scripts/peercast_khandler.sh | sed -e s#/usr/local#$PREFIX# > $libdir/scripts/peercast_khandler.sh

Attachment: pgpryIU29PZHD.pgp
Description: PGP signature

Reply to: