[SCM] Position Astronomy Library branch, debian, updated. 2b309de84e7070907db1572f2ed1d2a745728055

Ole Streicher debian at liska.ath.cx
Wed May 16 10:36:24 UTC 2012


The following commit has been merged in the debian branch:
commit 0bebfd53465f806698f2cd85bdc8bff06b2a58cc
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Wed May 16 11:57:17 2012 +0200

    Put the patching of Makefile.am into an ordinary patch

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..339d012
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,2 @@
+The patch patches/rename_library.sh is created with the script
+create_patches_rename_library.sh.
diff --git a/debian/create_patches_rename_library.sh b/debian/create_patches_rename_library.sh
new file mode 100755
index 0000000..5ded3f5
--- /dev/null
+++ b/debian/create_patches_rename_library.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+VENDOR=starlink
+LIBNAME=pal
+
+PATCH_SED_CMD="s/lib${LIBNAME}/lib${VENDOR}_${LIBNAME}/g"
+FILES="Makefile.am"
+
+cat > debian/patches/rename_library <<EOF
+Author: Ole Streicher <debian at liska.ath.cx>
+Last-Update: $(date +%Y-%m-%d)
+Description: "${LIBNAME}" is a quite short name for a library that is so 
+ specific as this one. Therefore, "${LIBNAME}" is prefixed by the 
+ vendor name "${VENDOR}".
+ .
+ This patch can be re-created by running 
+  ${0}
+ on the freshly unpacked source tarball.
+$(for f in ${FILES} ; do \
+ sed ${PATCH_SED_CMD} < ${f} | diff -u ${f} - --label a/${f} --label b/${f}; \
+ done )
+EOF
diff --git a/debian/patches/rename_library b/debian/patches/rename_library
new file mode 100644
index 0000000..d4610ec
--- /dev/null
+++ b/debian/patches/rename_library
@@ -0,0 +1,46 @@
+Author: Ole Streicher <debian at liska.ath.cx>
+Last-Update: 2012-05-16
+Description: "pal" is a quite short name for a library that is so 
+ specific as this one. Therefore, "pal" is prefixed by the 
+ vendor name "starlink".
+ .
+ This patch can be re-created by running 
+  debian/create_patches_rename_library.sh
+ on the freshly unpacked source tarball.
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,13 +1,13 @@
+ ## Process this file with automake to produce Makefile.in
+ 
+-lib_LTLIBRARIES = libpal.la
++lib_LTLIBRARIES = libstarlink_pal.la
+ 
+ 
+ # Include palOne2One.c separately since it is a combo file
+-libpal_la_SOURCES = $(PUBLIC_C_FILES) palOne2One.c
++libstarlink_pal_la_SOURCES = $(PUBLIC_C_FILES) palOne2One.c
+ 
+ # Force a link against SOFA
+-libpal_la_LIBADD = $(libdir)/libsofa_c.la $(libdir)/libstarutil.la
++libstarlink_pal_la_LIBADD = $(libdir)/libsofa_c.la $(libdir)/libstarutil.la
+ 
+ # Misc files
+ dist_starnews_DATA = pal.news
+@@ -16,7 +16,7 @@
+ # Make all library code position independent. This is handy for creating
+ # shareable libraries from the static ones (Java JNI libraries).
+ if !NOPIC
+-libpal_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
++libstarlink_pal_la_CFLAGS = $(AM_CFLAGS) -prefer-pic
+ endif
+ 
+ # install pal as "star/pal.h"
+@@ -98,7 +98,7 @@
+ 
+ check_PROGRAMS = palTest
+ palTest_SOURCES = palTest.c
+-palTest_LDADD = libpal.la
++palTest_LDADD = libstarlink_pal.la
+ 
+ # A target for making the SUN documentation. We do not do this automatically
+ palsun.tex: $(PUBLIC_C_FILES)
diff --git a/debian/patches/series b/debian/patches/series
index 7480f1e..da737ee 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+rename_library
 use_std_automake.patch
diff --git a/debian/patches/use_std_automake.patch b/debian/patches/use_std_automake.patch
index f163222..5aa9cdf 100644
--- a/debian/patches/use_std_automake.patch
+++ b/debian/patches/use_std_automake.patch
@@ -14,12 +14,12 @@ Description: Do not depend on the starlink's automake, but use their macro
  dnl    isn't found then configure will complain
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -7,10 +7,10 @@ lib_LTLIBRARIES = libpal.la
- libpal_la_SOURCES = $(PUBLIC_C_FILES) palOne2One.c
+@@ -7,10 +7,10 @@ lib_LTLIBRARIES = libstarlink_pal.la
+ libstarlink_pal_la_SOURCES = $(PUBLIC_C_FILES) palOne2One.c
  
  # Force a link against SOFA
--libpal_la_LIBADD = $(libdir)/libsofa_c.la $(libdir)/libstarutil.la
-+libpal_la_LIBADD = -lsofa_c
+-libstarlink_pal_la_LIBADD = $(libdir)/libsofa_c.la $(libdir)/libstarutil.la
++libstarlink_pal_la_LIBADD = -lsofa_c
  
  # Misc files
 -dist_starnews_DATA = pal.news
diff --git a/debian/rules b/debian/rules
index 8538b44..bf3c950 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,13 +8,9 @@
 
 override_dh_autoreconf:
 	cp pal.news NEWS
-	sed s/libpal/libstarlink_pal/g -i Makefile.am
 	AUTOMAKE="automake --foreign" dh_autoreconf
 
 override_dh_auto_configure:
 	dh_auto_configure -- --without-cnf --with-pthreads
 
-override_dh_clean:
-	sed s/libstarlink_pal/libpal/g -i Makefile.am
-	dh_clean
 

-- 
Position Astronomy Library



More information about the debian-science-commits mailing list