We have moved to Git. This repository is only provided for compatibility with old installations. Learn how to migrate your installation here.

diff dev-vcs/kallithea/kallithea-0.3.1.ebuild @ 140:3bcc5cfd5a95

dev-vcs/kallithea: creating default directories with permissions, adding USE flags for git and sqlite
author Daniel Neugebauer <dneuge@energiequant.de>
date Mon, 28 Mar 2016 18:02:08 +0200
parents 75e8d4d50c86
children 99a8dff9f4b0
line wrap: on
line diff
--- a/dev-vcs/kallithea/kallithea-0.3.1.ebuild	Mon Mar 28 16:50:25 2016 +0200
+++ b/dev-vcs/kallithea/kallithea-0.3.1.ebuild	Mon Mar 28 18:02:08 2016 +0200
@@ -20,10 +20,13 @@
 HOMEPAGE="https://kallithea-scm.org/"
 SRC_URI="https://pypi.python.org/packages/source/K/Kallithea/Kallithea-${PV}.tar.bz2"
 
-IUSE="+sqlite"
+IUSE="+sqlite +git"
 
-RDEPEND="dev-python/virtualenv
-	sqlite? ( dev-lang/python:2.7[sqlite] )"
+RDEPEND="
+	dev-python/virtualenv
+	git? ( dev-vcs/git )
+	sqlite? ( dev-lang/python:2.7[sqlite] )
+"
 
 DEPEND="${RDEPEND}
 	app-arch/unzip
@@ -103,6 +106,12 @@
 		fi
 	done
 	
+	# disable Git support according to manual
+	# see: http://kallithea.readthedocs.org/en/0.3.1/usage/vcs_support.html
+	if ! use git ; then
+		sed -i -e "/^BACKENDS\s*=\s*{/,/}/ s/^\(\s*\)\('git'\)/\1#\2/" Kallithea-${PV}-py2.7.egg/kallithea/__init__.py || die 'Failed to disable git support, aborting...'
+	fi
+	
 	# create config
 	mkdir "${realWorkDir}/etc"
 	cd "${realWorkDir}/etc"
@@ -189,9 +198,16 @@
 	insopts -m644 -oroot -gkallithea
 	doins "${S}/etc/production.wsgi"
 	
-	# create data directory
+	# create data directory and subdirectories
 	diropts -m2770 -okallithea -gkallithea
 	keepdir "${installDataPath}"
+	keepdir "${installDataPath}/data"
+	keepdir "${installDataPath}/data/cache"
+	keepdir "${installDataPath}/data/cache/data"
+	keepdir "${installDataPath}/data/cache/lock"
+	keepdir "${installDataPath}/data/index"
+	keepdir "${installDataPath}/repositories"
+	keepdir "${installDataPath}/tarballcache"
 }
 
 pkg_postinst() {