v1.06: clean up debianization 1.06
authormegacz <megacz@mire.hcoop.net>
Sun, 27 Apr 2008 19:59:53 +0000 (15:59 -0400)
committermegacz <megacz@mire.hcoop.net>
Sun, 27 Apr 2008 19:59:53 +0000 (15:59 -0400)
Makefile
debian/changelog
debian/control [changed mode: 0644->0755]
debian/copyright
debian/dirs
debian/docs
debian/postinst [new file with mode: 0644]
debian/rules
debian/shlibs [new file with mode: 0644]
debian/source.lintian-overrides [new file with mode: 0644]

index 7a5cb10..cc1dd68 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,15 @@
 
 SYS=$(shell uname)
 CC=gcc
-LIBNAMES=libnss_afs.so.2
+MAJORVERSION=2
+MINORVERSION=0.0
+LIBNAMES=libnss_afs.so.$(MAJORVERSION)
 EXTRALIBS=-lresolv
 AFSROOT=/usr
 
 # LIMIT_USERNAME_CHARS=n will cut down usernames to
 # a maximum of n characters
-CFLAGS=-I$(AFSROOT)/include -DHAVE_NSS_H -DLIMIT_USERNAME_CHARS=20
+CFLAGS=-I$(AFSROOT)/include -DHAVE_NSS_H -DLIMIT_USERNAME_CHARS=20 -fPIC
 
 all: $(LIBNAMES) nss_afs_test
 
@@ -18,17 +20,17 @@ LDFLAGS=-L$(AFSROOT)/lib/afs -L$(AFSROOT)/lib -lprot \
 nss_afs.o: nss_afs.c
        $(CC) $(CFLAGS) -c nss_afs.c
 
-libnss_afs.so.2: nss_afs.o
-       $(CC) -shared -o libnss_afs.so.2 nss_afs.o \
-       -Wl,-soname,libnss_afs.so.2 $(LDFLAGS)
+libnss_afs.so.$(MAJORVERSION): nss_afs.o
+       $(CC) -shared -fPIC -o libnss_afs.so.$(MAJORVERSION) nss_afs.o \
+       -Wl,-soname,libnss_afs.so.$(MAJORVERSION) $(LDFLAGS)
 
 nss_afs_test: nss_afs.o nss_afs_test.c
        $(CC) -o nss_afs_test nss_afs_test.c nss_afs.o $(LDFLAGS)
 
 install:
        mkdir -p $(DESTDIR)/lib/
-       install -m 644 libnss_afs.so.2 $(DESTDIR)/lib/
-       install -m 755 nss_afs_test $(DESTDIR)/usr/bin/nss_afs_test
+       install -m 644 libnss_afs.so.$(MAJORVERSION) $(DESTDIR)/lib/libnss_afs.so.$(MAJORVERSION).$(MINORVERSION)
+       ln -s libnss_afs.so.$(MAJORVERSION).$(MINORVERSION) $(DESTDIR)/lib/libnss_afs.so.$(MAJORVERSION)
 
 clean:
        rm -f *.so.2 *.o $(LIBNAME) nss_afs_test
index f7a50d3..bde90e3 100644 (file)
@@ -1,3 +1,9 @@
+libnss-afs (1.06) unstable; urgency=low
+
+  * clean up debianization
+
+ -- Adam Megacz <megacz@hcoop.net>  Thu, 17 Apr 2008 01:59:19 -0400
+
 libnss-afs (1.05) unstable; urgency=low
 
   * set rx_SetRxDeadTime to 5 seconds to avoid stalling forever
old mode 100644 (file)
new mode 100755 (executable)
index 54005ba..dc63615
@@ -1,20 +1,27 @@
 Source: libnss-afs
-Section: net
+Section: libs
 Priority: extra
 Maintainer: Adam Megacz <megacz@hcoop.net>
-Build-Depends: debhelper (>= 4.0.0), libopenafs-dev, libc6-dev
-Standards-Version: 3.6.0
+Build-Depends: debhelper (>= 4.0.0), libopenafs-dev, libc6-dev (>= 2.3.6)
+Standards-Version: 3.7.2
 
 Package: libnss-afs
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Suggests: nscd
 Description: A NSS (Name Service Switch) module for AFS
