PKGBUILD 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Maintainer: botplus <oneofvalts@sdf.org>
  2. # Contributor: bill-auger <bill-auger@programmer.net>
  3. pkgname=gophernicus
  4. pkgver=3.1.1
  5. pkgrel=2
  6. pkgdesc="Modern, full-featured (and hopefully) secure gopher daemon"
  7. arch=('armv7h' 'i686' 'x86_64')
  8. url="https://github.com/gophernicus/gophernicus"
  9. license=('BSD2')
  10. backup=(etc/xinetd.d/gophernicus
  11. srv/gopher/gophermap)
  12. install=${pkgname}.install
  13. depends=('libwrap' 'xinetd')
  14. optdepends=("xinetd-openrc: openrc init-script")
  15. source=(${pkgname}-${pkgver}.tar.gz::https://github.com/gophernicus/gophernicus/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz
  16. xinetd-respect-custom-server-root.patch
  17. remove-DESTDIR-from-initscripts.patch
  18. fix-make-log-typo.patch
  19. preserve-existing-gophermap.patch)
  20. b2sums=('74610071fab7ee6defc7e128c92f8775d00c42e6b3e806993d9468676e904388bd54cb101f25dad0e281e67090cfdcaf21728eab7821fa1cbd9ea09201d93acb'
  21. 'da46d9010d3b7485aa092c3557c707473ac465451f7e09d32e52409bdefba0633900f198cb8aadc8a05e55274b70ef72cfc2bda4fe22b254c738aa078b0f8280'
  22. '575bf3480b79c5381f2d08c029e96ebb7eee224e19effe294b95feb1f11f8536a53c12b4850df1263b609a776de350acb0cc17783547b841a631aa7643b3f468'
  23. '56fedcb3d687b935a4d6d254f511b7fc9c2171190ec4eb00724fab82c93c424c2c373a8881818daba55bee9a381213b45c9a79fde13419a5f817a7bfd065f60c'
  24. 'd6bc23c85168e235430eaf3c70edb62c2ee729c891aab15492b637d43fa752310a7f67cc9c194b3d174d46a6ce8a692bb685178874b8ea01086b12a4746f6fb4')
  25. prepare()
  26. {
  27. cd "${srcdir}"/${pkgname}-${pkgver}
  28. # allow server root under /srv/ with xinetd
  29. patch -Np1 < "${srcdir}"/xinetd-respect-custom-server-root.patch
  30. # remove DESTDIR path from installed init scripts
  31. patch -Np1 < "${srcdir}"/remove-DESTDIR-from-initscripts.patch
  32. # fix typo in make log (does not affect the binary package)
  33. patch -Np1 < "${srcdir}"/fix-make-log-typo.patch
  34. # fix think-o in ./configure (does not affect the binary package)
  35. patch -Np1 < "${srcdir}"/preserve-existing-gophermap.patch
  36. }
  37. build()
  38. {
  39. cd "${srcdir}"/${pkgname}-${pkgver}
  40. ./configure --prefix=/usr \
  41. --sbindir=/usr/bin \
  42. --listener=xinetd \
  43. --gopherroot=/srv/gopher
  44. make
  45. }
  46. package()
  47. {
  48. cd "${srcdir}"/${pkgname}-${pkgver}
  49. make DESTDIR="${pkgdir}" install
  50. }