# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 inherit webapp-apache #MY_PV="${PV/_rc2/}RC2_220304" MY_PV="${PV}" SRC_URI="http://typo3.sunsite.dk/unix-archives/3.6.1/typo3_src/${PN}_src-${MY_PV}.tar.gz testsite? ( http://typo3.sunsite.dk/unix-archives/3.6.1/testsite/testsite-3.6.1.tar.gz ) dummy? ( http://typo3.sunsite.dk/unix-archives/3.6.1/dummy/dummy-3.6.1.tar.gz ) freesite? ( http://typo3.sunsite.dk/unix-archives/3.6.1/freesite/freesite-3.6.1.tar.gz ) quickstart? ( http://typo3.sunsite.dk/unix-archives/3.6.1/quickstart/quickstart-3.6.1.tar.gz )" #http://130.228.0.33/t3dl/src/global_extensions-${MY_PV}.tar.gz IUSE="testsite dummy freesite quickstart" KEYWORDS="~x86 ~ppc" DESCRIPTION="TYPO3 is a free Open Source content management system for enterprise purposes on the web and in intranets." HOMEPAGE="http://www.typo3.com/ http://typo3.org/" RDEPEND="~media-libs/freetype-1.3.1-r3 media-libs/jpeg sys-libs/zlib media-libs/tiff media-libs/libpng media-libs/libgd ~media-gfx/imagemagick sys-devel/gettext media-libs/ming media-libs/pdflib dev-db/mysql net-www/apache dev-php/mod_php" LICENSE="GPL" RESTRICT="nostrip" SLOT="${PV}" MY_P=${PN}_src-${PV} S=${WORKDIR}/${MY_P} webapp-detect || NO_WEBSERVER=1 pkg_setup() { if [ "x${INSTALLDIR}" = x ] ; then if [ -L ${HTTPD_ROOT}/${PN} ] ; then ewarn "You need to unmerge your old ${PN} version first." ewarn "${PN} will be installed into ${HTTPD_ROOT}/${PN}" ewarn "directly instead of a version-dependant directory." die "need to unmerge old version first" fi INSTALLDIR="${HTTPD_ROOT}/${PN}" fi webapp-pkg_setup "${NO_WEBSERVER}" einfo "Installing into ${INSTALLDIR}" einfo "For installing in a different directory type" einfo "INSTALLDIR=\"/my/installdir/\" USE=\"my-package\" emerge typo3" # for TICKER in 1 2 3 4 5; do # # Double beep here. # echo -ne "\a" ; sleep 0.1 &>/dev/null ; sleep 0,1 &>/dev/null # echo -ne "\a" ; sleep 1 # done # sleep 8 x=0 if [ `use testsite` ] ; then package="testsite" let x=$x+1; fi if [ `use dummy` ] ; then package="dummy" let x=$x+1; fi if [ `use freesite` ] ; then package="freesite" let x=$x+1; fi if [ `use quickstart` ] ; then package="quickstart" let x=$x+1; fi if [ "$x" != "1" ] ; then eerror "set USE to one of \"testsite\" \"dummy\" \"quickstart\" or \"freesite\"" eerror "e.g. try USE=\"testsite\" emerge ${P}" die "No package given to install." fi } pkg_preinst() { einfo "Generating links for freetype 1.3.1" ln -fs /usr/include/freetype/* /usr/include } src_install() { webapp-mkdirs cd ${WORKDIR} ln -s ${MY_P} ${PN}_src cd ${WORKDIR}/${PN}_src/typo3/install/ cp index.php index.php.orig sed -e 's:die:#die:g' index.php.orig > index.php || die "sed command failed!" rm index.php.orig cd ${WORKDIR}/${PN}_src/t3lib cp class.t3lib_install.php class.t3lib_install.php.orig sed -e 's:mysql_create_db($newdbname):mysql_query("CREATE DATABASE $newdbname"):g' class.t3lib_install.php.orig > class.t3lib_install.php rm class.t3lib_install.php.orig local destdir=${INSTALLDIR}/ cd ${WORKDIR} if [ `use testsite` ] ; then mv testsite-3.6.1 testsite touch testsite/typo3temp/.keep testsite/fileadmin/_temp_/.keep ln -s testsite htdocs cd testsite rm -rf t3lib media tslib typo3 ln -s ../${PN}_src/t3lib t3lib ln -s ../${PN}_src/tslib tslib ln -s tslib/media media ln -s ../${PN}_src/typo3 typo3 mkdir -p typo3/temp chmod 777 typo3temp typo3/temp typo3conf typo3conf/ext typo3/ext uploads uploads/pics uploads/media uploads/tf fileadmin touch typo3/temp/.keep typo3conf/ext/.keep uploads/pics/.keep uploads/media/.keep uploads/tf/.keep chmod ug+w fileadmin/_temp_/ fi if [ `use dummy` ] ; then mv dummy-3.6.1 dummy touch dummy/typo3temp/.keep dummy/fileadmin/_temp_/.keep ln -s dummy htdocs cd dummy rm -rf t3lib media tslib typo3 ln -s ../${PN}_src/t3lib t3lib ln -s ../${PN}_src/tslib tslib ln -s tslib/media media ln -s ../${PN}_src/typo3 typo3 mkdir -p typo3/temp chmod 777 typo3temp typo3/temp typo3conf typo3conf/ext typo3/ext uploads uploads/pics uploads/media uploads/tf fileadmin touch typo3conf/ext/.keep uploads/pics/.keep uploads/media/.keep uploads/tf/.keep chmod ug+w fileadmin/_temp_/ fi if [ `use freesite` ] ; then mv freesite-3.6.1 freesite touch freesite/typo3temp/.keep freesite/fileadmin/_temp_/.keep ln -s freesite htdocs cd freesite rm -rf t3lib media tslib typo3 ln -s ../${PN}_src/t3lib t3lib ln -s ../${PN}_src/tslib tslib ln -s tslib/media media ln -s ../${PN}_src/typo3 typo3 mkdir -p typo3/temp/ mkdir -p typo3conf/ext/ chmod 777 typo3temp typo3/temp typo3conf typo3conf/ext typo3/ext uploads uploads/pics uploads/media uploads/tf fileadmin touch typo3/temp/.keep typo3conf/ext/.keep uploads/pics/.keep uploads/media/.keep uploads/tf/.keep chmod ug+w fileadmin/_temp_/ fi if [ `use quickstart` ] ; then mv quickstart-3.6.1 quickstart touch quickstart/fileadmin/_temp_/.keep ln -s quickstart htdocs cd quickstart rm -rf t3lib media tslib typo3 ln -s ../${PN}_src/t3lib t3lib ln -s ../${PN}_src/tslib tslib ln -s tslib/media media ln -s ../${PN}_src/typo3 typo3 mkdir -p typo3/temp/ mkdir -p typo3conf/ext/ chmod 777 typo3temp typo3/temp typo3conf typo3conf/ext typo3/ext uploads uploads/pics uploads/media uploads/tf fileadmin touch typo3/temp/.keep typo3conf/ext/.keep uploads/pics/.keep uploads/media/.keep uploads/tf/.keep chmod ug+w fileadmin/_temp_/ fi cd ${WORKDIR} chown --quiet -R ${HTTPD_USER}:${HTTPD_GROUP} * find -type l -exec chown root:root {} \; find -type d -exec mkdir -p ${D}${destdir}/{} \; find -type d -exec chown ${HTTPD_USER}:${HTTPD_GROUP} ${D}${destdir}/{} \; find -type f -exec cp -p {} ${D}${destdir}/{} \; find -type l -exec cp -r {} ${D}${destdir}/{} \; } pkg_postinst(){ einfo " *** NOTE libgd ***" einfo "libgd needs to be compiled with USE=\"gif\"" einfo "If you don't have \"gif\" in your USE libgd needs a recompile." einfo " *** NOTE mod_php ***" einfo "If your mod_php was compiled before libgd it needs to be recompiled." einfo "Also you need to set \"gd-external\" in your USE variable." einfo " *** NOTE typo3 ***" einfo "start your mysqld and apache and place your browser to " einfo "http://www.yourhost.com/typo3/USE_Type/" einfo "where USE_Type is : testsite or quickstart or dummy and follow the" einfo "1-2-3 Install-Tool." einfo "After the 1-2-3 Install-Tool you can log in to typo3 backend with:" einfo " admin / password" einfo "" einfo " Have a nice day!" }