improve performance of specific file accesses (e.g. for check_interface_language) through caching

allow to reset "owner"
update language files
update packaging scripts
only build i386 debian package
clarified some copyright stuff
move URL of data files from /ezmlm-web-data/ to /ezmlm-web/ (debian policy)
add example config file for apache
fixed 'usr/local/' to 'usr/local/' patch for debian
moved "confirmation selection" from "easy" to "expert"
ezmlm-web version number for web interface footer is retrieved from the SPOT ezmlm-web.cgi
This commit is contained in:
lars 2007-08-07 22:48:40 +00:00
parent 9a914eb0f4
commit 4954a16acf
2 changed files with 81 additions and 4 deletions

66
make-deb.sh Executable file
View file

@ -0,0 +1,66 @@
#!/bin/sh
set -eu
PRJ_ROOT=$(dirname $(cd "$(dirname $0)"; pwd))
#ARCHITECTURES="i386 ia64 alpha amd64 armeb arm hppa m32r m68k mips mipsel powerpc ppc64 s390 s390x sh3 sh3eb sh4 sh4eb sparc"
ARCHITECTURES="i386"
PREFIX=ezmlm-web
get_debian_version()
# compare the given version with the one from debian/changelog
{
head -1 "$SRC_DIR/debian/changelog" | cut -f 2 -d "(" | cut -f 1 -d "-"
}
set_package_version()
# set the version attribute in ezmlm-web.cgi
{
sed -i "s/^\$VERSION = '.*$/\$VERSION = '$1';/" "$SRC_DIR/ezmlm-web.cgi"
}
[ $# -lt 1 -o $# -gt 2 ] && echo "Syntax: `basename $0` VERSION {PATH}" && echo && exit 1
REL_SRC_DIR=${PREFIX}-${1}
[ $# -eq 2 ] && REL_SRC_DIR=$2
SRC_DIR=$(cd "$(pwd)/$REL_SRC_DIR"; pwd)
[ ! -d "$SRC_DIR" ] && echo "the directory '$REL_SRC_DIR' does not exist!" && exit 2
deb_version=$(get_debian_version)
if test "$1" = "$deb_version"
then true
else echo "The version number you specified ($1) was not equal to the current debian changelog version ($deb_version)!"
echo "Run 'debchange -i' to create a new changelog entry."
echo
exit 3
fi
set_package_version "$1"
# create the tar file
"$(dirname $0)/make-tar.sh" "$@"
TAR_FILE=$PRJ_ROOT/tags/packages/${PREFIX}-${1}.tar.gz
DEB_DIR=$(dirname "$TAR_FILE")/debian
TMP_DIR=/tmp/builddir-$PREFIX-$$
mkdir -p "$TMP_DIR"
cd "$TMP_DIR"
NEW_TAR_FILE=${PREFIX}_${1}.orig.tar.gz
cp "$TAR_FILE" "$NEW_TAR_FILE"
tar xzf "$TAR_FILE"
cd "$PREFIX-$1"
svn export "$SRC_DIR/debian" debian
# problem: the orig tarball is being rebuild again and again - so it is always different
for arch in $ARCHITECTURES
do dpkg-buildpackage -tc -us -uc -rfakeroot -a$arch
#do debuild -us -uc -a$arch
done
mkdir -p "$DEB_DIR"
for a in "$TMP_DIR"/${PREFIX}*
do test -f "$a" && mv "$a" "$DEB_DIR/"
done

View file

@ -2,14 +2,25 @@
set -eu set -eu
PRJ_ROOT=$(dirname $(cd "$(dirname $0)"; pwd))
PREFIX=ezmlm-web PREFIX=ezmlm-web
[ $# -ne 1 ] && echo "Syntax: `basename $0` VERSION" && echo && exit 1 [ $# -lt 1 -o $# -gt 2 ] && echo "Syntax: `basename $0` VERSION" && echo && exit 1
[ ! -d "${PREFIX}-${1}" ] && echo "the directory '${PREFIX}-${1}' does not exist!" && exit 2 REL_SRC_DIR=${PREFIX}-${1}
[ $# -eq 2 ] && REL_SRC_DIR=$2
SRC_DIR=$(cd "$(pwd)/$REL_SRC_DIR"; pwd)
[ ! -d "$SRC_DIR" ] && echo "the directory '$REL_SRC_DIR' does not exist!" && exit 2
TAR_FILE=$PRJ_ROOT/tags/packages/${PREFIX}-${1}.tar.gz
TMP_DIR=/tmp/${PREFIX}-${1} TMP_DIR=/tmp/${PREFIX}-${1}
[ -e "$TMP_DIR" ] && rm -rf "$TMP_DIR" [ -e "$TMP_DIR" ] && rm -rf "$TMP_DIR"
svn export "${PREFIX}-${1}" "$TMP_DIR" svn export "$SRC_DIR" "$TMP_DIR"
tar czf "packages/${PREFIX}-${1}.tar.gz" -C "$(dirname $TMP_DIR)" --exclude debian --owner=0 --group=0 "$(basename $TMP_DIR)"
# update language files
"$TMP_DIR/scripts/update_language_files.py"
tar czf "$PRJ_ROOT/tags/packages/${PREFIX}-${1}.tar.gz" -C "$(dirname $TMP_DIR)" --exclude-from="$SRC_DIR/package.exclude" --owner=0 --group=0 "$(basename $TMP_DIR)"
rm -rf "$TMP_DIR" rm -rf "$TMP_DIR"