1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#!/bin/sh
set -e
set -x
VERS=2.1.0b6+dfsg
PKGNAME=extplorer
MYCWD=`pwd`
# Create a temp folder to create the dfsg version in
if [ -e /etc/redhat-release ] ; then
MKTEMP="mktemp -d -p /tmp"
else
MKTEMP="mktemp -d -t"
fi
TMPDIR=`${MKTEMP} ${PKGNAME}.XXXXXX`
DIRNAME=${PKGNAME}-${VERS}
mkdir -p ${TMPDIR}/${DIRNAME}
# Copy all in the dest dir
cp -auxf * ${TMPDIR}/${DIRNAME}
cd ${TMPDIR}/${DIRNAME}
# Extract the scripts.tar.gz, delete Debian packaged libs, fix perms
tar -xzf scripts.tar.gz
rm -rf scripts/editarea scripts/extjs3 scripts/yui scripts.tar.gz
chmod 644 scripts/*.php scripts/index.html scripts/extjs3-ext/*/*
chmod 755 scripts scripts/extjs3-ext scripts/extjs3-ext/*
rm -rf debian .git
# Remove php-* Debian packaged libs
rm -rf libraries/Auth libraries/Console libraries/geshi libraries/HTTP libraries/compat.php41x.php libraries/compat.php42x.php libraries/compat.php50x.php
rm -rf libraries/JSON.php libraries/MIME libraries/PEAR.php libraries/Tar.php libraries/System.php
rm -rf libraries/FTP.php libraries/FTP
# Create the archive, move it to dest, delete temp folder
cd ..
tar -czf ${PKGNAME}_${VERS}.orig.tar.gz ${DIRNAME}
cd ${MYCWD}
mv ${TMPDIR}/${PKGNAME}_${VERS}.orig.tar.gz ..
rm -rf ${TMPDIR}
|