- -- Wilfried Goesgens <w.goesgens@chaosindustries.de> $DATE
- " >/tmp/webcit_changelog
- cat debian/changelog >>/tmp/webcit_changelog
- mv /tmp/webcit_changelog debian/changelog
-
- fi
- fakeroot dpkg-buildpackage
+case $1 in
+ debian)
+ if grep -q "($WEBCIT_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 -rL webcit-$WEBCIT_VERSION tmp
+ cd tmp/webcit-$WEBCIT_VERSION
+ rm -rf `find -name .svn ` svn*tmp* build-stamp configure-stamp *~ config.guess config.log config.status autom4te.cache Makefile
+ find -type f -exec chmod a-x {} \;
+ chmod a+x configure debian/rules po/create-pot.sh mk_module_init.sh
+ cd ..
+ tar -chzf webcit_${WEBCIT_VERSION}.orig.tar.gz webcit-${WEBCIT_VERSION}/ --exclude "debian/*"
+ pwd
+ cd webcit-${WEBCIT_VERSION}; debuild -S -sa -kw.goesgens@outgesourced.org
+ else
+ fakeroot dpkg-buildpackage
+ fi
+ ;;
+ sourcedist)
+ if test "$2" == "dfsg"; then
+ NONDFSG=-"-exclude static/webcit_icons/openid-small.gif"
+ fi
+ cd ..; tar --exclude .gitignore --exclude "debian/*" $NONDFSG -cvhzf webcit-${WEBCIT_VERSION}.tar.gz webcit-${WEBCIT_VERSION}/
+ ;;
+ i18n)
+ ./webcit -G `pwd`/i18n_templatelist.c
+ cd po; ./create-pot.sh
+ ;;
+ *)
+ echo "Not yet implemented. we have: debian, sourcedist, i18n (needs ready compiled & installed webcit in your system)"