tags 553110 + patch
thanks

On Wed, 28 Oct 2009 at 23:56:37 -0500, Manoj Srivastava wrote:
> Refer to Debian Policy Manual section 8.1.1 (ldconfig) for details. 

I started to prepare an NMU for this. The libraries in Hercules don't seem
to be intended for system-wide use, and don't have proper SONAMEs; however,
when I tried to link them statically the build failed.

Comments in the Makefile.am claim that it's necessary to have them shared
for some reason (perhaps related to the presence of plugins), and also
explain that they're using -avoid-version for cosmetic reasons (avoiding
"strange" DLL names on Windows. Sigh). In any case, switching from
upstream-provided build stuff to re-running autofoo during the build seems
rather intrusive for an NMU...

I think the right thing to do is to divert the libraries into
/usr/lib/hercules. The attached is as far as I got before I spotted that
debian/copyright doesn't actually contain the distribution license. I've
started to aggregate the copyright statements but got distracted by a critical
bug in one of my own packages.

For my own reference, things remaining to do to be able to NMU this with a
clear conscience:

* paste the distribution license from the upstream website onto the end of
  debian/copyright (it's the QPL, referenced by, but not included in, COPYING)
* investigate the possibility of running $(MAKE) modexecdir=/usr/lib/hercules
  to avoid the symlink hack in install-arch
* apply the patches for FTBFS with kFreeBSD, and with GCC 4.4
* easy lintian-prompted fixes:
  + bump the debhelper compat to something less ancient than 3 and don't use
    DH_COMPAT
  + let dh_link fix the symlink-contains-spurious-segments
  + add misc:Depends
  + don't ignore the make clean error
  + move the doc-base and menu entry to a modernized section
  + fix trivial formatting issues in the man pages

Regards,
    S

diff --git a/debian/changelog b/debian/changelog
index aa01dc5..0e5e86c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+hercules (3.06-1.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Install the private libraries into a private directory, making it
+    unnecessary to run ldconfig (Closes: #553110)
+  * Modernize watch file (Closes: #529114)
+
+ -- Simon McVittie <s...@debian.org>  Sun, 15 Nov 2009 14:42:25 +0000
+
 hercules (3.06-1) unstable; urgency=low
 
   * New upstream release
diff --git a/debian/rules b/debian/rules
index 60e2083..c65b238 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,7 +17,17 @@ configure: configure-stamp
 configure-stamp:
        dh_testdir
 
+       # We divert the shared libraries (which are all internal to
+       # Hercules) into /usr/lib/hercules-libdir, which in turn means the
+       # plugins go in /usr/lib/hercules-libdir/hercules [1].
+       # 
+       # Hercules will actually look in /usr/lib/hercules for plugins [1],
+       # but we can get round that with a symlink.
+       #
+       # Both points marked [1] can of course be fixed, but only by patching
+       # the build system and re-running autoconf/automake.
        ./configure --prefix=/usr --enable-optimization="$(CFLAGS)" \
+               --libdir=/usr/lib/hercules-libdir \
                --mandir=/usr/share/man/ --enable-cckd-bzip2 --enable-het-bzip2 
\
                --enable-custom=Debian --enable-capabilities
 
@@ -54,6 +64,11 @@ install: build
 
        # Add here commands to install the package into debian/hercules.
        $(MAKE) install DESTDIR=$(CURDIR)/debian/hercules
+       # Looking for loadable modules in $prefix/lib/hercules is hard-coded in
+       # configure.ac. Compensate...
+       install -d debian/hercules/usr/lib/hercules
+       cd debian/hercules/usr/lib/hercules && \
+               ln -s ../hercules-libdir/hercules/* .
 
        rm $(CURDIR)/debian/hercules/usr/bin/cvslvlck
        rm $(CURDIR)/debian/hercules/usr/bin/herclin
diff --git a/debian/watch b/debian/watch
index 3c555d9..7fadcf9 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1 +1,2 @@
-http://www.hercules-390.org    /       hercules-(.*)\.tar\.gz  debian
+version=3
+http://www.hercules-390.org/hercules-(.*)\.tar\.gz debian

Attachment: signature.asc
Description: Digital signature

Reply via email to