tag 560239 patch thanks Cyril Brulebois <[email protected]> (09/12/2009): > why wondering why the .a was being used for a build of mine, I > noticed that there was indeed a .so for your package, but that the > .so was a broken symlink…
So, you already have SOMAJOR and SOMINOR in debian/rules. Given that this info is duplicated in debian/*.links (and outdated there), please find attached a proposed patch which does the following: - it gets rid of debian/*.links; - it introduces debian/*.links.in, replacing the hardcoded values with tokens; - those tokens are replaced with SOMAJOR/SOMINOR values through a sed call in the configure step; to make it obvious those files are generated, a comment is added at the top of the generated file; - those generated files are cleaned up again in the clean target. That's really a quick and dirty hack I could think of while wondering how you could keep that in sync. This may have bad side-effects. But that might prevent you from running into similar troubles in the future. I've also checked that my initial slang2-using build was now picking the shared library properly. Mraw, KiBi.
--- slang2-2.2.2/debian/libslang2-dev.links 2009-12-06 11:23:45.000000000 +0100
+++ slang2-2.2.2/debian/libslang2-dev.links 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-lib/libslang.so.2.2.1 usr/lib/libslang.so
--- slang2-2.2.2/debian/libslang2-dev.links.in 1970-01-01 01:00:00.000000000 +0100
+++ slang2-2.2.2/debian/libslang2-dev.links.in 2009-12-09 23:27:04.000000000 +0100
@@ -0,0 +1 @@
+lib/libslang.so.@@major@@.@@minor@@ usr/lib/libslang.so
--- slang2-2.2.2/debian/libslang2.links 2009-12-06 11:23:45.000000000 +0100
+++ slang2-2.2.2/debian/libslang2.links 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-lib/libslang.so.2.2.1 lib/libslang.so.2
--- slang2-2.2.2/debian/libslang2.links.in 1970-01-01 01:00:00.000000000 +0100
+++ slang2-2.2.2/debian/libslang2.links.in 2009-12-09 23:27:43.000000000 +0100
@@ -0,0 +1 @@
+lib/libslang.so.@@major@@.@@minor@@ lib/libslang.so.@@major@@
--- slang2-2.2.2/debian/libslang2-udeb.links 2009-12-06 11:23:45.000000000 +0100
+++ slang2-2.2.2/debian/libslang2-udeb.links 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-lib/libslang.so.2.2.1 lib/libslang.so.2
--- slang2-2.2.2/debian/libslang2-udeb.links.in 1970-01-01 01:00:00.000000000 +0100
+++ slang2-2.2.2/debian/libslang2-udeb.links.in 2009-12-09 23:27:18.000000000 +0100
@@ -0,0 +1 @@
+lib/libslang.so.@@major@@.@@minor@@ lib/libslang.so.@@major@@
--- slang2-2.2.2/debian/rules 2009-12-06 11:36:24.000000000 +0100
+++ slang2-2.2.2/debian/rules 2009-12-09 23:43:12.000000000 +0100
@@ -61,6 +61,13 @@
$(configure-stamp): $(patched)
dh_testdir
+ # Prepare .links files from templates:
+ for i in `ls $(CURDIR)/debian/*links.in`; do \
+ sed -e "1i\# Automatically generated from the .in" \
+ -e "s/@@major@@/$(SOMAJOR)/g; s/@@minor@@/$(SOMINOR)/" \
+ < $$i > $${i%%.in} ; \
+ done
+ # Prepare the build tree:
cd $(BUILD_TREE) && ./configure --prefix=/usr \
--enable-warnings $(CONFARGS)
touch $@
@@ -85,6 +92,8 @@
dh_testdir
dh_testroot
rm -rf $(SOURCE_DIR) $(STAMP_DIR)
+ # Clean up generated .links:
+ for i in `ls $(CURDIR)/debian/*links.in`; do rm -f $${i%%.in} ; done
dh_clean
# Build architecture-independent files here.
signature.asc
Description: Digital signature

