2017-06-19 21:14:09 +09:00
|
|
|
# Maintainer: Andreas Nüßlein <nutz@noova.de>
|
2015-07-04 19:12:45 +09:00
|
|
|
# Maintainer: Ben Edwards <ben@artfuldodge.io>
|
|
|
|
# Contributor: Ben Alex <ben.alex@acegi.com.au>
|
|
|
|
# Contributor: Scott Lawrence <bytbox@gmail.com>
|
|
|
|
# Contributor: Guillaume ALAUX <guillaume at alaux dot net>
|
|
|
|
pkgname=zookeeper
|
2018-05-09 02:24:12 +09:00
|
|
|
pkgver=3.4.12
|
2017-06-19 21:14:09 +09:00
|
|
|
pkgrel=1
|
2015-07-04 19:12:45 +09:00
|
|
|
pkgdesc='Open-source server which enables highly reliable distributed coordination'
|
|
|
|
arch=('any')
|
|
|
|
url='https://zookeeper.apache.org/'
|
|
|
|
license=('Apache')
|
|
|
|
depends=('java-runtime')
|
|
|
|
backup=(etc/zookeeper/configuration.xsl
|
|
|
|
etc/zookeeper/log4j.properties
|
|
|
|
etc/zookeeper/zoo.cfg)
|
|
|
|
install=install_zookeeper.sh
|
|
|
|
|
2018-02-02 00:04:25 +09:00
|
|
|
_apache_cgi="http://www.apache.org/dyn/closer.cgi"
|
|
|
|
_closest=$(curl "${_apache_cgi}?asjson=1" | tr -d '\n ' | sed -r 's/.*"preferred":"(.+)".*/\1/')
|
2015-07-04 19:12:45 +09:00
|
|
|
_app_path="/${pkgname}/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz"
|
2016-10-04 00:19:43 +09:00
|
|
|
source=(${_closest}/${_app_path}
|
2015-07-04 19:12:45 +09:00
|
|
|
systemd_zookeeper.service
|
|
|
|
systemd_zookeeper@.service
|
|
|
|
systemd_sysusers.d_zookeeper.conf
|
|
|
|
systemd_tmpfiles.d_zookeeper.conf)
|
|
|
|
|
2018-05-09 02:24:12 +09:00
|
|
|
sha256sums=('c686f9319050565b58e642149cb9e4c9cc8c7207aacc2cb70c5c0672849594b9'
|
2015-12-05 23:53:40 +09:00
|
|
|
'b59e0641de1951ad149ca39df5b5ec37dc6229f1aa987b0ed9d7e82e570be9ed'
|
|
|
|
'a3fd2566648f57c0cdd75cd48b7b60fa55eb59ee67dd716de1e1aa6a57823b88'
|
2015-07-04 19:12:45 +09:00
|
|
|
'e863b63650c15a8823cfb2b507c375c999a71cda24805062de36af0250de5daa'
|
|
|
|
'99fff5b04623889b0010c74c2dc3a4be29e7770fe2c7e15da51f7442a28c6580')
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
|
|
|
|
_app_home=/usr/share/${pkgname}
|
|
|
|
|
|
|
|
install -d "${pkgdir}"{${_app_home}/bin,/etc,/usr/bin,/usr/share/{doc,java}}
|
|
|
|
|
|
|
|
cp -r conf ${pkgdir}/etc/${pkgname}/
|
|
|
|
ln -s /etc/${pkgname} "${pkgdir}${_app_home}/conf"
|
|
|
|
|
|
|
|
cp -r bin/*.sh "${pkgdir}${_app_home}/bin/"
|
|
|
|
sed -i "s|^ZOOBIN=\"\$(dirname \"\${ZOOBIN}\")\"|ZOOBIN=\"${_app_home}/bin\"|" \
|
|
|
|
"${pkgdir}"${_app_home}/bin/*
|
|
|
|
for b in zkCleanup.sh zkCli.sh zkServer.sh; do
|
|
|
|
bname=$(basename $b)
|
|
|
|
ln -s ${_app_home}/bin/${bname} "${pkgdir}/usr/bin/${bname}"
|
|
|
|
done
|
|
|
|
|
|
|
|
#cp -r docs "${pkgdir}/usr/share/doc/${pkgname}/"
|
|
|
|
#ln -s /usr/share/doc/${pkgname} "${pkgdir}${_app_home}/docs"
|
|
|
|
#cp -r src "${pkgdir}/usr/share/${pkgname}"
|
|
|
|
|
|
|
|
cp -r lib "${pkgdir}/usr/share/java/${pkgname}"
|
|
|
|
rm -rf "${pkgdir}"/usr/share/java/${pkgname}/{jdiff,cobertura}
|
|
|
|
ln -s ../java/${pkgname} "${pkgdir}${_app_home}/lib"
|
|
|
|
|
|
|
|
cp -r recipes "${pkgdir}/usr/share/${pkgname}"
|
|
|
|
install -m 644 ${pkgname}-${pkgver}.jar \
|
|
|
|
"${pkgdir}/usr/share/java/${pkgname}/${pkgname}-${pkgver}.jar"
|
|
|
|
ln -s ${pkgname}-${pkgver}.jar \
|
|
|
|
"${pkgdir}/usr/share/java/${pkgname}/${pkgname}.jar"
|
|
|
|
ln -s lib/${pkgname}-${pkgver}.jar \
|
|
|
|
"${pkgdir}/usr/share/${pkgname}/${pkgname}-${pkgver}.jar"
|
|
|
|
|
|
|
|
install -D -m 644 "${srcdir}/systemd_zookeeper.service" \
|
|
|
|
"${pkgdir}/usr/lib/systemd/system/zookeeper.service"
|
|
|
|
install -D -m 644 "${srcdir}/systemd_zookeeper@.service" \
|
|
|
|
"${pkgdir}/usr/lib/systemd/system/zookeeper@.service"
|
|
|
|
install -D -m 644 "${srcdir}/systemd_sysusers.d_zookeeper.conf" \
|
|
|
|
"${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
|
|
|
|
sed "s|^dataDir=/tmp/zookeeper$|dataDir=/var/lib/${pkgname}|" \
|
|
|
|
"${pkgdir}/etc/${pkgname}/zoo_sample.cfg" \
|
|
|
|
> "${pkgdir}/etc/${pkgname}/zoo.cfg"
|
|
|
|
install -D -m 644 "${srcdir}/systemd_tmpfiles.d_zookeeper.conf" \
|
|
|
|
"${pkgdir}/usr/lib/tmpfiles.d/zookeeper.conf"
|
|
|
|
}
|