# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
|
|
#
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
# Please add additional copyright information _after_ the line containing
|
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
|
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
|
|
#
|
|
# ROCK Linux: rock-src/package/public/typo3/typo3.conf
|
|
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version. A copy of the GNU General Public
|
|
# License can be found at Documentation/COPYING.
|
|
#
|
|
# Many people helped and are helping developing ROCK Linux. Please
|
|
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
|
|
# file for details.
|
|
#
|
|
# --- ROCK-COPYRIGHT-NOTE-END ---
|
|
|
|
#FIXME: I need apache's $localstatedir
|
|
if [ "$ROCKCFG_PKG_APACHE_PREFIX" ] ; then
|
|
apacheprefix="$ROCKCFG_PKG_APACHE_PREFIX"
|
|
if [ "$apacheprefix" = "/usr" ]; then
|
|
apachelocalstatedir="var/apache"
|
|
else
|
|
apachelocalstatedir="var/$apacheprefix"
|
|
fi
|
|
else
|
|
apachelocalstatedir="var/opt/apache"
|
|
fi
|
|
TYPO3BASE=$apachelocalstatedir/lib
|
|
TYPO3SRC=$TYPO3BASE/typo3_src
|
|
|
|
#FIXME should be config option
|
|
APACHEUSER=http
|
|
APACHEGROUP=http
|
|
|
|
typo3_random_md5() {
|
|
dd bs=64 count=1 if=/dev/random 2>/dev/null | md5sum | cut -f1 -d ' '
|
|
}
|
|
|
|
typo3_doc_files="ChangeLog GPL.txt LICENSE.txt Package.txt README.txt INSTALL.txt Package.txt"
|
|
typo3_doc() {
|
|
local each
|
|
|
|
echo "Creating documentation..."
|
|
for each in $typo3_doc_files; do
|
|
[ -f $each ] && cp -avP $each $docdir/
|
|
done
|
|
}
|
|
|
|
# this is called in the testsite/dummy/quickstart directory
|
|
typo3_src_links() {
|
|
# main typo3 installation
|
|
ln -svf /$TYPO3SRC typo3_src
|
|
|
|
for i in t3lib tslib typo3; do
|
|
ln -svf typo3_src/$i
|
|
done
|
|
|
|
ln -svf tslib/media
|
|
ln -svf tslib/showpic.php
|
|
ln -svf tslib/index_ts.php index.php
|
|
}
|
|
|
|
# this is called in the testsite/dummy/quickstart directory
|
|
typo3_access() {
|
|
chown daemon.$APACHEGROUP . -R
|
|
mkdir -p typo3temp/ \
|
|
typo3/{temp,ext} \
|
|
typo3conf/ext \
|
|
fileadmin/_temp_ \
|
|
uploads/{pics,media,tf}
|
|
chmod 0750 typo3temp/ \
|
|
typo3/{temp,ext} \
|
|
typo3conf/{,ext,localconf.php} \
|
|
fileadmin/{,_temp_} \
|
|
uploads/{,pics,media,tf}
|
|
chown $APACHEUSER.$APACHEGROUP typo3temp/ \
|
|
typo3/{temp,ext} \
|
|
typo3conf/{,ext,localconf.php} \
|
|
fileadmin/{,_temp_} \
|
|
uploads/{,pics,media,tf}
|
|
}
|
|
|
|
typo3_site() {
|
|
local each
|
|
|
|
echo "Installing files..."
|
|
rm -rf $root/$TYPO3BASE/typo3-$1
|
|
for each in fileadmin typo3conf typo3temp uploads; do
|
|
mkdir -p $root/$TYPO3BASE/typo3-$1/$each
|
|
if [ ! "`echo $builddir/$1-$ver/$each/*`" = "$builddir/$1-$ver/$each/*" ]; then
|
|
cp -avP $builddir/$1-$ver/$each/* $root/$TYPO3BASE/typo3-$1/$each/
|
|
fi
|
|
done
|
|
|
|
cp -avP $builddir/$1-$ver/clear.gif $root/$TYPO3BASE/typo3-$1/
|
|
cp -avP $builddir/$1-$ver/_.htaccess $root/$TYPO3BASE/typo3-$1/.htaccess
|
|
|
|
(
|
|
cd $root/$TYPO3BASE/typo3-$1
|
|
typo3_src_links
|
|
typo3_access
|
|
)
|
|
|
|
typo3_doc
|
|
cp -avP $confdir/README.txt $docdir/README.ROCK-Linux
|
|
}
|
|
|
|
###################################################################################
|
|
typo3_testsite() {
|
|
typo3_site testsite
|
|
}
|
|
|
|
typo3_dummy() {
|
|
typo3_site dummy
|
|
}
|
|
|
|
typo3_quickstart() {
|
|
typo3_site quickstart
|
|
}
|
|
|
|
typo3_src() {
|
|
local each
|
|
|
|
echo "Installing files..."
|
|
rm -rf $root/$TYPO3SRC
|
|
for each in misc t3lib typo3; do
|
|
mkdir -p $root/$TYPO3SRC/$each
|
|
cp -avP $builddir/typo3_src-$ver/$each/* $root/$TYPO3SRC/$each/
|
|
done
|
|
ln -sv typo3/sysext/cms/tslib $root/$TYPO3SRC/tslib
|
|
|
|
# correct user/group
|
|
chown daemon.$APACHEGROUP $root/$TYPO3SRC -R
|
|
chown $APACHEUSER.$APACHEGROUP $root/$TYPO3SRC/typo3/ext
|
|
chmod o-rwx $root/$TYPO3SRC -R
|
|
|
|
# create typo3_src/typo3/install/.htaccess
|
|
mv -vf $root/$TYPO3SRC/typo3/install/_.htaccess \
|
|
$root/$TYPO3SRC/typo3/install/.htaccess
|
|
sed -i "s,/www,/$TYPO3SRC/typo3/install," $root/$TYPO3SRC/typo3/install/.htaccess
|
|
|
|
# documentation
|
|
typo3_doc
|
|
}
|
|
|
|
custmain=typo3_${xpkg#typo3-}
|
|
chownsrcdir=0
|
|
createdocs=0
|