+ A Name Service Switch (NSS) plugin is a shared library used by glibc
+ to -- among other things -- translate between usernames and numeric
+ userids and between group names and numeric groupids.
+ .
+ The libnss-afs library is an NSS plugin which answers these queries
+ using the information stored in the AFS ptserver, avoiding the need to
+ duplicate (and update) this information in /etc/passwd or LDAP.  The
+ library also synthesizes the name AfsPag-XXXX for the fake group ids
+ that are used to represent AFS PAGs.
+ .
  Based on libnss-ptdb by Frank Burkhardt <burk@cbs.mpg.de>.
- This module provides a NSS module that allows your
- AFS-Protection-Database (PTDB) to act as a name service.
- The only information the PTDB provides is a UID <-> username
- mapping. We have to "guess" all the other passwd-fields.
+ Based on nss_pts by Todd M. Lewis.
  .
  You should use nscd to reduce network traffic caused by this
  module.
index 13e80e2..5f31d74 100644 (file)
@@ -1,9 +1,9 @@
 This package was debianized by Adam Megacz <megacz@hcoop.net>
 
-It was downloaded from <fill in ftp site>
+Upstream Authors:
+   Adam Megacz <megacz@hcoop.net>
+   Frank Burkhardt <frank@mekong.alpha>
+   Todd M. Lewis
 
-Upstream Author(s): Frank Burkhardt <frank@mekong.alpha>
+Copyright: /usr/share/common-licenses/LGPL
 
-Copyright:
-
-<Must follow here>
index 1ec5c7d..ee83005 100644 (file)
@@ -1,3 +1,2 @@
 usr/bin
 lib
-etc/default
index 1f562b3..e845566 100644 (file)
@@ -1,2 +1 @@
 README
-COPYING
diff --git a/debian/postinst b/debian/postinst
new file mode 100644 (file)
index 0000000..77dd823
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+/sbin/ldconfig
+#DEBHELPER#
index d1062bc..182cf2e 100755 (executable)
@@ -1,14 +1,9 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-
-
-
 CFLAGS = -Wall -g
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -23,30 +18,20 @@ endif
 configure: configure-stamp
 configure-stamp:
        dh_testdir
-       # Add here commands to configure the package.
-
        touch configure-stamp
 
-
 build: build-stamp
 
 build-stamp: configure-stamp 
        dh_testdir
-
-       # Add here commands to compile the package.
        $(MAKE)
-       #/usr/bin/docbook-to-man debian/libnss-afs.sgml > libnss-afs.1
-
        touch build-stamp
 
 clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp configure-stamp
-
-       # Add here commands to clean up after the build process.
        -$(MAKE) clean
-
        dh_clean 
 
 install: build
@@ -54,11 +39,12 @@ install: build
        dh_testroot
        dh_clean -k 
        dh_installdirs
-
-       # Add here commands to install the package into debian/libnss-afs.
        mkdir -p $(CURDIR)/debian/libnss-afs
        $(MAKE) install DESTDIR=$(CURDIR)/debian/libnss-afs
-       #install -m 644 default $(CURDIR)/debian/libnss-afs/etc/default/afsnssd
+       mkdir -p $(CURDIR)/debian/libnss-afs/DEBIAN
+       install -m644 debian/shlibs $(CURDIR)/debian/libnss-afs/DEBIAN
+       mkdir -p $(CURDIR)/debian/libnss-afs/usr/share/lintian/overrides/
+       cp debian/source.lintian-overrides $(CURDIR)/debian/libnss-afs/usr/share/lintian/overrides/libnss-afs
 
 # Build architecture-independent files here.
 binary-indep: build install
@@ -78,7 +64,7 @@ binary-arch: build install
        dh_compress
        dh_fixperms
        dh_installdeb
-       dh_shlibdeps
+       dh_shlibdeps $(CURDIR)/debian/lib/*.so*
        dh_gencontrol
        dh_md5sums
        dh_builddeb
diff --git a/debian/shlibs b/debian/shlibs
new file mode 100644 (file)
index 0000000..8824121
--- /dev/null
@@ -0,0 +1 @@
+libnss_afs 2
diff --git a/debian/source.lintian-overrides b/debian/source.lintian-overrides
new file mode 100644 (file)
index 0000000..7a51c31
--- /dev/null
@@ -0,0 +1,9 @@
+
+# we link against the static libraries in libopenafs-dev, which are compiled non-PIC
+libnss-afs source: shlib-with-non-pic-code lib/libnss_afs.so.2.0.0
+libnss-afs binary: shlib-with-non-pic-code lib/libnss_afs.so.2.0.0
+
+# this library exports only interfaces standardized by glibc; there will never be
+# an incompatible version
+libnss-afs source: package-name-doesnt-match-sonames
+libnss-afs binary: package-name-doesnt-match-sonames