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-9999.ebuild @ 130:2ce94546a682

Kallithea: adding WSGI, adding .keep file to data directory
author Daniel Neugebauer <dneuge@energiequant.de>
date Sun, 10 Aug 2014 22:33:43 +0200
parents 4a630613e8cd
children fa6d2de366ac
comparison
equal deleted inserted replaced
129:4a630613e8cd 130:2ce94546a682
25 25
26 RESTRICT_PYTHON_ABIS="3.*" 26 RESTRICT_PYTHON_ABIS="3.*"
27 27
28 installDataPath="/var/lib/kallithea" 28 installDataPath="/var/lib/kallithea"
29 installBasePath="/opt/kallithea" 29 installBasePath="/opt/kallithea"
30 installConfigPath="/etc/kallithea"
30 virtualenvActivationPath="bin/activate" 31 virtualenvActivationPath="bin/activate"
31 32
32 pkg_setup() { 33 pkg_setup() {
33 # create user and group 34 # create user and group
34 enewgroup kallithea 35 enewgroup kallithea
106 for dirtyFile in ${dirtyFiles}; do 107 for dirtyFile in ${dirtyFiles}; do
107 echo " patching ${dirtyFile}" 108 echo " patching ${dirtyFile}"
108 sed -e "s#${realWorkDir}/dist/v#${installBasePath}#" -i "${dirtyFile}" 109 sed -e "s#${realWorkDir}/dist/v#${installBasePath}#" -i "${dirtyFile}"
109 done 110 done
110 IFS="${oldIFS}" 111 IFS="${oldIFS}"
112
113 # create WSGI file
114 cd "${realWorkDir}/etc"
115 cp "${FILESDIR}/production.wsgi" .
116 sed -e "s:###BASEDIR###:${installBasePath}:" -i production.wsgi
117 sed -e "s:###DATADIR###:${installDataPath}:" -i production.wsgi
118 sed -e "s:###CONFDIR###:${installConfigPath}:" -i production.wsgi
111 } 119 }
112 120
113 src_install() { 121 src_install() {
114 # QA: no need to have anything world-writable... 122 # QA: no need to have anything world-writable...
115 chmod o-w -R dist/v/lib/python2.7/site-packages/setuptools-0.9.8-py2.7.egg-info 123 chmod o-w -R dist/v/lib/python2.7/site-packages/setuptools-0.9.8-py2.7.egg-info
116 124
117 # install production.ini in /etc/kallithea 125 # just copy the virtualenv directory to /opt/kallithea
118 into /etc/kallithea
119 doins "${S}/etc/production.ini"
120
121 # just copy the remaining virtualenv directory to /opt/kallithea
122 dodir /opt 126 dodir /opt
123 cp -aR "${S}/dist/v" "${D}${installBasePath}" 127 cp -aR "${S}/dist/v" "${D}${installBasePath}"
124 128
129 # install configuration files to /etc/kallithea
130 diropts -m750 -oroot -gkallithea
131 insopts -m640 -oroot -gkallithea
132 insinto "${installConfigPath}"
133 doins "${S}/etc/production.ini"
134 doins "${S}/etc/production.wsgi"
135
125 # create data directory 136 # create data directory
126 diropts -m2770 -okallithea -gkallithea 137 diropts -m2770 -okallithea -gkallithea
127 dodir "${installDataPath}" 138 keepdir "${installDataPath}"
128 } 139 }
129 140
130 pkg_postinst() { 141 pkg_postinst() {
131 # 1 2 3 4 5 6 7 8 142 # 1 2 3 4 5 6 7 8
132 # 12345678901234567890123456789012345678901234567890123456789012345678901234567890 143 # 12345678901234567890123456789012345678901234567890123456789012345678901234567890