* es.po: the correct license for this file was supposed to be GPL v2-or-later, not...
[citadel.git] / citadel / buildpackages
blob8cb0f70d7d1262792ab315672c028c890d9b8d1a
1 #!/bin/bash
2 # find out the package version from conf
3 if test -f Makefile; then
4 make distclean
5 fi
7 ./bootstrap
9 export `grep PACKAGE_VERSION= configure |sed -e "s;';;g" -e "s;PACKAGE;CITADEL;"`
11 PACKAGE_VERSION=`cat packageversion`
12 DATE=`date '+%a, %d %b %Y %H:%I:00 %z'`
13 ACTUAL_DIR=`pwd`
16 rm -rf debian/citadel-client debian/citadel-common debian/citadel-doc debian/citadel-mta debian/citadel-server debian/citadel-suite debian/tmp
17 if echo "$ACTUAL_DIR" |grep -q "$CITADEL_VERSION"; then
18 echo "directory ($ACTUAL_DIR) naming scheme seems right. nothing done."
19 else
20 done=false
21 if test -L "$ACTUAL_DIR"; then
22 SYMLINK_=`pwd`
23 SYMLINK=`ls -l $SYMLINK_|sed "s;.*-> ;;"`
24 if ls -l $SYMLINK_|grep -q "$CITADEL_VERSION"; then
25 done=true
27 else
28 SYMLINK=`pwd|sed "s;.*/;;"`
30 if test "$done" = "false"; then
31 cd ..
32 mv -- $SYMLINK "citadel-$CITADEL_VERSION"
33 ln -sf "citadel-$CITADEL_VERSION" citadel
34 cd "citadel-$CITADEL_VERSION"
35 else
36 cd "../citadel-$CITADEL_VERSION"
42 case $1 in
43 debian)
44 if grep -q "($CITADEL_VERSION" debian/changelog; then
45 echo rebuilding package.
46 else
47 echo "Upstream Version higher than local."
50 if test "$2" == "src"; then
51 cd ..
52 rm -rf tmp
53 mkdir tmp
54 cp -rL citadel-$CITADEL_VERSION tmp
55 cd tmp/citadel-$CITADEL_VERSION
56 rm -rf `find -name .svn ` svn*tmp config.log config.status
57 find -type f -exec chmod a-x {} \;
58 chmod a+x configure *.sh *.sh.in debian/rules debian/*inst* debian/rules mkinstalldirs
59 cd ..
60 tar -chzf citadel_${CITADEL_VERSION}.orig.tar.gz citadel-${CITADEL_VERSION}/ --exclude "debian/*"
61 pwd
62 cd citadel-${CITADEL_VERSION}; debuild -S -sa -kw.goesgens@outgesourced.org
63 else
64 fakeroot dpkg-buildpackage
67 csw)
68 if !test -d ~/pkgs/; then
69 mkdir ~/pkgs
71 echo "
72 PKG=CSWcitadel
73 NAME=citadel - The groupware server for Web 2.0
74 VERSION=${PACKAGE_VERSION}
75 CATEGORY=application
76 VENDOR=http://www.citadel.org/ packaged for CSW by Wilfried Goesgens
77 HOTLINE=https://uncensored.citadel.org/ Room citadel support
78 EMAIL=citadel@outgesourced.org
79 " >~/pkgs/citadel
80 export LDFLAGS='-L/opt/csw/lib -L /usr/local/lib'
81 export CFLAGS='-I/opt/csw/include -I/usr/local/include -DDISABLE_CURSES'
82 ./configure \
83 --with-db=/opt/csw/bdb44 \
84 --with-ical=/usr/local/ \
85 --without-curses \
86 --with-prefix=/opt/csw/ \
87 --with-datadir=/opt/csw/var/lib/citadel \
88 --with-sysconfdir=/opt/csw/etc/citadel \
89 --with-ssldir=/opt/csw/etc/ssl/citadel/ \
90 --with-spooldir=/opt/csw/var/spool/citadel \
91 --with-rundir=/opt/csw/var/run/citadel \
92 --with-docdir=/opt/csw/share/doc/citadel-doc/ \
93 --with-pam \
94 --with-zlib \
95 --with-ldap \
96 --with-libsieve
98 gmake citserver aidepost msgform citmail userlist sendcommand base64 whobbs citadel
99 gmake DESTDIR=$ACTUAL_DIR/cswstage install-new
104 sourcedist)
105 cd ..; tar --exclude .svn --exclude "debian/*" -chvzf citadel-$CITADEL_VERSION.tar.gz citadel-$CITADEL_VERSION/
108 echo "Not yet implemented. we have: debian "
110 esac