10
# Create a temp folder to create the dfsg version in
11
if [ -e /etc/redhat-release ] ; then
12
MKTEMP="mktemp -d -p /tmp"
17
TMPDIR=`${MKTEMP} ${PKGNAME}.XXXXXX`
18
DIRNAME=${PKGNAME}-${VERS}
19
mkdir -p ${TMPDIR}/${DIRNAME}
21
# Copy all in the dest dir
22
cp -auxf * ${TMPDIR}/${DIRNAME}
23
cd ${TMPDIR}/${DIRNAME}
24
# Extract the scripts.tar.gz, delete Debian packaged libs, fix perms
25
tar -xzf scripts.tar.gz
26
rm -rf scripts/editarea scripts/extjs3 scripts/yui scripts.tar.gz
27
chmod 644 scripts/*.php scripts/index.html scripts/extjs3-ext/*/*
28
chmod 755 scripts scripts/extjs3-ext scripts/extjs3-ext/*
30
# Remove php-* Debian packaged libs
31
rm -rf libraries/Auth libraries/Console libraries/geshi libraries/HTTP libraries/compat.php41x.php libraries/compat.php42x.php libraries/compat.php50x.php
32
rm -rf libraries/JSON.php libraries/MIME libraries/PEAR.php libraries/Tar.php libraries/System.php
33
rm -rf libraries/FTP.php libraries/FTP
34
# Create the archive, move it to dest, delete temp folder
36
tar -czf ${PKGNAME}_${VERS}.orig.tar.gz ${DIRNAME}
38
mv ${TMPDIR}/${PKGNAME}_${VERS}.orig.tar.gz ..