geomyidae-0.26.3.ebuild 902 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs user
  5. DESCRIPTION="A daemon to serve the gopher protocol"
  6. HOMEPAGE="http://r-36.net/src/geomyidae/"
  7. SRC_URI="http://r-36.net/src/${PN}/${P}.tar.gz"
  8. LICENSE="MIT"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~arm ~x86"
  11. pkg_setup(){
  12. enewgroup gopherd
  13. enewuser gopherd -1 -1 /var/gopher gopherd
  14. }
  15. src_prepare() {
  16. # enable verbose build
  17. # drop -O. from CFLAGS
  18. sed -i \
  19. -e 's/@${CC}/${CC}/g' \
  20. -e '/CFLAGS/s/-O. //' \
  21. Makefile || die 'sed on Makefile failed'
  22. epatch_user
  23. }
  24. src_compile() {
  25. emake CC="$(tc-getCC)"
  26. }
  27. src_install() {
  28. dosbin ${PN}
  29. newinitd rc.d/Gentoo.init.d ${PN}
  30. newconfd rc.d/Gentoo.conf.d ${PN}
  31. insinto /var/gopher
  32. doins index.gph
  33. fowners -R root.gopherd /var/gopher
  34. fperms -R g=rX,o=rX /var/gopher
  35. doman ${PN}.8
  36. dodoc CGI README
  37. }