summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9a3411d562b7117399bce9b611ceee388bb981c0 (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
# Maintainer: Johan Förberg <johan@forberg.se>
pkgname=rfc-get
_pkgname=rfc
pkgver=0.1.1
pkgrel=1
pkgdesc='Command-line utility to view RFCs, man-style'
arch=('any')
url='https://github.com/jforberg/rfc'
license=('BSD')
groups=()
depends=('bash' 'curl' 'awk' 'sed' 'less')
makedepends=('gzip')
source=("https://github.com/jforberg/rfc/archive/${pkgver}.tar.gz"
        'https://www.rfc-editor.org/rfc/rfc-index.txt')
noextract=()
sha1sums=('5d4fcc03d366524fbd82ad93568d3fe7992510b8'
          'SKIP')

build() {
    cd "$srcdir/$_pkgname-$pkgver"
    awk -f genindex.awk <../../rfc-index.txt >rfc-index.txt
    gzip -f rfc.1
}

package() {
    cd "$srcdir/$_pkgname-$pkgver"
    install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    install -D -m755 rfc.sh "$pkgdir/usr/bin/rfc"
    install -D -m644 rfc.1.gz "$pkgdir/usr/share/man/man1/rfc.1.gz"
    install -D -m644 rfc-index.txt "$pkgdir/usr/share/rfc-get/rfc-index.txt"
}