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

comparison 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
comparison
equal deleted inserted replaced
139:75e8d4d50c86 140:3bcc5cfd5a95
18 18
19 DESCRIPTION="a web-based frontend and middleware to Mercurial and Git repositories" 19 DESCRIPTION="a web-based frontend and middleware to Mercurial and Git repositories"
20 HOMEPAGE="https://kallithea-scm.org/" 20 HOMEPAGE="https://kallithea-scm.org/"
21 SRC_URI="https://pypi.python.org/packages/source/K/Kallithea/Kallithea-${PV}.tar.bz2" 21 SRC_URI="https://pypi.python.org/packages/source/K/Kallithea/Kallithea-${PV}.tar.bz2"
22 22
23 IUSE="+sqlite" 23 IUSE="+sqlite +git"
24 24
25 RDEPEND="dev-python/virtualenv 25 RDEPEND="
26 sqlite? ( dev-lang/python:2.7[sqlite] )" 26 dev-python/virtualenv
27 git? ( dev-vcs/git )
28 sqlite? ( dev-lang/python:2.7[sqlite] )
29 "
27 30
28 DEPEND="${RDEPEND} 31 DEPEND="${RDEPEND}
29 app-arch/unzip 32 app-arch/unzip
30 sys-apps/sed" 33 sys-apps/sed"
31 34
100 mv "${eggname}" tmp.extract.zip 103 mv "${eggname}" tmp.extract.zip
101 unzip -d "${eggname}" tmp.extract.zip 104 unzip -d "${eggname}" tmp.extract.zip
102 rm tmp.extract.zip 105 rm tmp.extract.zip
103 fi 106 fi
104 done 107 done
108
109 # disable Git support according to manual
110 # see: http://kallithea.readthedocs.org/en/0.3.1/usage/vcs_support.html
111 if ! use git ; then
112 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...'
113 fi
105 114
106 # create config 115 # create config
107 mkdir "${realWorkDir}/etc" 116 mkdir "${realWorkDir}/etc"
108 cd "${realWorkDir}/etc" 117 cd "${realWorkDir}/etc"
109 paster make-config Kallithea production.ini || die "unable to create configuration file" 118 paster make-config Kallithea production.ini || die "unable to create configuration file"
187 insinto "${installConfigPath}" 196 insinto "${installConfigPath}"
188 doins "${S}/etc/production.ini.example" 197 doins "${S}/etc/production.ini.example"
189 insopts -m644 -oroot -gkallithea 198 insopts -m644 -oroot -gkallithea
190 doins "${S}/etc/production.wsgi" 199 doins "${S}/etc/production.wsgi"
191 200
192 # create data directory 201 # create data directory and subdirectories
193 diropts -m2770 -okallithea -gkallithea 202 diropts -m2770 -okallithea -gkallithea
194 keepdir "${installDataPath}" 203 keepdir "${installDataPath}"
204 keepdir "${installDataPath}/data"
205 keepdir "${installDataPath}/data/cache"
206 keepdir "${installDataPath}/data/cache/data"
207 keepdir "${installDataPath}/data/cache/lock"
208 keepdir "${installDataPath}/data/index"
209 keepdir "${installDataPath}/repositories"
210 keepdir "${installDataPath}/tarballcache"
195 } 211 }
196 212
197 pkg_postinst() { 213 pkg_postinst() {
198 # 1 2 3 4 5 6 7 8 214 # 1 2 3 4 5 6 7 8
199 # 12345678901234567890123456789012345678901234567890123456789012345678901234567890 215 # 12345678901234567890123456789012345678901234567890123456789012345678901234567890