summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b28bcb73a89aab201c3fcd6de44b9b9021bca686 (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
# Maintainer: Damian Höster <damian dot hoester at posteo dot de>

_pkgname=umbrielpng
pkgname=${_pkgname}-git
pkgver=0.1.c52.21a9c6d
pkgrel=1
pkgdesc='PNG chunk analyzer and modifier'
arch=(x86_64)
url=https://github.com/Traneptora/umbrielpng
license=(BSD-3-Clause)
depends=(
  zlib
)
makedepends=(
  git
  gcc
)
provides=($_pkgname)
conflicts=($_pkgname)
source=($_pkgname::git+$url.git)
sha256sums=(SKIP)

pkgver() {
  cd $_pkgname
  printf %s.c%s.%s \
    $(grep -m1 '@version' umbrielpng.c | awk '{print $3}') \
    $(git rev-list --count HEAD) \
    $(git rev-parse --short HEAD)
}

build() {
  cd $_pkgname
  gcc $CFLAGS -c umbrielpng.c
  gcc $LDFLAGS -o umbrielpng umbrielpng.o -lz
}

package() {
  install -Dvm755 $_pkgname/umbrielpng -t "$pkgdir/usr/bin/"
  install -Dvm644 $_pkgname/LICENSE -t "$pkgdir/usr/share/licenses/$_pkgname/"
}