Advertisement
Guest User

memcacheq-0.2.0.ebuild

a guest
Feb 12th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Copyright 1999-2011 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: memcacheq-0.2.0.ebuild,v 1.1 2014/02/12 14:55:06 mgorny Exp $
  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. use threads && myeconfargs=( "${myeconfargs[@]}" --enable-threads )
  38. econf "${myeconfargs[@]}"
  39.  
  40. }
  41.  
  42. src_compile() {
  43. emake all || die "emake failed."
  44. }
  45.  
  46. src_install() {
  47. emake DESTDIR="${D}" install || die "emake install failed."
  48.  
  49. dodir /var/lib/memcacheq /var/run/memcacheq
  50. fowners memcacheq:memcacheq \
  51. /var/lib/memcacheq \
  52. /var/run/memcacheq
  53.  
  54. newconfd "${FILESDIR}"/conf memcacheq
  55. newinitd "${FILESDIR}"/init memcacheq
  56. }
  57.  
  58. pkg_postinst() {
  59. einfo "Notice: Because MemcacheQ is using fixed-length storage, so you "
  60. einfo "should use '-B' option to specify the max length of your message."
  61. einfo "Default is 1024 bytes."
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement