Package: libslang2
Version: 2.0.4-4
Severity: normal
Tags: patch

I am thinking about packaging a module for SLang2.  The obvious question
is in which directory the *.so module must be installed.  The current
libslang2 package looks for modules in /lib/slang/v2/modules.  This is
actually not a good place for putting modules, because it somewhow
violates the FHS (see
http://www.pathname.com/fhs/pub/fhs-2.3.html#PURPOSE11):

    /lib : Essential shared libraries and kernel modules 
    
    Purpose

    The /lib directory contains those shared library images needed to boot
    the system and run the commands in the root filesystem, ie. by binaries
    in /bin and /sbin.

A better place for the the modules would be /usr/lib/slang/v2/modules.
The simple-minded patch attached below contains the necessary changes in
debian/rules to accomplish this.

With this patch, you may also consider running "make -C modules install"
and get all the modules provided in the tarball (fcntl, pcre, png,
select, slsmg, termios, and varray) installed in the system.  In this
case, a new package named, say, slang2-modules could be created.

-- 
Rafael


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.8-1-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages libslang2 depends on:
ii  libc6                         2.3.5-6    GNU C Library: Shared libraries an

Versions of packages libslang2 recommends:
ii  libfribidi0                   0.10.5-3   Free Implementation of the Unicode

-- no debconf information

--- rules-orig  2005-09-16 15:38:48.202604856 +0200
+++ rules       2005-09-16 15:53:43.106558776 +0200
@@ -28,6 +28,7 @@
 DEBVERSION=$(shell dpkg-parsechangelog | grep '^Version: ' | sed -e 
's/^Version: //')
 UDEBNAME=$(LIBSLANG_UDEB)_$(DEBVERSION)_$(shell dpkg --print-architecture).udeb
 
+MODULE_INSTALL_DIR=/usr/lib/slang/v2/modules
 
 # the dbs rules
 TAR_DIR=slang-$(SOMAJOR).$(SOMINOR)
@@ -51,8 +52,8 @@
 
 $(build-stamp): $(configure-stamp)
        dh_testdir
-       $(MAKE) -C $(BUILD_TREE) CFLAGS="$(CFLAGS)" 
install_doc_dir=/usr/share/doc/libslang2 all 
-       $(MAKE) -C $(BUILD_TREE) ELF_CFLAGS="$(ELF_CFLAGS)" prefix=/ 
install_doc_dir=/usr/share/doc/libslang2 elf
+       $(MAKE) -C $(BUILD_TREE) CFLAGS="$(CFLAGS)" 
MODULE_INSTALL_DIR=$(MODULE_INSTALL_DIR) 
install_doc_dir=/usr/share/doc/libslang2 all
+       $(MAKE) -C $(BUILD_TREE) ELF_CFLAGS="$(ELF_CFLAGS)" 
MODULE_INSTALL_DIR=$(MODULE_INSTALL_DIR) prefix=/ 
install_doc_dir=/usr/share/doc/libslang2 elf
        # Produce the -pic archive for use by the bootfloppies package.
        ar cqv $(BUILD_TREE)/libslang_pic.a $(BUILD_TREE)/src/elfobjs/*.o
        INSTANT_OPT=" " docbook-to-man debian/slsh.sgml > $(SOURCE_DIR)/slsh.1
@@ -72,7 +73,8 @@
        dh_testroot 
        $(MAKE) -C $(BUILD_TREE)/slsh install RPATH= SLSH_CONF_DIR=/etc \
                SLANG_INST_LIB="-L${CURDIR}/${BUILD_TREE}/src/elfobjs -lslang" \
-               DESTDIR=$(CURDIR)/debian/slsh
+               DESTDIR=$(CURDIR)/debian/slsh \
+               MODULE_INSTALL_DIR=$(CURDIR)$(MODULE_INSTALL_DIR)
        dh_link -a
        dh_installdirs -a
        dh_install -a

Reply via email to