Mon, 17 Sep 2012 19:10:10 +0200
Update to new version of vendor software although Oracle fails to deliver.
More specifically, newer db(3) patch revisions exist but Oracle has
removed them from the canonical download server URI for Berkely DB.
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@536 | 25 | %define V_dist 2.5.6 |
michael@536 | 26 | %define V_opkg 2.5.6 |
michael@536 | 27 | %define V_subdir 17173/74756 |
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@535 | 48 | # build information |
michael@536 | 49 | BuildPreReq: OpenPKG, openpkg >= 20100101 |
michael@535 | 50 | PreReq: OpenPKG, openpkg >= 20100101 |
michael@535 | 51 | PreReq: apache |
michael@535 | 52 | PreReq: apache-php |
michael@535 | 53 | PreReq: apache-php::with_mysql = yes |
michael@535 | 54 | PreReq: apache-php::with_zlib = yes |
michael@535 | 55 | PreReq: apache-php::with_xml = yes |
michael@535 | 56 | PreReq: apache-php::with_gd = yes |
michael@535 | 57 | PreReq: apache-php::with_session = yes |
michael@535 | 58 | PreReq: apache-php::with_mm = yes |
michael@535 | 59 | PreReq: apache-php::with_sendmail = yes |
michael@535 | 60 | PreReq: MTA |
michael@535 | 61 | |
michael@535 | 62 | %description |
michael@536 | 63 | Joomla is a web based content management system (CMS) for publishing |
michael@536 | 64 | content on the internet and intranets. It features a model view |
michael@536 | 65 | controller (MVC) Web application framework and is useful for easily |
michael@536 | 66 | creating and building a websites and web enabled applications. |
michael@536 | 67 | |
michael@536 | 68 | Joomla is written using object oriented programming techniques |
michael@536 | 69 | and software design patterns, stores data in a MySQL database, |
michael@536 | 70 | and includes features such as page caching, RSS feeds, printable |
michael@536 | 71 | versions of pages, news flashes, blogs, polls, search, and support |
michael@536 | 72 | for language internationalization. |
michael@535 | 73 | |
michael@535 | 74 | %track |
michael@535 | 75 | prog joomla = { |
michael@535 | 76 | version = %{V_dist} |
michael@535 | 77 | url = http://joomlacode.org/gf/project/joomla/frs/ |
michael@535 | 78 | regex = frsrelease/\d+/\d+/Joomla-(__VER__)\.tar\.gz |
michael@535 | 79 | } |
michael@535 | 80 | prog joomla:subdir = { |
michael@535 | 81 | version = %{V_subdir} |
michael@535 | 82 | url = http://joomlacode.org/gf/project/joomla/frs/ |
michael@535 | 83 | regex = frsrelease/(\d+/\d+)/Joomla-__VER__\.tar\.gz |
michael@535 | 84 | } |
michael@535 | 85 | |
michael@535 | 86 | %prep |
michael@536 | 87 | %setup -q -T -c -a 0 |
michael@535 | 88 | |
michael@535 | 89 | %build |
michael@535 | 90 | |
michael@535 | 91 | %install |
michael@535 | 92 | # create installation hierarchy |
michael@535 | 93 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@535 | 94 | $RPM_BUILD_ROOT%{l_prefix}/sbin \ |
michael@535 | 95 | $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \ |
michael@535 | 96 | $RPM_BUILD_ROOT%{l_prefix}/etc/joomla \ |
michael@535 | 97 | $RPM_BUILD_ROOT%{l_prefix}/lib/joomla/runtime \ |
michael@535 | 98 | $RPM_BUILD_ROOT%{l_prefix}/var/joomla/db \ |
michael@535 | 99 | $RPM_BUILD_ROOT%{l_prefix}/var/joomla/log \ |
michael@535 | 100 | $RPM_BUILD_ROOT%{l_prefix}/var/joomla/run |
michael@535 | 101 | |
michael@535 | 102 | # adjust default configuration |
michael@535 | 103 | %{l_shtool} subst \ |
michael@536 | 104 | -e 's;/usr/sbin/sendmail;%{l_prefix}/sbin/sendmail;g' \ |
michael@536 | 105 | libraries/phpmailer/phpmailer.php \ |
michael@536 | 106 | installation/models/configuration.php \ |
michael@536 | 107 | installation/configuration.php-dist \ |
michael@536 | 108 | administrator/components/com_config/models/forms/application.xml |
michael@535 | 109 | |
michael@535 | 110 | # install main program files |
michael@535 | 111 | find . -name ".#*" -print | xargs rm -f |
michael@535 | 112 | find . -name "*.orig" -print | xargs rm -f |
michael@535 | 113 | cp -rp * $RPM_BUILD_ROOT%{l_prefix}/lib/joomla/runtime/ |
michael@535 | 114 | rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/joomla/runtime/configuration.php-dist |
michael@535 | 115 | rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/joomla/runtime/htaccess.txt |
michael@535 | 116 | |
michael@536 | 117 | # postadjustment: move risky installation area out of runtime area |
michael@536 | 118 | # which will be dynmically linked in again later |
michael@535 | 119 | mv $RPM_BUILD_ROOT%{l_prefix}/lib/joomla/runtime/installation \ |
michael@535 | 120 | $RPM_BUILD_ROOT%{l_prefix}/lib/joomla/installation |
michael@535 | 121 | |
michael@536 | 122 | # install runcommand script |
michael@535 | 123 | %{l_shtool} install -c -m 755 %{l_value -s -a} \ |
michael@535 | 124 | -e 's;@l_path@;%{l_build_path};' \ |
michael@535 | 125 | %{SOURCE rc.joomla} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
michael@535 | 126 | |
michael@535 | 127 | # install setup script |
michael@535 | 128 | %{l_shtool} install -c -m 755 %{l_value -s -a} \ |
michael@535 | 129 | %{SOURCE joomla-setup.sh} $RPM_BUILD_ROOT%{l_prefix}/sbin/joomla-setup |
michael@535 | 130 | |
michael@535 | 131 | # install Apache configuration |
michael@535 | 132 | l_hostname=`%{l_shtool} echo -e %h` |
michael@535 | 133 | l_domainname=`%{l_shtool} echo -e %d | cut -c2-` |
michael@535 | 134 | %{l_shtool} install -c -m 644 %{l_value -s -a} \ |
michael@535 | 135 | -e "s;@l_hostname@;$l_hostname;g" \ |
michael@535 | 136 | -e "s;@l_domainname@;$l_domainname;g" \ |
michael@535 | 137 | %{SOURCE joomla-apache.conf} \ |
michael@535 | 138 | $RPM_BUILD_ROOT%{l_prefix}/etc/joomla/ |
michael@535 | 139 | |
michael@535 | 140 | # determine installation files |
michael@535 | 141 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@535 | 142 | %{l_files_std} \ |
michael@535 | 143 | '%config %attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/etc/joomla/*' \ |
michael@535 | 144 | '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/joomla' \ |
michael@535 | 145 | '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/joomla/*' \ |
michael@535 | 146 | '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/joomla/*/*' \ |
michael@535 | 147 | '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/joomla/*/*/*' \ |
michael@535 | 148 | '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/lib/joomla/*/*/*/*' \ |
michael@535 | 149 | '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/joomla' \ |
michael@535 | 150 | '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/joomla/*' |
michael@535 | 151 | |
michael@535 | 152 | %files -f files |
michael@535 | 153 | |
michael@535 | 154 | %clean |
michael@535 | 155 | |
michael@535 | 156 | %post |
michael@535 | 157 | if [ $1 -eq 1 ]; then |
michael@535 | 158 | # display final hints on initial installation |
michael@535 | 159 | ( echo "To complete the Joomla! installation:" |
michael@535 | 160 | echo "1. start the MySQL RDBMS:" |
michael@535 | 161 | echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc mysql start" |
michael@535 | 162 | echo "2. setup the Joomla! database in the MySQL RDBMS:" |
michael@535 | 163 | echo " \$ $RPM_INSTALL_PREFIX/sbin/joomla-setup install" |
michael@535 | 164 | echo "3. start the Joomla! Apache webserver:" |
michael@535 | 165 | echo " \$ $RPM_INSTALL_PREFIX/bin/openpkg rc joomla start" |
michael@535 | 166 | echo "4. setup Joomla! through the Web installer..." |
michael@535 | 167 | echo " http://localhost:8080/joomla/" |
michael@535 | 168 | echo " ..and on page \"4: Database\" use:" |
michael@535 | 169 | echo " - Host Name: \"localhost\"" |
michael@535 | 170 | echo " - User Name: \"joomla\"" |
michael@535 | 171 | echo " - Password: \"joomla\"" |
michael@535 | 172 | echo " - Database Name: \"joomla\"" |
michael@535 | 173 | echo "5. fixup installation afterwards:" |
michael@535 | 174 | echo " \$ $RPM_INSTALL_PREFIX/sbin/joomla-setup cleanup" |
michael@535 | 175 | echo "6. access Joomla! via:" |
michael@535 | 176 | echo " http://localhost:8080/joomla/ (website view)" |
michael@535 | 177 | echo " http://localhost:8080/joomla/administrator (website admin)" |
michael@535 | 178 | ) | %{l_rpmtool} msg -b -t notice |
michael@535 | 179 | elif [ $1 -eq 2 ]; then |
michael@535 | 180 | # after upgrade, restart service |
michael@535 | 181 | rm -f $RPM_INSTALL_PREFIX/lib/joomla/runtime/installation |
michael@535 | 182 | [ $1 -eq 2 ] || exit 0 |
michael@535 | 183 | eval `%{l_rc} joomla status 2>/dev/null` |
michael@535 | 184 | [ ".$joomla_active" = .yes ] && %{l_rc} joomla restart |
michael@535 | 185 | fi |
michael@535 | 186 | exit 0 |
michael@535 | 187 | |
michael@535 | 188 | %preun |
michael@535 | 189 | if [ $1 -eq 0 ]; then |
michael@535 | 190 | # before erase, stop service |
michael@535 | 191 | %{l_rc} joomla stop 2>/dev/null |
michael@535 | 192 | |
michael@535 | 193 | # remove database |
michael@535 | 194 | $RPM_INSTALL_PREFIX/sbin/joomla-setup uninstall >/dev/null 2>&1 || true |
michael@535 | 195 | |
michael@536 | 196 | # remove runtime files |
michael@535 | 197 | rm -f $RPM_INSTALL_PREFIX/var/joomla/db/* >/dev/null 2>&1 || true |
michael@535 | 198 | rm -f $RPM_INSTALL_PREFIX/var/joomla/db/*/* >/dev/null 2>&1 || true |
michael@535 | 199 | rm -f $RPM_INSTALL_PREFIX/var/joomla/run/* >/dev/null 2>&1 || true |
michael@535 | 200 | rm -f $RPM_INSTALL_PREFIX/var/joomla/log/* >/dev/null 2>&1 || true |
michael@535 | 201 | fi |
michael@535 | 202 | exit 0 |
michael@535 | 203 |