OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 13-Dec-2007 15:49:56
Branch: HEAD Handle: 2007121314495501
Added files:
openpkg-src/typo3 rc.typo3 typo3-apache.conf typo3-setup.sh
typo3.spec
Log:
new package: typo3 4.1.4 (Enterprise Content Management System (CMS))
Summary:
Revision Changes Path
1.1 +42 -0 openpkg-src/typo3/rc.typo3
1.1 +98 -0 openpkg-src/typo3/typo3-apache.conf
1.1 +28 -0 openpkg-src/typo3/typo3-setup.sh
1.1 +199 -0 openpkg-src/typo3/typo3.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/typo3/rc.typo3
============================================================================
$ cvs diff -u -r0 -r1.1 rc.typo3
--- /dev/null 2007-12-13 15:49:02 +0100
+++ rc.typo3 2007-12-13 15:49:56 +0100
@@ -0,0 +1,42 @@
[EMAIL PROTECTED]@/bin/openpkg rc
+##
+## rc.typo3 -- Run-Commands
+##
+
+%config
+ typo3_enable="$openpkg_rc_def"
+ typo3_cron="yes"
+
+%common
+ typo3_apache_cfgfile="@l_prefix@/etc/typo3/typo3-apache.conf"
+ typo3_apache_pidfile="@l_prefix@/var/typo3/run/typo3-apache.pid"
+
+%status -u @l_susr@ -o
+ typo3_usable="no"
+ typo3_active="no"
+ @l_prefix@/sbin/apache -t -f $typo3_apache_cfgfile 2>/dev/null && \
+ typo3_usable="yes"
+ [ -f $typo3_apache_pidfile ] && \
+ kill -0 `cat $typo3_apache_pidfile` && \
+ typo3_active="yes"
+ echo "typo3_enable=\"$typo3_enable\""
+ echo "typo3_usable=\"$typo3_usable\""
+ echo "typo3_active=\"$typo3_active\""
+
+%start -u @l_susr@
+ rcService typo3 enable yes || exit 0
+ rcService typo3 active yes && exit 0
+ @l_prefix@/sbin/apache -f $typo3_apache_cfgfile
+
+%stop -u @l_susr@
+ rcService typo3 enable yes || exit 0
+ rcService typo3 active no && exit 0
+ [ -f $typo3_apache_pidfile ] && \
+ kill -TERM `cat $typo3_apache_pidfile`
+ sleep 2
+
+%restart -u @l_susr@
+ rcService typo3 enable yes || exit 0
+ rcService typo3 active no && exit 0
+ rc typo3 stop start
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/typo3/typo3-apache.conf
============================================================================
$ cvs diff -u -r0 -r1.1 typo3-apache.conf
--- /dev/null 2007-12-13 15:49:02 +0100
+++ typo3-apache.conf 2007-12-13 15:49:56 +0100
@@ -0,0 +1,98 @@
+##
+## typo3-apache.conf -- TYPO3 Apache Custom Configuration
+##
+
+ServerRoot @l_prefix@
+ServerAdmin root@@[EMAIL PROTECTED]@l_domainname@
+ServerName @[EMAIL PROTECTED]@l_domainname@
+ServerTokens Prod
+User @l_rusr@
+Group @l_rgrp@
+Listen 127.0.0.1:8082
+
+# runtime files
+PidFile @l_prefix@/var/typo3/run/typo3-apache.pid
+ScoreBoardFile @l_prefix@/var/typo3/run/typo3-apache.sb
+LockFile @l_prefix@/var/typo3/run/typo3-apache.lck
+
+# include apache-php
+Include @l_prefix@/etc/apache/apache.d/apache-php.conf
+
+# server behaviour
+Timeout 300
+KeepAlive on
+MaxKeepAliveRequests 100
+KeepAliveTimeout 15
+MinSpareServers 5
+MaxSpareServers 10
+StartServers 5
+MaxClients 15
+MaxRequestsPerChild 500
+HostnameLookups off
+UseCanonicalName on
+
+# access logging
+LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\"" combined
+LogFormat "%h %l %u %t \"%r\" %>s %b" common
+LogFormat "%{Referer}i -> %U" referer
+LogFormat "%{User-agent}i" agent
+CustomLog @l_prefix@/var/typo3/log/typo3-apache.access.log
common
+
+# error logging
+LogLevel warn
+ErrorLog @l_prefix@/var/typo3/log/typo3-apache.error.log
+ServerSignature on
+
+# secure root directory
+<Directory />
+ Options FollowSymLinks
+ AllowOverride None
+</Directory>
+
+# browser specifics
+BrowserMatch "Mozilla/2" nokeepalive
+BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
+BrowserMatch "RealPlayer 4\.0" force-response-1.0
+BrowserMatch "Java/1\.0" force-response-1.0
+BrowserMatch "JDK/1\.0" force-response-1.0
+
+# SSL/TLS support
+<IfModule ssl_module>
+ SSLRandomSeed startup builtin
+ SSLRandomSeed connect builtin
+ SSLMutex sem
+ SSLSessionCache
shmcb:@l_prefix@/var/typo3/typo3-apache.scache(512000)
+ SSLSessionCacheTimeout 300
+ SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
+ SetEnvIf User-Agent ".*MSIE.*" \
+ nokeepalive ssl-unclean-shutdown \
+ downgrade-1.0 force-response-1.0
+ <Files ~ "\.(cgi|shtml|phtml|php?)$">
+ SSLOptions +StdEnvVars
+ </Files>
+ <Directory "@l_prefix@/cgi">
+ SSLOptions +StdEnvVars
+ </Directory>
+</IfModule>
+
+# configure TYPO3
+AddType application/x-httpd-php .php
+php_admin_flag safe_mode 0
+php_admin_flag magic_quotes_gpc 0
+php_admin_flag register_globals 0
+php_admin_flag session.auto_start 0
+php_admin_value upload_tmp_dir @l_prefix@/var/typo3/tmp
+php_admin_value memory_limit 32M
+php_admin_value post_max_size 32M
+php_admin_value upload_max_filesize 10M
+DocumentRoot @l_prefix@/var/typo3/cms
+DirectoryIndex index.php
+ErrorDocument 404 /index.php
+ExpiresByType text/html A1
+<Directory "@l_prefix@/var/typo3/cms">
+ Options -Indexes +FollowSymLinks
+ AllowOverride All
+ Order allow,deny
+ Allow from all
+</Directory>
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/typo3/typo3-setup.sh
============================================================================
$ cvs diff -u -r0 -r1.1 typo3-setup.sh
--- /dev/null 2007-12-13 15:49:02 +0100
+++ typo3-setup.sh 2007-12-13 15:49:56 +0100
@@ -0,0 +1,28 @@
+#!/bin/sh
+##
+## typo3-setup
+##
+
+# determine MySQL root password
+username=`grep "^user" @l_prefix@/etc/mysql/my.pwd |\
+ sed -e 's;^user[^=]*= *;;' -e 's; *$;;'`
+password=`grep "^password" @l_prefix@/etc/mysql/my.pwd |\
+ sed -e 's;^password[^=]*= *;;' -e 's; *$;;'`
+
+# dispatch operation
+cmd="${1:-"install"}"
+case "$cmd" in
+ install )
+ # create the MySQL database for TYPO3
+ @l_prefix@/bin/mysqladmin --user="$username" --password="$password"
create typo3
+ ( echo "GRANT ALL ON typo3.* TO [EMAIL PROTECTED] IDENTIFIED BY
'typo3';"
+ echo "FLUSH PRIVILEGES;"
+ ) | @l_prefix@/bin/mysql --user="$username" --password="$password"
typo3
+ ;;
+ uninstall )
+ # remove the database
+ ( echo "DROP DATABASE typo3;"
+ ) | @l_prefix@/bin/mysql --user="$username" --password="$password"
mysql
+ ;;
+esac
+
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/typo3/typo3.spec
============================================================================
$ cvs diff -u -r0 -r1.1 typo3.spec
--- /dev/null 2007-12-13 15:49:02 +0100
+++ typo3.spec 2007-12-13 15:49:56 +0100
@@ -0,0 +1,199 @@
+##
+## typo3.spec -- OpenPKG RPM Package Specification
+## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
+## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+
+# package information
+Name: typo3
+Summary: Enterprise Content Management System (CMS)
+URL: http://typo3.com/
+Vendor: TYPO3 Association et al.
+Packager: OpenPKG Foundation e.V.
+Distribution: OpenPKG Community
+Class: EVAL
+Group: CMS
+License: GPL
+Version: 4.1.4
+Release: 20071213
+
+# list of sources
+Source0:
http://typo3.org/fileadmin/dl/packages/typo3_src-%{version}.tar.gz
+Source1: http://typo3.org/fileadmin/dl/packages/dummy-%{version}.tar.gz
+Source2: rc.typo3
+Source3: typo3-apache.conf
+Source4: typo3-setup.sh
+
+# build information
+Prefix: %{l_prefix}
+BuildRoot: %{l_buildroot}
+BuildPreReq: OpenPKG, openpkg >= 20060823, cpio
+PreReq: OpenPKG, openpkg >= 20060823
+PreReq: apache
+PreReq: apache-php
+PreReq: apache-php::with_mysql = yes
+PreReq: apache-php::with_pcre = yes
+PreReq: apache-php::with_sendmail = yes
+PreReq: apache-php::with_gd = yes
+PreReq: apache-php::with_freetype = yes
+PreReq: apache-php::with_mm = yes
+PreReq: apache-php::with_xml = yes
+AutoReq: no
+AutoReqProv: no
+
+%description
+ TYPO3 is a free Open Source content management system for enterprise
+ purposes on the Web and in intranets. It offers full flexibility
+ and extendability while featuring an accomplished set of ready-made
+ interfaces, functions and modules.
+
+%track
+ prog typo3:typo3 = {
+ version = %{version}
+ url = http://typo3.org/download/packages/
+ regex = typo3_src-(\d+\.\d+\.\d+)\.tar\.gz
+ }
+ prog typo3:dummy = {
+ version = %{version}
+ url = http://typo3.org/download/packages/
+ regex = dummy-(\d+\.\d+\.\d+)\.tar\.gz
+ }
+
+%prep
+ %setup -q -n typo3_src-%{version}
+
+%build
+ %{l_shtool} subst \
+ -e 's;/usr/X11R6/bin/;%{l_prefix}/bin/;' \
+ -e 's;/usr/bin/;%{l_prefix}/bin/;' \
+ t3lib/config_default.php
+
+%install
+ # create installation hierarchy
+ rm -rf $RPM_BUILD_ROOT
+ %{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/sbin \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/typo3 \
+ $RPM_BUILD_ROOT%{l_prefix}/lib/typo3 \
+ $RPM_BUILD_ROOT%{l_prefix}/var/typo3/cms \
+ $RPM_BUILD_ROOT%{l_prefix}/var/typo3/run \
+ $RPM_BUILD_ROOT%{l_prefix}/var/typo3/log
+
+ # install program code
+ (find . -depth -print | cpio -o 2>/dev/null) |\
+ (cd $RPM_BUILD_ROOT%{l_prefix}/lib/typo3; cpio -idmu) || exit $?
+
+ # install skeleton CMS
+ %{l_shtool} install -c -m 644 \
+ %{SOURCE dummy-%{version}.tar.gz} \
+ $RPM_BUILD_ROOT%{l_prefix}/lib/typo3/
+
+ # install MySQL database setup script
+ %{l_shtool} install -c -m 755 %{l_value -s -a} \
+ %{SOURCE typo3-setup.sh} $RPM_BUILD_ROOT%{l_prefix}/sbin/typo3-setup
+
+ # install run-command script
+ %{l_shtool} install -c -m 755 %{l_value -s -a} \
+ %{SOURCE rc.typo3} \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
+
+ # install Apache server configuration
+ %{l_shtool} install -c -m 644 %{l_value -s -a} \
+ %{SOURCE typo3-apache.conf} \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/typo3/
+
+ # determine installation files
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
+ %{l_files_std} \
+ '%config %{l_prefix}/etc/typo3/typo3-apache.conf' \
+ '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/typo3/*'
+
+%files -f files
+
+%clean
+ rm -rf $RPM_BUILD_ROOT
+
+%post
+ if [ $1 -eq 1 ]; then
+ # make sure a default CMS named "typo3" is available
+ if [ ! -d $RPM_INSTALL_PREFIX/var/typo3/cms/typo3 ]; then
+ ( echo "Creating default CMS named \"typo3\""
+ ) | %{l_rpmtool} msg -b -t notice
+
+ # unpack skeleton CMS
+ ( cd $RPM_INSTALL_PREFIX/var/typo3/cms || exit $?
+ %{l_tar} xf
$RPM_INSTALL_PREFIX/lib/typo3/dummy-%{version}.tar.gz || exit $?
+ mv dummy-%{version} typo3 || exit $?
+ ) || exit $?
+
+ # link default CMS to program code
+ rm -f $RPM_INSTALL_PREFIX/var/typo3/cms/typo3/typo3_src
+ %{l_shtool} mkln -s \
+ $RPM_INSTALL_PREFIX/lib/typo3 \
+ $RPM_INSTALL_PREFIX/var/typo3/cms/typo3/typo3_src
+
+ # create hint file for TYPO3 1-2-3 installer
+ touch
$RPM_INSTALL_PREFIX/var/typo3/cms/typo3/typo3conf/ENABLE_INSTALL_TOOL
+
+ # fixate file ownerships
+ chown -R %{l_rusr}:%{l_rgrp} \
+ $RPM_INSTALL_PREFIX/var/typo3/cms/typo3 >/dev/null 2>&1 ||
true
+ fi
+
+ # display final hints on initial installation
+ ( echo "1. To complete this installation of TYPO3 please start MySQL
and"
+ echo " initialize the TYPO3 database like this:"
+ echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc mysql start"
+ echo " \$ $RPM_INSTALL_PREFIX/sbin/typo3-setup install"
+ echo ""
+ echo "2. By default, TYPO3 runs its own Apache server on IPv4
address"
+ echo " 127.0.0.1, TCP port 8082. Please change this by editing
the"
+ echo " \"Listen 127.0.0.1:8082\" directive in the configuration
file"
+ echo " $RPM_INSTALL_PREFIX/etc/typo3/typo3-apache.conf"
+ echo ""
+ echo "3. After this postinstallation, start TYPO3 by running"
+ echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc typo3 start"
+ echo " and initialize the TYPO3 database by connecting to:"
+ echo " http://127.0.0.1:8082/typo3/"
+ echo " Now configure TYPO3 for access to the database \"typo3\""
+ echo " with the login \"typo3\" and password \"typo3\"."
+ echo ""
+ echo "4. Now you can access TYPO3 at the following two URLs:"
+ echo " http://127.0.0.1:8082/typo3/ (website)"
+ echo " http://127.0.0.1:8082/typo3/typo3/ (administration)"
+ echo " Login with username \"admin\" and password \"password\""
+ echo " at the administration interface."
+ ) | %{l_rpmtool} msg -b -t notice
+ fi
+ exit 0
+
+%preun
+ if [ $1 -eq 0 ]; then
+ # before erase, stop service and remove log files
+ %{l_rc} typo3 stop 2>/dev/null
+ $RPM_INSTALL_PREFIX/sbin/typo3-setup uninstall >/dev/null 2>&1 ||
true
+ rm -rf $RPM_INSTALL_PREFIX/var/typo3/cms/* >/dev/null 2>&1 || true
+ rm -f $RPM_INSTALL_PREFIX/var/typo3/log/* >/dev/null 2>&1 || true
+ rm -f $RPM_INSTALL_PREFIX/var/typo3/run/* >/dev/null 2>&1 || true
+ fi
+ exit 0
+
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List [email protected]