aerospike-server-community-3.9.0.3.ebuild 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils user
  5. DESCRIPTION="Flash-optimized, in-memory, nosql database"
  6. HOMEPAGE="http://www.aerospike.com"
  7. SRC_URI="http://www.aerospike.com/artifacts/${PN}/${PV}/${P}-debian7.tgz"
  8. LICENSE="Apache-2.0"
  9. SLOT="0"
  10. KEYWORDS="~amd64"
  11. IUSE=""
  12. RDEPEND="app-crypt/gcr"
  13. DEPEND="${RDEPEND}"
  14. S="${WORKDIR}/${P}-debian7"
  15. pkg_setup() {
  16. enewgroup aerospike
  17. enewuser aerospike -1 /bin/bash /opt/aerospike aerospike
  18. }
  19. src_prepare() {
  20. local server_deb="${P}.debian7.x86_64.deb"
  21. local tools_deb="aerospike-tools-3.9.0.debian7.x86_64.deb"
  22. ar x "${server_deb}" || die
  23. tar xzf data.tar.gz && rm data.tar.gz || die
  24. ar x "${tools_deb}" || die
  25. tar xzf data.tar.gz && rm data.tar.gz || die
  26. rm *.deb asinstall control.tar.gz debian-binary LICENSE SHA256SUMS
  27. rm usr/bin/{asfixownership,asmigrate2to3}
  28. }
  29. src_install() {
  30. insinto /opt/
  31. doins -r opt/aerospike
  32. fperms +x -R /opt/aerospike/bin/
  33. fperms +x -R /opt/aerospike/lib/python/
  34. for dir in '/etc' '/var/log'; do
  35. keepdir "${dir}/aerospike"
  36. done
  37. insinto /etc/aerospike
  38. for conf in 'aerospike.conf' 'aerospike_mesh.conf' 'aerospike_ssd.conf'; do
  39. doins "${FILESDIR}/${conf}"
  40. done
  41. insinto /usr/bin
  42. doins usr/bin/*
  43. fperms +x -R /usr/bin/asd
  44. insinto /etc/logrotate.d
  45. newins "${FILESDIR}"/aerospike.logrotate aerospike
  46. newinitd "${FILESDIR}"/aerospike.init aerospike
  47. fowners -R aerospike:aerospike /opt/aerospike/
  48. fowners aerospike:aerospike /usr/bin/asd
  49. fowners -R aerospike:aerospike /var/log/aerospike
  50. }