joomla/joomla.spec

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 730
f516669e3b85
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

michael@535 1 ##
michael@535 2 ## joomla.spec -- OpenPKG RPM Package Specification
michael@535 3 ## Copyright (c) 2000-2011 OpenPKG Foundation e.V. <http://openpkg.net/>
michael@535 4 ##
michael@535 5 ## Permission to use, copy, modify, and distribute this software for
michael@535 6 ## any purpose with or without fee is hereby granted, provided that
michael@535 7 ## the above copyright notice and this permission notice appear in all
michael@535 8 ## copies.
michael@535 9 ##
michael@535 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@535 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@535 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@535 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@535 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@535 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@535 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@535 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@535 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@535 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@535 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@535 21 ## SUCH DAMAGE.
michael@535 22 ##
michael@535 23
michael@535 24 # package version
michael@723 25 %define V_dist 2.5.7
michael@723 26 %define V_opkg 2.5.7
michael@723 27 %define V_subdir 17410/76012
michael@535 28
michael@535 29 # package information
michael@535 30 Name: joomla
michael@535 31 Summary: Content Management System (CMS)
michael@535 32 URL: http://www.joomla.org/
michael@535 33 Vendor: Open Source Matters
michael@535 34 Packager: OpenPKG Foundation e.V.
michael@535 35 Distribution: OpenPKG Community
michael@535 36 Class: EVAL
michael@535 37 Group: CMS
michael@535 38 License: GPL/LGPL
michael@535 39 Version: %{V_opkg}
michael@536 40 Release: 20120800
michael@535 41
michael@535 42 # list of sources
michael@536 43 Source0: http://joomlacode.org/gf/download/frsrelease/%{V_subdir}/Joomla_%{V_dist}-Stable-Full_Package.tar.bz2
michael@535 44 Source1: joomla-setup.sh
michael@535 45 Source2: joomla-apache.conf
michael@535 46 Source3: rc.joomla
michael@535 47
michael@733 48 # still need to package
michael@733 49 # templates:
michael@733 50 # chicken
michael@733 51 # favourite
michael@733 52 # gantry
michael@733 53 # joomspirit_18
michael@733 54 # joomspirit_35
michael@733 55 # joomspirit_76
michael@733 56 # js_wright
michael@733 57 # pure_white
michael@733 58 # jp_bloq
michael@733 59 # jp_dailypraise
michael@733 60 # jp_demi
michael@733 61 # jp_genesis
michael@733 62 # jp_medium
michael@733 63 # rt_missioncontrol
michael@733 64 # rt_afterburner
michael@733 65 # rt_grunge
michael@733 66 # rt_quasar
michael@733 67 # branding in features/copyright.php
michael@733 68 # extensions:
michael@733 69 # hikashop
michael@733 70 # virtuemart
michael@733 71 # page qr code
michael@733 72 # nbill lite
michael@733 73 # smartcard
michael@733 74 # acymailing
michael@733 75 # phocamenu lite
michael@733 76 # roksprocket
michael@733 77 # rokbooster
michael@733 78 # rokquickcart
michael@733 79 # rokpad
michael@733 80 # embedchessboard
michael@733 81 # mod_chesspuzzle
michael@733 82 # mobile joomla
michael@733 83 # kunena
michael@733 84
michael@535 85 # build information
michael@536 86 BuildPreReq: OpenPKG, openpkg >= 20100101
michael@535 87 PreReq: OpenPKG, openpkg >= 20100101
michael@535 88 PreReq: apache
michael@535 89 PreReq: apache-php
michael@535 90 PreReq: apache-php::with_mysql = yes
michael@535 91 PreReq: apache-php::with_zlib = yes
michael@535 92 PreReq: apache-php::with_xml = yes
michael@535 93 PreReq: apache-php::with_gd = yes
michael@535 94 PreReq: apache-php::with_session = yes
michael@535 95 PreReq: apache-php::with_mm = yes
michael@535 96 PreReq: apache-php::with_sendmail = yes
michael@730 97 PreReq: apache-php::with_simplexml = yes
michael@535 98 PreReq: MTA
michael@535 99
michael@535 100 %description
michael@536 101 Joomla is a web based content management system (CMS) for publishing
michael@536 102 content on the internet and intranets. It features a model view
michael@536 103 controller (MVC) Web application framework and is useful for easily
michael@536 104 creating and building a websites and web enabled applications.
michael@536 105
michael@536 106 Joomla is written using object oriented programming techniques
michael@536 107 and software design patterns, stores data in a MySQL database,
michael@536 108 and includes features such as page caching, RSS feeds, printable
michael@536 109 versions of pages, news flashes, blogs, polls, search, and support
michael@536 110 for language internationalization.
michael@535 111
michael@535 112 %track
michael@535 113 prog joomla = {
michael@535 114 version = %{V_dist}
michael@535 115 url = http://joomlacode.org/gf/project/joomla/frs/
michael@535 116 regex = frsrelease/\d+/\d+/Joomla-(__VER__)\.tar\.gz
michael@535 117 }
michael@535 118 prog joomla:subdir = {
michael@535 119 version = %{V_subdir}
michael@535 120 url = http://joomlacode.org/gf/project/joomla/frs/
michael@535 121 regex = frsrelease/(\d+/\d+)/Joomla-__VER__\.tar\.gz
michael@535 122 }
michael@535 123
michael@535 124 %prep
michael@536 125 %setup -q -T -c -a 0
michael@535 126
michael@535 127 %build
michael@535 128
michael@535 129 %install
michael@535 130 # create installation hierarchy
michael@535 131 %{l_shtool} mkdir -f -p -m 755 \
michael@535 132 $RPM_BUILD_ROOT%{l_prefix}/sbin \
michael@535 133 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
michael@535 134 $RPM_BUILD_ROOT%{l_prefix}/etc/joomla \
michael@535 135 $RPM_BUILD_ROOT%{l_prefix}/lib/joomla/runtime \
michael@535 136 $RPM_BUILD_ROOT%{l_prefix}/var/joomla/db \
michael@535 137 $RPM_BUILD_ROOT%{l_prefix}/var/joomla/log \
michael@535 138 $RPM_BUILD_ROOT%{l_prefix}/var/joomla/run
michael@535 139
michael@535 140 # adjust default configuration
michael@535 141 %{l_shtool} subst \
michael@536 142 -e 's;/usr/sbin/sendmail;%{l_prefix}/sbin/sendmail;g' \
michael@536 143 libraries/phpmailer/phpmailer.php \
michael@536 144 installation/models/configuration.php \
michael@536 145 installation/configuration.php-dist \
michael@536 146 administrator/components/com_config/models/forms/application.xml
michael@535 147
michael@535 148 # install main program files
michael@535 149 find . -name ".#*" -print | xargs rm -f
michael@535 150 find . -name "*.orig" -print | xargs rm -f
michael@535 151 cp -rp * $RPM_BUILD_ROOT%{l_prefix}/lib/joomla/runtime/
michael@535 152 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/joomla/runtime/configuration.php-dist
michael@535 153 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/joomla/runtime/htaccess.txt
michael@535 154
michael@536 155 # postadjustment: move risky installation area out of runtime area
michael@536 156 # which will be dynmically linked in again later
michael@535 157 mv $RPM_BUILD_ROOT%{l_prefix}/lib/joomla/runtime/installation \
michael@535 158 $RPM_BUILD_ROOT%{l_prefix}/lib/joomla/installation
michael@535 159
michael@536 160 # install runcommand script
michael@535 161 %{l_shtool} install -c -m 755 %{l_value -s -a} \
michael@535 162 -e 's;@l_path@;%{l_build_path};' \
michael@535 163 %{SOURCE rc.joomla} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
michael@535 164
michael@535 165 # install setup script
michael@535 166 %{l_shtool} install -c -m 755 %{l_value -s -a} \
michael@535 167 %{SOURCE joomla-setup.sh} $RPM_BUILD_ROOT%{l_prefix}/sbin/joomla-setup
michael@535 168
michael@535 169 # install Apache configuration
michael@535 170 l_hostname=`%{l_shtool} echo -e %h`
michael@535 171 l_domainname=`%{l_shtool} echo -e %d | cut -c2-`
michael@535 172 %{l_shtool} install -c -m 644 %{l_value -s -a} \
michael@535 173 -e "s;@l_hostname@;$l_hostname;g" \
michael@535 174 -e "s;@l_domainname@;$l_domainname;g" \
michael@535 175 %{SOURCE joomla-apache.conf} \
michael@535 176 $RPM_BUILD_ROOT%{l_prefix}/etc/joomla/
michael@535 177
michael@535 178 # determine installation files
michael@535 179 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
michael@535 180 %{l_files_std} \
michael@535 181 '%config %attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/etc/joomla/*' \
michael@535 182 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/joomla' \
michael@535 183 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/joomla/*' \
michael@535 184 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/joomla/*/*' \
michael@535 185 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/joomla/*/*/*' \
michael@535 186 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/joomla/*/*/*/*' \
michael@535 187 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/joomla' \
michael@535 188 '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/joomla/*'
michael@535 189
michael@535 190 %files -f files
michael@535 191
michael@535 192 %clean
michael@535 193
michael@535 194 %post
michael@535 195 if [ $1 -eq 1 ]; then
michael@535 196 # display final hints on initial installation
michael@535 197 ( echo "To complete the Joomla! installation:"
michael@535 198 echo "1. start the MySQL RDBMS:"
michael@535 199 echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc mysql start"
michael@535 200 echo "2. setup the Joomla! database in the MySQL RDBMS:"
michael@535 201 echo " \$ $RPM_INSTALL_PREFIX/sbin/joomla-setup install"
michael@535 202 echo "3. start the Joomla! Apache webserver:"
michael@535 203 echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc joomla start"
michael@535 204 echo "4. setup Joomla! through the Web installer..."
michael@535 205 echo " http://localhost:8080/joomla/"
michael@535 206 echo " ..and on page \"4: Database\" use:"
michael@535 207 echo " - Host Name: \"localhost\""
michael@535 208 echo " - User Name: \"joomla\""
michael@535 209 echo " - Password: \"joomla\""
michael@535 210 echo " - Database Name: \"joomla\""
michael@535 211 echo "5. fixup installation afterwards:"
michael@535 212 echo " \$ $RPM_INSTALL_PREFIX/sbin/joomla-setup cleanup"
michael@535 213 echo "6. access Joomla! via:"
michael@535 214 echo " http://localhost:8080/joomla/ (website view)"
michael@535 215 echo " http://localhost:8080/joomla/administrator (website admin)"
michael@535 216 ) | %{l_rpmtool} msg -b -t notice
michael@535 217 elif [ $1 -eq 2 ]; then
michael@535 218 # after upgrade, restart service
michael@535 219 rm -f $RPM_INSTALL_PREFIX/lib/joomla/runtime/installation
michael@535 220 [ $1 -eq 2 ] || exit 0
michael@535 221 eval `%{l_rc} joomla status 2>/dev/null`
michael@535 222 [ ".$joomla_active" = .yes ] && %{l_rc} joomla restart
michael@535 223 fi
michael@535 224 exit 0
michael@535 225
michael@535 226 %preun
michael@535 227 if [ $1 -eq 0 ]; then
michael@535 228 # before erase, stop service
michael@535 229 %{l_rc} joomla stop 2>/dev/null
michael@535 230
michael@535 231 # remove database
michael@535 232 $RPM_INSTALL_PREFIX/sbin/joomla-setup uninstall >/dev/null 2>&1 || true
michael@535 233
michael@536 234 # remove runtime files
michael@535 235 rm -f $RPM_INSTALL_PREFIX/var/joomla/db/* >/dev/null 2>&1 || true
michael@535 236 rm -f $RPM_INSTALL_PREFIX/var/joomla/db/*/* >/dev/null 2>&1 || true
michael@535 237 rm -f $RPM_INSTALL_PREFIX/var/joomla/run/* >/dev/null 2>&1 || true
michael@535 238 rm -f $RPM_INSTALL_PREFIX/var/joomla/log/* >/dev/null 2>&1 || true
michael@535 239 fi
michael@535 240 exit 0
michael@535 241

mercurial