summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 449c3729ba1683e31711d444e1a1918066a14e61 (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
# Maintainer: Quint Guvernator <quint@guvernator.net>

_pkgname=creddit
pkgname=creddit-git
pkgver=r214.aa129b9c9b2a
pkgrel=2
pkgdesc='CLI Reddit client written in C.'
arch=('x86_64' 'i686')
url='https://github.com/Cotix/cReddit'
license=('MIT')
depends=('ncurses' 'curl')
makedepends=('git')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=(
    "$_pkgname::git+https://github.com/Cotix/cReddit.git"
    '01-ncursesw-is-default-ncurses.patch'
)
md5sums=('SKIP'
         'f61218a4235e342f7b094d8aac189683')

prepare() {
    cd "$_pkgname"

    # patch the location of the ncursesw library
    patch -p1 -i "$srcdir/01-ncursesw-is-default-ncurses.patch"
}

pkgver() {
    cd "$_pkgname"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "$_pkgname"
    make
}

package() {
    cd "$_pkgname"
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
    make PREFIX="$pkgdir/usr/" install
}