Advertisement
Guest User

memcacheq-0.2.0.ebuild

a guest
Feb 12th, 2014
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. # Copyright 1999-2011 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: $
  4.  
  5. EAPI=4
  6. inherit eutils autotools flag-o-matic user
  7.  
  8. MY_PV="${PV/_rc/-rc}"
  9. MY_P="${PN}-${MY_PV}"
  10.  
  11. DESCRIPTION="Simple Queue Service over Memcache"
  12. HOMEPAGE="http://code.google.com/p/memcacheq/"
  13. SRC_URI="http://memcacheq.googlecode.com/files/${MY_P}.tar.gz"
  14.  
  15. LICENSE="BSD"
  16. SLOT="0"
  17. KEYWORDS="amd64 x86 x86-macos x86-solaris"
  18. IUSE="threads"
  19.  
  20. RDEPEND=">=dev-libs/libevent-1.4
  21. >=sys-libs/db-4.7"
  22. DEPEND="${RDEPEND}"
  23.  
  24. S="${WORKDIR}/${MY_P}"
  25.  
  26. MEMCACHEQ_DATAPATH=/var/lib/memcacheq
  27.  
  28. pkg_setup() {
  29. enewgroup memcacheq || die "problem adding 'memcacheq' group"
  30. enewuser memcacheq -1 -1 /dev/null memcacheq || die "problem adding 'memcacheq' user"
  31. }
  32.  
  33. src_configure() {
  34. myeconfargs=(
  35. "--prefix=/usr"
  36. )
  37. # --disable-debug enables debug!
  38. use threads && myeconfargs=( "${myeconfargs[@]}" --enable-threads )
  39. econf "${myeconfargs[@]}"
  40.  
  41. }
  42.  
  43. src_compile() {
  44. emake all || die "emake failed."
  45. }
  46.  
  47. src_install() {
  48. emake DESTDIR="${D}" install || die "emake install failed."
  49.  
  50. dodir /var/lib/memcacheq /var/run/memcacheq
  51. fowners memcacheq:memcacheq \
  52. /var/lib/memcacheq \
  53. /var/run/memcacheq
  54.  
  55. newconfd "${FILESDIR}"/conf memcacheq
  56. newinitd "${FILESDIR}"/init memcacheq
  57. }
  58.  
  59. pkg_postinst() {
  60. einfo "Notice: Because MemcacheQ is using fixed-length storage, so you "
  61. einfo "should use '-B' option to specify the max length of your message."
  62. einfo "Default is 1024 bytes."
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement