# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 inherit webapp-apache MY_PV="${PV/_rc1/}RC1" SRC_URI="http://130.228.0.33/t3dl/src/${PN}_src-${MY_PV}.tgz testsite? ( http://typo3.sunsite.dk/zip-archives/testsite-3.5.0.zip ) dummy? ( http://typo3.sunsite.dk/zip-archives/dummy-3.5.0.zip ) freesite? ( http://typo3.sunsite.dk/zip-archives/freesite_100503.zip )" IUSE="testsite dummy freesite" 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-4.2.9 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-${MY_PV} S=${WORKDIR}/${MY_P} webapp-detect || NO_WEBSERVER=1 pkg_setup() { 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 webapp-pkg_setup "${NO_WEBSERVER}" einfo "Installing into ${ROOT}${HTTPD_ROOT}" 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 [ "$x" != "1" ] ; then eerror "set USE to one of \"testsite\" \"dummy\" 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!" local DocumentRoot=${HTTPD_ROOT} local destdir=${DocumentRoot}/typo3 if [ `use testsite` ] ; then cd ${WORKDIR} touch testsite-3.5.0/typo3temp/.keep touch testsite-3.5.0/fileadmin/_temp_/.keep cd testsite-3.5.0 rm -rf t3lib media tslib typo3 mkdir -p typo3/temp ln -s ../${PN}_src/t3lib t3lib ln -s ../${PN}_src/tslib tslib ln -s tslib/media media ln -s ../${PN}_src/typo3 typo3 chmod 777 typo3temp chmod 777 typo3/temp chmod 777 typo3conf/ chmod 777 typo3conf/ext/ chmod 777 typo3/ext/ chmod 777 uploads/ chmod 777 uploads/pics/ chmod 777 uploads/media/ chmod 777 uploads/tf/ chmod 777 fileadmin/ chmod ug+w fileadmin/_temp_/ fi if [ `use dummy` ] ; then cd ${WORKDIR} touch dummy-3.5.0/typo3temp/.keep touch dummy-3.5.0/fileadmin/_temp_/.keep cd dummy-3.5.0 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 chmod 777 typo3/temp chmod 777 typo3conf/ chmod 777 typo3conf/ext/ chmod 777 typo3/ext/ chmod 777 uploads/ chmod 777 uploads/pics/ chmod 777 uploads/media/ chmod 777 uploads/tf/ chmod 777 fileadmin/ chmod ug+w fileadmin/_temp_/ fi if [ `use freesite` ] ; then cd ${WORKDIR} mv freesite freesite-${PV} touch freesite-${PV}/typo3temp/.keep touch freesite-${PV}/fileadmin/_temp_/.keep cd freesite-${PV} rm -rf t3lib media tslib typo3 mkdir -p typo3/temp ln -s ../${PN}_src/t3lib t3lib ln -s ../${PN}_src/tslib tslib ln -s tslib/media media ln -s ../${PN}_src/typo3 typo3 chmod 777 typo3temp chmod 777 typo3/temp chmod 777 typo3conf/ mkdir typo3conf/ext/ chmod 777 typo3conf/ext/ chmod 777 typo3/ext/ chmod 777 uploads/ chmod 777 uploads/pics/ chmod 777 uploads/media/ chmod 777 uploads/tf/ chmod 777 fileadmin/ 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/${package}-3.5.0/ 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!" }