changeset 183:3cdcf4f4578c

replace the version number using portage functions, fetch the source, unpack and clean up works
author Dirk Olmes <dirk@xanthippe.ping.de>
date Wed, 17 Feb 2010 09:53:35 +0100
parents 75231bb27b1c
children 54b73709801b
files www-apps/redaxo/Manifest www-apps/redaxo/redaxo-4.2.1.ebuild
diffstat 2 files changed, 20 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/www-apps/redaxo/Manifest	Wed Feb 17 04:12:16 2010 +0100
+++ b/www-apps/redaxo/Manifest	Wed Feb 17 09:53:35 2010 +0100
@@ -1,2 +1,2 @@
 DIST redaxo4_2_1.zip 2143442 RMD160 18d637be99cf076bf2a9feb59a98357da0db192a SHA1 b8f8a23c2b8b97d2b2eb854fafe3001e22840043 SHA256 4d9daacc0104a47cb05c43ffe6be5445b0ed0d00bee4bea9e58e1ac46fd5d61b
-EBUILD redaxo-4.2.1.ebuild 1519 RMD160 8065b5b7f1133f358e160dbe826025cccc5fbb36 SHA1 ff7ba9929fa792b283f589690f44dab675eb0484 SHA256 99d4d70f0d8dc667f45dd2aef7280bcde2012bd2f7fec944808f01c6adb2e83c
+EBUILD redaxo-4.2.1.ebuild 1564 RMD160 29163d01226d7e2b826be3ad578441e42572efc0 SHA1 6076dfeff5a02ee8362c721e71b96d93c2404f10 SHA256 8ed5b0a0cd2b4169b44f0773bd49efc71dc5ee2bb1ee644509c8e545a2c17fd2
--- a/www-apps/redaxo/redaxo-4.2.1.ebuild	Wed Feb 17 04:12:16 2010 +0100
+++ b/www-apps/redaxo/redaxo-4.2.1.ebuild	Wed Feb 17 09:53:35 2010 +0100
@@ -1,12 +1,14 @@
 
-inherit webapp depend.php
+EAPI=2
+inherit webapp depend.php versionator
 
 DESCRIPTION="PHP-powered CMS application."
 HOMEPAGE="http://www.redaxo.de/"
 
-DOWNLOAD_NAME=`echo ${P} | tr '.' '_'`
-DOWNLOAD_NAME=`echo ${DOWNLOAD_NAME} | sed -e 's/-//'`
-SRC_URI="http://www.redaxo.de/files/${DOWNLOAD_NAME}.zip"
+# translate redaxo-0.0.0 to redaxo0_0_0
+MY_PV=$(replace_all_version_separators '_')
+MY_P=${PN}${MY_PV}
+SRC_URI="http://www.redaxo.de/files/${MY_P}.zip"
 
 LICENSE="GPL"
 KEYWORDS="~amd64 ~x86"
@@ -15,7 +17,7 @@
 
 need_php_httpd
 
-S="${WORKDIR}/${PN}"
+S="${WORKDIR}/${MY_P}"
 
 pkg_setup() {
      webapp_pkg_setup
@@ -27,10 +29,17 @@
     fi
 }
 
+src_unpack() {
+    unpack ${A}
+
+    # clean up some cruft that comes as part of the install package
+    cd ${S}
+    find . -name .DS_Store -exec rm {} \;
+}
+
 src_install() {
     webapp_src_preinst
 
-    find . -name .DS_Store -exec rm {} \;
 #    rm docs/INSTALL*
 #    local docs="docs/*"
 #    dodoc ${docs}
@@ -41,13 +50,12 @@
     touch "${D}"${MY_HTDOCSDIR}/.htaccess
 #    touch "${D}"${MY_HTDOCSDIR}/serendipity_config_local.inc.php
 
-#    keepdir ${MY_HTDOCSDIR}/archives/
+    # the files directory will be populated by the user
+    keepdir ${MY_HTDOCSDIR}/files/
 #    webapp_configfile ${MY_HTDOCSDIR}/serendipity_config_local.inc.php
 
-    # archives, templates_c and uploads need to be writable to PHP
-    # .htaccess and serendipity_config_local.inc.php need to be too
-    # plugins and templates need to be writable for spartacus support.
-    local SERVEROWNED=".htaccess files index.php redaxo"
+    # .htaccess, index.php and the redaxo dir are part of the distro
+    local SERVEROWNED=".htaccess index.php redaxo"
     for SFILES in ${SERVEROWNED}; do
         webapp_serverowned ${MY_HTDOCSDIR}/${SFILES}
     done