Mercurial > hg > portage
diff www-apps/redaxo/redaxo-4.2.1.ebuild @ 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 |
line wrap: on
line diff
--- 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