summaryrefslogtreecommitdiff
path: root/gopherus/PKGBUILD
blob: 3ee8283353ba0ba8a9403e5d91eac6b356e85624 (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
# Maintainer: Deposite Pirate <dpirate at metalpunks dot info>
#
# Upstream: https://git.metalpunks.info/arch-ports

pkgname=gopherus
pkgver=1.2.1
pkgrel=1
pkgdesc="Gopher client"
arch=('i686' 'x86_64')
url="http://gopherus.sourceforge.net"
license=('BSD')
depends=('ncurses')
optdepends=('sdl2')
source=(http://downloads.sourceforge.net/project/${pkgname}/v${pkgver}/${pkgname}-${pkgver}.tar.xz
        gopherus-1.2-ncheader.patch
        gopherus.desktop)
sha256sums=('510f71591ae2f40c55bfff47f3c215c75d85acf45184e752a381df6a6c64787b'
            '9637df8df7dfa15232b5898170b1d1d0a485628d77c2a40150db914c4fb2b866'
            'b01f1fa220cb788edf5c743a35aeff169f62eefee19d5f6dee96274e8c8cfd21')

prepare()
{
  cd "${pkgname}-${pkgver}"
  
  # Fix curses header location
  patch -p1 -i ../gopherus-1.2-ncheader.patch
}

build() {
  cd "${pkgname}-${pkgver}"
  make -f Makefile.lin CFLAGS="${CFLAGS}" gopherus gopherus-sdl
}

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

  install -dm755 "${pkgdir}/usr/bin"
  install -m755 gopherus gopherus-sdl "${pkgdir}/usr/bin"

  install -dm755 "${pkgdir}/usr/share/doc/${pkgname}"
  install -m644 gopherus.txt history.txt \
   "${pkgdir}/usr/share/doc/${pkgname}"

  install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
  (
    cd "${pkgdir}/usr/share/licenses/${pkgname}"
    ln -s /usr/share/doc/${pkgname}/gopherus.txt LICENSE
  )

  install -Dm644 icon.svg \
   "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg"

  install -Dm644 "${srcdir}/gopherus.desktop" \
   "${pkgdir}/usr/share/applications/${pkgname}.desktop"
}