* have a friendly buildpackage script here to.
authorWilfried Göesgens <willi@citadel.org>
Wed, 16 Jan 2008 00:31:11 +0000 (00:31 +0000)
committerWilfried Göesgens <willi@citadel.org>
Wed, 16 Jan 2008 00:31:11 +0000 (00:31 +0000)
* be a bit more lintian friendly.

libcitadel/buildpackages [new file with mode: 0755]
libcitadel/debian/control
libcitadel/debian/rules

diff --git a/libcitadel/buildpackages b/libcitadel/buildpackages
new file mode 100755 (executable)
index 0000000..d6fa1e0
--- /dev/null
@@ -0,0 +1,110 @@
+#!/bin/bash
+# find out the package version from conf
+if test -f Makefile; then
+    make distclean
+fi
+
+./bootstrap
+
+export `grep PACKAGE_VERSION= configure |sed -e "s;';;g" -e "s;PACKAGE;LIBCITADEL;"`
+
+PACKAGE_VERSION=`cat packageversion`
+DATE=`date '+%a, %d %b %Y %H:%I:00 %z'`
+ACTUAL_DIR=`pwd`
+
+
+rm -rf debian/libcitadel debian/libcitadel-dev debian/libcitadel1 debian/libcitadel1-dbg debian/tmp
+if echo "$ACTUAL_DIR" |grep -q "$LIBCITADEL_VERSION"; then
+       echo "directory ($ACTUAL_DIR) naming scheme seems right. nothing done."
+else
+       done=false
+       if test -L "$ACTUAL_DIR"; then 
+               SYMLINK_=`pwd`
+               SYMLINK=`ls -l $SYMLINK_|sed "s;.*-> ;;"`
+               if ls -l $SYMLINK_|grep -q "$LIBCITADEL_VERSION"; then
+                       done=true
+               fi
+       else
+               SYMLINK=`pwd|sed "s;.*/;;"`
+       fi
+       if test "$done" = "false"; then 
+               cd ..
+               mv -- $SYMLINK "libcitadel-$LIBCITADEL_VERSION"
+               ln -sf "libcitadel-$LIBCITADEL_VERSION" libcitadel
+               cd "libcitadel-$LIBCITADEL_VERSION"
+       else
+               cd "../libcitadel-$LIBCITADEL_VERSION"
+       fi
+       
+fi
+
+
+case $1 in
+    debian)
+       if grep -q "($LIBCITADEL_VERSION" debian/changelog; then
+           echo rebuilding package.
+       else
+           echo "Upstream Version higher than local."
+           
+       fi
+       if test "$2" == "src"; then
+           cd ..
+           rm -rf tmp
+           mkdir tmp
+           cp -a libcitadel-$LIBCITADEL_VERSION tmp
+           cd tmp/libcitadel-$LIBCITADEL_VERSION
+           rm -rf `find -name .svn ` svn*tmp config.log config.status
+           find -type f -exec chmod a-x {} \;
+           chmod a+x configure
+           cd ..
+           tar -czf libcitadel_${LIBCITADEL_VERSION}.orig.tar.gz libcitadel-${LIBCITADEL_VERSION}/ --exclude "debian/*"
+           pwd
+           cd  libcitadel-${LIBCITADEL_VERSION}; debuild -S -sa -kw.goesgens@outgesourced.org
+       else
+           fakeroot dpkg-buildpackage
+       fi
+       ;;
+    csw)
+       if !test -d ~/pkgs/; then
+           mkdir ~/pkgs
+       fi
+       echo "
+PKG=CSWlibcitadel
+NAME=libcitadel - The groupware server for Web 2.0
+VERSION=${PACKAGE_VERSION}
+CATEGORY=application
+VENDOR=http://www.citadel.org/  packaged for CSW by Wilfried Goesgens
+HOTLINE=https://uncensored.citadel.org/ Room citadel support
+EMAIL=citadel@outgesourced.org
+" >~/pkgs/citadel
+       export LDFLAGS='-L/opt/csw/lib -L /usr/local/lib'
+       export CFLAGS='-I/opt/csw/include -I/usr/local/include  -DDISABLE_CURSES'
+       ./configure \
+           --with-db=/opt/csw/bdb44 \
+           --with-ical=/usr/local/ \
+           --without-curses \
+           --with-prefix=/opt/csw/ \
+           --with-datadir=/opt/csw/var/lib/citadel \
+           --with-sysconfdir=/opt/csw/etc/citadel \
+           --with-ssldir=/opt/csw/etc/ssl/citadel/ \
+           --with-spooldir=/opt/csw/var/spool/citadel \
+           --with-rundir=/opt/csw/var/run/citadel \
+           --with-docdir=/opt/csw/share/doc/citadel-doc/ \
+           --with-pam \
+           --with-zlib \
+           --with-ldap \
+           --with-libsieve
+           
+       gmake citserver aidepost msgform citmail userlist sendcommand base64 whobbs citadel
+       gmake DESTDIR=$ACTUAL_DIR/cswstage install-new
+       
+
+
+       ;;
+    sourcedist)
+       cd ..; tar --exclude .svn --exclude "debian/*" -cvzf libcitadel-$LIBCITADEL_VERSION.tar.gz libcitadel-$LIBCITADEL_VERSION/
+       ;;
+       *)
+               echo "Not yet implemented. we have: debian "
+               ;;
+esac
index e532fa2fa386c0cd64acf20a1c5d0df46317703d..e3a24c1d84c1dafbc402dc5489eac0a90e6464b6 100644 (file)
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Citadel Team <room_citadel_development@uncensored.citadel.org>
 Uploaders: Wilfried Goesgens <w.goesgens@outgesourced.org>, Alexander Wirt <formorer@debian.org>
 Build-Depends: debhelper (>= 5)
-Standards-Version: 3.7.2
+Standards-Version: 3.7.3
 
 Package: libcitadel1
 Architecture: any
@@ -15,7 +15,7 @@ Description: Citadel toolbox
 Package: libcitadel1-dbg
 Section: libdevel
 Architecture: any
-Depends: ${shlibs:Depends}, libcitadel1 (= ${Source-Version})
+Depends: ${shlibs:Depends}, libcitadel1 (= ${Binary:Version})
 Description: Debugging symbols for libcitadel1
  This library contains the commonly used routines for the citadel suite.
  .
@@ -25,7 +25,7 @@ Package: libcitadel-dev
 Section: libdevel
 Architecture: any
 Depends: ${shlibs:Depends}, pkg-config,
- libcitadel1 (= ${Source-Version})
+ libcitadel1 (= ${Binary:Version})
 Description: Development files for libcitadel1
  This library contains the commonly used routines for the citadel suite.
  .
index 8cb082d473070ad3a3e64affb57c27424b9d7576..966239a9541931baef420e3a27d15b34e5e5764f 100755 (executable)
@@ -4,8 +4,6 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-export DH_COMPAT = 5
-
 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
@@ -34,9 +32,7 @@ clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp install*-stamp
-
-       -$(MAKE) distclean
-
+       [ ! -f Makefile ] || $(MAKE) distclean
        dh_clean
 
 install: install-stamp