diff --git a/.SRCINFO b/.SRCINFO index 757db0e..f52d0af 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,25 +1,25 @@ -pkgbase = zookeeper - pkgdesc = Open-source server which enables highly reliable distributed coordination - pkgver = 3.7.0 +pkgbase = zookeeper36 + pkgdesc = Open-source server which enables highly reliable distributed coordination -- Version 3.6 + pkgver = 3.6.3 pkgrel = 1 url = https://zookeeper.apache.org/ - install = install_zookeeper.sh arch = any license = Apache depends = java-runtime + provides = zookeeper + conflicts = zookeeper backup = etc/zookeeper/configuration.xsl backup = etc/zookeeper/log4j.properties backup = etc/zookeeper/zoo.cfg - source = https://downloads.apache.org///zookeeper/zookeeper-3.7.0/apache-zookeeper-3.7.0-bin.tar.gz + source = https://mirror-hk.koddos.net/apache///zookeeper/zookeeper-3.6.3/apache-zookeeper-3.6.3-bin.tar.gz source = systemd_zookeeper.service source = systemd_zookeeper@.service source = systemd_sysusers.d_zookeeper.conf source = systemd_tmpfiles.d_zookeeper.conf - sha256sums = 2f265d27b40fcba5ccf6c56c4c38fb224e24e4155a0bea65ee681a7e20f7c215 + sha256sums = fed19a8e8daa3cd49e721d61929b90613dc0b19faa8ccb7d0b3a85db46b0c922 sha256sums = b59e0641de1951ad149ca39df5b5ec37dc6229f1aa987b0ed9d7e82e570be9ed sha256sums = a3fd2566648f57c0cdd75cd48b7b60fa55eb59ee67dd716de1e1aa6a57823b88 sha256sums = e863b63650c15a8823cfb2b507c375c999a71cda24805062de36af0250de5daa sha256sums = 99fff5b04623889b0010c74c2dc3a4be29e7770fe2c7e15da51f7442a28c6580 -pkgname = zookeeper - +pkgname = zookeeper36 diff --git a/PKGBUILD b/PKGBUILD index 6f4c77e..f643a5b 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,43 +5,45 @@ # Contributor: Ben Alex # Contributor: Scott Lawrence # Contributor: Guillaume ALAUX -pkgname=zookeeper -pkgver=3.7.0 +pkgname=zookeeper36 +_pkgname=zookeeper +pkgver=3.6.3 pkgrel=1 -pkgdesc='Open-source server which enables highly reliable distributed coordination' +pkgdesc='Open-source server which enables highly reliable distributed coordination -- Version 3.6' arch=('any') url='https://zookeeper.apache.org/' license=('Apache') depends=('java-runtime') +provides=('zookeeper') +conflicts=('zookeeper') backup=(etc/zookeeper/configuration.xsl etc/zookeeper/log4j.properties etc/zookeeper/zoo.cfg) -install=install_zookeeper.sh _apache_cgi="http://www.apache.org/dyn/closer.cgi" _closest=$(curl "${_apache_cgi}?asjson=1" | tr -d '\n ' | sed -r 's/.*"preferred":"(.+)".*/\1/') -_app_path="/${pkgname}/${pkgname}-${pkgver}/apache-${pkgname}-${pkgver}-bin.tar.gz" +_app_path="/${_pkgname}/${_pkgname}-${pkgver}/apache-${_pkgname}-${pkgver}-bin.tar.gz" source=(${_closest}/${_app_path} systemd_zookeeper.service systemd_zookeeper@.service systemd_sysusers.d_zookeeper.conf systemd_tmpfiles.d_zookeeper.conf) -sha256sums=('2f265d27b40fcba5ccf6c56c4c38fb224e24e4155a0bea65ee681a7e20f7c215' +sha256sums=('fed19a8e8daa3cd49e721d61929b90613dc0b19faa8ccb7d0b3a85db46b0c922' 'b59e0641de1951ad149ca39df5b5ec37dc6229f1aa987b0ed9d7e82e570be9ed' 'a3fd2566648f57c0cdd75cd48b7b60fa55eb59ee67dd716de1e1aa6a57823b88' 'e863b63650c15a8823cfb2b507c375c999a71cda24805062de36af0250de5daa' '99fff5b04623889b0010c74c2dc3a4be29e7770fe2c7e15da51f7442a28c6580') package() { - cd "${srcdir}/apache-${pkgname}-${pkgver}-bin" + cd "${srcdir}/apache-${_pkgname}-${pkgver}-bin" - _app_home=/usr/share/${pkgname} + _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 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\"|" \ @@ -51,29 +53,29 @@ package() { ln -s ${_app_home}/bin/${bname} "${pkgdir}/usr/bin/${bname}" done - 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 lib "${pkgdir}/usr/share/java/${_pkgname}" + rm -rf "${pkgdir}"/usr/share/java/${_pkgname}/{jdiff,cobertura} + ln -s ../java/${_pkgname} "${pkgdir}${_app_home}/lib" ### As of 3.4.14, recipes are no longer held in a separate directory # cp -r recipes "${pkgdir}/usr/share/${pkgname}" - install -m 644 "${srcdir}/apache-${pkgname}-${pkgver}-bin/lib/${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 -m 644 "${srcdir}/apache-${_pkgname}-${pkgver}-bin/lib/${_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" + "${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" } diff --git a/install_zookeeper.sh b/install_zookeeper.sh deleted file mode 100644 index d3e45bf..0000000 --- a/install_zookeeper.sh +++ /dev/null @@ -1,18 +0,0 @@ -post_install() { - systemd-sysusers zookeeper.conf - systemd-tmpfiles --create zookeeper.conf -} - -post_upgrade(){ - systemd-sysusers zookeeper.conf - systemd-tmpfiles --create zookeeper.conf -} - -post_remove() { - if getent passwd zookeeper >/dev/null 2>&1; then - userdel -f zookeeper - fi - if getent group zookeeper >/dev/null 2>&1; then - groupdelf zookeeper - fi -}