git-svn-id: http://svn.calculate.ru/overlay@1838 c91db197-33c1-4113-bf15-f8a5c547ca64atratsevskiy
parent
e7cc0d36ed
commit
7928fba709
@ -0,0 +1,3 @@
|
||||
AUX zope.initd 1317 RMD160 39fa98ed8cbc703cd77238d345328430e39bddd4 SHA1 6215743f7d108fa3e668cf24d748ad19d68faeab SHA256 1a3a03ef186fbdfd566023cf3fbb311f03214c51021b3af628b3233704838506
|
||||
DIST Zope-3.4.0.tgz 7422094 RMD160 193f41f049a82ac1db194a192b30f510aef48980 SHA1 e38b5d06ef9291ae14586677c854f48fe71db586 SHA256 3e834e8749945d8fc0a67bb724f2cf0c671f04f477e24fb8edb74828e331901d
|
||||
EBUILD zope-3.4.0.ebuild 3429 RMD160 c084b3ed297ef3adcf24d769adb42c832e8ef2e0 SHA1 d8ac56c4eea99f7d2f6995d4252b2495fd28510d SHA256 30e15e8d2d1b888602ab3513c15f651a9e2b24af5af3ac146320ea3e97d86513
|
@ -0,0 +1,61 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2004 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/files/zope.initd,v 1.2 2005/12/24 16:35:35 radek Exp $
|
||||
|
||||
opts="start stop reload restart kill quit status help"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting Zope in INSTANCE_HOME"
|
||||
INSTANCE_HOME/bin/zopectl start
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping Zope in INSTANCE_HOME"
|
||||
INSTANCE_HOME/bin/zopectl stop
|
||||
eend $?
|
||||
}
|
||||
|
||||
restart() {
|
||||
ebegin "Restarting Zope in INSTANCE_HOME"
|
||||
svc_stop
|
||||
svc_start
|
||||
eend $?
|
||||
}
|
||||
|
||||
kill() {
|
||||
ebegin "Killing Zope in INSTANCE_HOME"
|
||||
INSTANCE_HOME/bin/zopectl kill
|
||||
eend $?
|
||||
}
|
||||
|
||||
quit() {
|
||||
ebegin "Quitting Zope Daemon Manager INSTANCE_HOME"
|
||||
INSTANCE_HOME/bin/zopectl quit
|
||||
eend $?
|
||||
}
|
||||
|
||||
reload() {
|
||||
# throws an error, dunno why
|
||||
ebegin "Reloading Zope config in INSTANCE_HOME"
|
||||
INSTANCE_HOME/bin/zopectl reload
|
||||
eend $?
|
||||
}
|
||||
|
||||
status() {
|
||||
ebegin "Status of Zope in INSTANCE_HOME"
|
||||
INSTANCE_HOME/bin/zopectl status
|
||||
eend $?
|
||||
}
|
||||
|
||||
help() {
|
||||
ebegin "Help for Zope Daemon Manager in INSTANCE_HOME"
|
||||
INSTANCE_HOME/bin/zopectl help
|
||||
eend $?
|
||||
}
|
||||
|
@ -0,0 +1,116 @@
|
||||
# Copyright 1999-2008 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-zope/zope/zope-3.3.1.ebuild,v 1.4 2008/11/15 18:55:33 armin76 Exp $
|
||||
|
||||
inherit eutils multilib
|
||||
|
||||
DESCRIPTION="Zope is a web application platform used for building high-performance, dynamic web sites"
|
||||
HOMEPAGE="http://www.zope.org"
|
||||
SRC_URI="http://www.zope.org/Products/Zope3/${PV}/Zope-${PV}.tgz"
|
||||
|
||||
LICENSE="ZPL"
|
||||
SLOT="${PV}"
|
||||
KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="=dev-lang/python-2.5*"
|
||||
DEPEND="${RDEPEND}
|
||||
>=app-shells/bash-2.0
|
||||
>=sys-apps/sed-4.0.5"
|
||||
|
||||
S=${WORKDIR}/Zope-${PV}
|
||||
|
||||
ZUNAME=zope
|
||||
ZGNAME=zope
|
||||
|
||||
ZS_DIR=${ROOT%/}/usr/$(get_libdir)
|
||||
ZSERVDIR=${ZS_DIR}/${P}
|
||||
ZSKELDIR=${ZSERVDIR}/zopeskel
|
||||
ZINSTDIR=/var/lib/zope/${P}
|
||||
|
||||
src_compile() {
|
||||
|
||||
./configure --prefix="${D}"${ZSERVDIR} --with-python=/usr/bin/python2.4 || die "Failed to configure."
|
||||
emake || die "Failed to compile."
|
||||
}
|
||||
|
||||
src_install() {
|
||||
|
||||
dodoc README.txt
|
||||
dodoc Zope/doc/*.txt
|
||||
for DIR in schema security skins style zcml zsync
|
||||
do
|
||||
docinto ${DIR}
|
||||
dodoc Zope/doc/${DIR}/*
|
||||
done
|
||||
|
||||
make install prefix="${D}"${ZSERVDIR}
|
||||
|
||||
dosym ../../share/doc/${PF} ${ZSERVDIR}/doc
|
||||
|
||||
# copy the init script skeleton to zopeskel directory of our installation
|
||||
cp "${FILESDIR}"/zope.initd "${D}"${ZSKELDIR}/zope.initd
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# create the zope user and group for backward compatibility
|
||||
enewgroup ${ZGNAME} 261
|
||||
usermod -g ${ZGNAME} -c "Zope Admin User" -d /var/lib/zope -s /bin/bash ${ZUNAME} 2>&1 >/dev/null || \
|
||||
enewuser ${ZUNAME} 261 /bin/bash /var/lib/zope ${ZGNAME} -c "Zope Admin User"
|
||||
|
||||
einfo "This release can create a default instance using the command: "
|
||||
einfo " emerge --config =${PF}"
|
||||
einfo "Instance (${P}) will be created in ${ZINSTDIR} as its home."
|
||||
einfo "System uid/gid for instance will be: ${ZUNAME}:${ZGNAME}"
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
|
||||
find ${ZSERVDIR}/lib/python -name \*.py[co] -exec rm -f {} \;
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
|
||||
rmdir /usr/$(get_libdir)/${ZSERVDIR} 2>/dev/null
|
||||
ewarn "Instances created for this package are NOT automaticaly deleted!"
|
||||
ewarn "Inspect these locations and manually remove them (if needed):"
|
||||
ewarn " /etc/init.d/${P}"
|
||||
ewarn " ${ZINSTDIR}"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
|
||||
if [ -f /etc/init.d/${P} -o -d ${ZINSTDIR} ]
|
||||
then
|
||||
ewarn "Default instance already exists, aborting.."
|
||||
ewarn "Please delete first /etc/init.d/${P} and ${ZINSTDIR}"
|
||||
die "Failed to create default instance."
|
||||
fi
|
||||
|
||||
mkdir -p ${ZINSTDIR}
|
||||
einfo "Instance ${P} creation, calling mkzopeinstance.."
|
||||
${ZSERVDIR}/bin/mkzopeinstance --non-interactive -d ${ZINSTDIR} -u admin:admin
|
||||
|
||||
# remove unnecessary zope.initd
|
||||
rm -f ${ZINSTDIR}/zope.initd
|
||||
|
||||
# log symlink
|
||||
rm -rf ${ZINSTDIR}/log
|
||||
mkdir -p /var/log/zope/${PN}
|
||||
ln -s /var/log/zope/${PN} ${ZINSTDIR}/log
|
||||
|
||||
# permissions changes
|
||||
chmod go-rwx -R ${ZINSTDIR}
|
||||
chown ${ZUNAME}:${ZGNAME} -R ${ZINSTDIR} /var/log/zope/${PN}
|
||||
|
||||
cp ${ZSKELDIR}/zope.initd /etc/init.d/${P}
|
||||
chmod 755 /etc/init.d/${P}
|
||||
sed -i -e "s|INSTANCE_HOME|${ZINSTDIR}|" /etc/init.d/${P}
|
||||
sed -i -e "s|zopectl|zopectl -u ${ZUNAME}|" /etc/init.d/${P}
|
||||
|
||||
einfo "Default instance created at ${ZINSTDIR}"
|
||||
einfo "Created default zope user 'admin' with password 'admin'."
|
||||
einfo "System uid/gid for instance is: ${ZUNAME}:${ZGNAME}."
|
||||
einfo "To start instance (default ports 8080,8021) use: /etc/init.d/${P} start"
|
||||
einfo "To start instance on every restart use: rc-update -a ${P} default"
|
||||
}
|
Loading…
Reference in new issue