|
0 |
#!/bin/bash
|
|
1 |
# find out the package version from conf
|
|
2 |
if test -f Makefile; then
|
|
3 |
make distclean
|
|
4 |
fi
|
|
5 |
|
|
6 |
#./bootstrap
|
|
7 |
|
|
8 |
export `grep PACKAGE_VERSION= configure |sed -e "s;';;g" -e "s;PACKAGE;CITADEL;"`
|
|
9 |
|
|
10 |
PACKAGE_VERSION=`cat packageversion`
|
|
11 |
DATE=`date '+%a, %d %b %Y %H:%I:00 %z'`
|
|
12 |
ACTUAL_DIR=`pwd`
|
|
13 |
|
|
14 |
|
|
15 |
rm -rf debian/textclient debian/citadel-common debian/citadel-doc debian/citadel-mta debian/citadel-server debian/citadel-suite debian/tmp
|
|
16 |
if echo "$ACTUAL_DIR" |grep -q "$CITADEL_VERSION"; then
|
|
17 |
echo "directory ($ACTUAL_DIR) naming scheme seems right. nothing done."
|
|
18 |
else
|
|
19 |
done=false
|
|
20 |
if test -L "$ACTUAL_DIR"; then
|
|
21 |
SYMLINK_=`pwd`
|
|
22 |
SYMLINK=`ls -l $SYMLINK_|sed "s;.*-> ;;"`
|
|
23 |
if ls -l $SYMLINK_|grep -q "$CITADEL_VERSION"; then
|
|
24 |
done=true
|
|
25 |
fi
|
|
26 |
else
|
|
27 |
SYMLINK=`pwd|sed "s;.*/;;"`
|
|
28 |
fi
|
|
29 |
if test "$done" = "false"; then
|
|
30 |
cd ..
|
|
31 |
if test ! -L "textclient-$CITADEL_VERSION"; then
|
|
32 |
ln -sf textclient "textclient-$CITADEL_VERSION"
|
|
33 |
fi
|
|
34 |
cd "textclient-$CITADEL_VERSION"
|
|
35 |
else
|
|
36 |
cd "../textclient-$CITADEL_VERSION"
|
|
37 |
fi
|
|
38 |
|
|
39 |
fi
|
|
40 |
|
|
41 |
|
|
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."
|
|
48 |
|
|
49 |
fi
|
|
50 |
if test "$2" == "src"; then
|
|
51 |
cd ..
|
|
52 |
rm -rf tmp
|
|
53 |
mkdir tmp
|
|
54 |
cp -rL textclient-$CITADEL_VERSION tmp
|
|
55 |
cd tmp/textclient-$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 textclient_${CITADEL_VERSION}.orig.tar.gz textclient-${CITADEL_VERSION}/ --exclude "debian/*"
|
|
61 |
pwd
|
|
62 |
cd textclient-${CITADEL_VERSION}; debuild -S -sa -kw.goesgens@outgesourced.org
|
|
63 |
else
|
|
64 |
fakeroot dpkg-buildpackage
|
|
65 |
fi
|
|
66 |
;;
|
|
67 |
csw)
|
|
68 |
if !test -d ~/pkgs/; then
|
|
69 |
mkdir ~/pkgs
|
|
70 |
fi
|
|
71 |
echo "
|
|
72 |
PKG=CSWcitadel-textclient
|
|
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 |
--with-prefix=/opt/csw/ \
|
|
86 |
--with-datadir=/opt/csw/var/lib/citadel \
|
|
87 |
--with-sysconfdir=/opt/csw/etc/citadel \
|
|
88 |
--with-ssldir=/opt/csw/etc/ssl/citadel/ \
|
|
89 |
--with-spooldir=/opt/csw/var/spool/citadel \
|
|
90 |
--with-rundir=/opt/csw/var/run/citadel \
|
|
91 |
--with-docdir=/opt/csw/share/doc/citadel-doc/ \
|
|
92 |
--with-pam \
|
|
93 |
--with-zlib \
|
|
94 |
--with-ldap \
|
|
95 |
--with-libsieve
|
|
96 |
|
|
97 |
gmake citserver aidepost msgform citmail userlist sendcommand base64 whobbs citadel
|
|
98 |
gmake DESTDIR=$ACTUAL_DIR/cswstage install-new
|
|
99 |
|
|
100 |
|
|
101 |
|
|
102 |
;;
|
|
103 |
sourcedist)
|
|
104 |
cd ..; tar \
|
|
105 |
--exclude ".gitignore" \
|
|
106 |
--exclude "*.lo" \
|
|
107 |
--exclude "*.o" \
|
|
108 |
--exclude "*.d" \
|
|
109 |
--exclude "autom4te.cache/*" \
|
|
110 |
--exclude "debian/*" \
|
|
111 |
--exclude "sysdep.h" \
|
|
112 |
\
|
|
113 |
-chvzf textclient-$CITADEL_VERSION.tar.gz textclient-$CITADEL_VERSION/
|
|
114 |
;;
|
|
115 |
*)
|
|
116 |
echo "Not yet implemented. we have: debian "
|
|
117 |
;;
|
|
118 |
esac
|