summaryrefslogtreecommitdiff
path: root/pcr/gophernicus/PKGBUILD
blob: d01c741252dbd8f2aa211d453f316b236dd3dd92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Maintainer: botplus <oneofvalts@sdf.org>
# Contributor: bill-auger <bill-auger@programmer.net>


pkgname=gophernicus
pkgver=3.1.1
pkgrel=2
pkgdesc="Modern, full-featured (and hopefully) secure gopher daemon"
arch=('armv7h' 'i686' 'x86_64')
url="https://github.com/gophernicus/gophernicus"
license=('BSD2')

backup=(etc/xinetd.d/gophernicus
        srv/gopher/gophermap)
install=${pkgname}.install

depends=('libwrap' 'xinetd')
optdepends=("xinetd-openrc: openrc init-script")
source=(${pkgname}-${pkgver}.tar.gz::https://github.com/gophernicus/gophernicus/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz
        xinetd-respect-custom-server-root.patch
        remove-DESTDIR-from-initscripts.patch
        fix-make-log-typo.patch
        preserve-existing-gophermap.patch)

b2sums=('74610071fab7ee6defc7e128c92f8775d00c42e6b3e806993d9468676e904388bd54cb101f25dad0e281e67090cfdcaf21728eab7821fa1cbd9ea09201d93acb'
        'da46d9010d3b7485aa092c3557c707473ac465451f7e09d32e52409bdefba0633900f198cb8aadc8a05e55274b70ef72cfc2bda4fe22b254c738aa078b0f8280'
        '575bf3480b79c5381f2d08c029e96ebb7eee224e19effe294b95feb1f11f8536a53c12b4850df1263b609a776de350acb0cc17783547b841a631aa7643b3f468'
        '56fedcb3d687b935a4d6d254f511b7fc9c2171190ec4eb00724fab82c93c424c2c373a8881818daba55bee9a381213b45c9a79fde13419a5f817a7bfd065f60c'
        'd6bc23c85168e235430eaf3c70edb62c2ee729c891aab15492b637d43fa752310a7f67cc9c194b3d174d46a6ce8a692bb685178874b8ea01086b12a4746f6fb4')


prepare()
{
  cd "${srcdir}"/${pkgname}-${pkgver}

  # allow server root under /srv/ with xinetd
  patch -Np1 < "${srcdir}"/xinetd-respect-custom-server-root.patch

  # remove DESTDIR path from installed init scripts
  patch -Np1 < "${srcdir}"/remove-DESTDIR-from-initscripts.patch

  # fix typo in make log (does not affect the binary package)
  patch -Np1 < "${srcdir}"/fix-make-log-typo.patch

  # fix think-o in ./configure (does not affect the binary package)
  patch -Np1 < "${srcdir}"/preserve-existing-gophermap.patch
}

build()
{
  cd "${srcdir}"/${pkgname}-${pkgver}

  ./configure --prefix=/usr            \
              --sbindir=/usr/bin       \
              --listener=xinetd        \
              --gopherroot=/srv/gopher
  make
}

package()
{
  cd "${srcdir}"/${pkgname}-${pkgver}

  make DESTDIR="${pkgdir}" install
}