changeset 1057:4dfe83e30bfa trunk

[svn] - link against 'libaudacious.so.2.0.0' instead of 'libaudacious.so'. This brings us in full compliance of debian packaging guidelines.
author nenolod
date Mon, 15 May 2006 11:31:31 -0700
parents 21628529c615
children 51818c9ef9ab
files libaudacious/Makefile.in mk/objective.mk
diffstat 2 files changed, 22 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libaudacious/Makefile.in	Mon May 15 08:17:53 2006 -0700
+++ b/libaudacious/Makefile.in	Mon May 15 11:31:31 2006 -0700
@@ -4,7 +4,7 @@
 beepincludedir = $(includedir)/audacious
 
 OBJECTIVE_LIBS = libaudacious.so
-OBJECTIVE_LIBS_NOINST = libaudacious.a
+OBJECTIVE_SONAME_SUFFIX = 2.0.0
 
 LDFLAGS += -Wl,-export-dynamic
 
@@ -45,11 +45,12 @@
 	beepctrl.h dirbrowser.h util.h \
 	formatter.h titlestring.h xml_document.h
 
+build-posthook:
+	@ln -sf libaudacious.so.2.0.0 libaudacious.so.2
+	@ln -sf libaudacious.so.2 libaudacious.so
+
 install-posthook:
-	@echo [adding versioning information to libaudacious]
-	@mv -f ${DESTDIR}/${LIBDIR}/libaudacious.so \
-		${DESTDIR}/${LIBDIR}/libaudacious.so.2.0.0
 	@ln -sf ${LIBDIR}/libaudacious.so.2.0.0 \
 		${DESTDIR}/${LIBDIR}/libaudacious.so.2
-	@ln -sf ${LIBDIR}/libaudacious.so.2.0.0 \
+	@ln -sf ${LIBDIR}/libaudacious.so.2 \
 		${DESTDIR}/${LIBDIR}/libaudacious.so
--- a/mk/objective.mk	Mon May 15 08:17:53 2006 -0700
+++ b/mk/objective.mk	Mon May 15 11:31:31 2006 -0700
@@ -92,6 +92,16 @@
 			$(RM) $$i; \
 		done; \
 	fi
+	@if test "$(OBJECTIVE_LIBS)" != "none"; then \
+		for i in $(OBJECTIVE_LIBS); do \
+			$(RM) $$i; \
+		done; \
+	fi
+	@if test "$(OBJECTIVE_LIBS_NOINST)" != "none"; then \
+		for i in $(OBJECTIVE_LIBS_NOINST); do \
+			$(RM) $$i; \
+		done; \
+	fi
 	@if test $(VERBOSITY) -gt 0; then \
 		echo "[all objectives cleaned]"; \
 	fi
@@ -183,7 +193,12 @@
 	if test "x$(OBJECTS)" != "x"; then \
 		$(MAKE) $(OBJECTS) || exit;		\
 		printf "%10s     %-20s\n" LINK $@; \
-		$(CC) -fPIC -DPIC -shared -o $@ -Wl,-soname=$@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \
+		printf "%s\n" $(OBJECTIVE_SONAME_SUFFIX); \
+		(if test "x$(OBJECTIVE_SONAME_SUFFIX)" != "x"; then \
+			$(CC) -fPIC -DPIC -shared -o $@ -Wl,-soname=$@.$(OBJECTIVE_SONAME_SUFFIX) $(OBJECTS) $(LDFLAGS) $(LIBADD); \
+		else \
+			$(CC) -fPIC -DPIC -shared -o $@ -Wl,-soname=$@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \
+		fi;) \
 	fi
 
 %.a: $(OBJECTS)