Created
November 13, 2014 22:46
-
-
Save cmaloney/d0599420d363d98f8e02 to your computer and use it in GitHub Desktop.
zookeeper.PKGBUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Ben Alex <ben.alex@acegi.com.au> | |
# Contributor: Scott Lawrence <bytbox@gmail.com> | |
# See https://github.com/benalexau/zookeeper-aur for history and helpers | |
pkgname=zookeeper | |
pkgver=3.4.6 | |
pkgrel=3 | |
pkgdesc="An open-source server which enables highly reliable distributed coordination" | |
arch=('any') | |
url="https://zookeeper.apache.org/" | |
license=('APACHE') | |
depends=(java-environment bash) | |
install= | |
source=("zookeeper.service" | |
"http://www.eng.lsu.edu/mirrors/apache/${pkgname}/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz") | |
md5sums=('1663a8b672701d5b3f1956941d7ee3af' | |
'971c379ba65714fd25dc5fe8f14e9ad1') | |
build() { | |
pushd "$pkgname-$pkgver"/src/c | |
./configure --prefix=/usr | |
make | |
popd | |
} | |
package() { | |
_optdir=$pkgdir/opt/${pkgname}-${pkgver} | |
cd ${pkgname}-${pkgver} | |
install -d $pkgdir/usr/bin $pkgdir/usr/share/doc $pkgdir/etc $_optdir/lib | |
for n in zkServer zkCli zkCleanup; do | |
install -D bin/$n.sh $_optdir/bin/$n.sh | |
ln -s /opt/${pkgname}-${pkgver}/bin/$n.sh $pkgdir/usr/bin/$n | |
done | |
install -D bin/zkEnv.sh $_optdir/bin/zkEnv.sh | |
# Remove dirs giving namcap empty-directory warnings | |
rm -rf docs/skin/scripts docs/skin/translations docs/skin/css | |
cp -r docs $pkgdir/usr/share/doc/zookeeper | |
install -t $_optdir/lib dist-maven/*.jar lib/*.jar | |
cp -r conf $_optdir/conf | |
install conf/zoo_sample.cfg $_optdir/conf/zoo.cfg | |
ln -s /opt/${pkgname}-${pkgver}/conf $pkgdir/etc/zookeeper | |
pushd "$srcdir/$pkgname-$pkgver/src/c" | |
make DESTDIR="$pkgdir/" install | |
popd | |
install -m 644 -D "${srcdir}/zookeeper.service" "${pkgdir}/usr/lib/systemd/system/zookeeper.service" | |
echo | |
echo To load ZooKeeper: | |
echo | |
echo " systemctl enable zookeeper.service" | |
echo " systemctl start zookeeper.service" | |
echo | |
echo "To test ZooKeeper (see bug ZOOKEEPER-1737 for reason):" | |
echo | |
echo " /opt/zookeeper-*/bin/zkCli.sh" | |
echo | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment