summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8f063c71b57703df7524f9879adf134d6081a1b2 (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
# Maintainer: Lubosz Sarnecki <lubosz at gmail dot com>

pkgname=superfamiconv-git
pkgver=0.9.2.r2.9f6bcab
pkgrel=1
pkgdesc='A tile graphics converter with flexible and composable command line options.'
arch=(x86_64)
url=https://github.com/Optiroc/SuperFamiconv
license=(MIT)

depends=(
  gcc-libs
)

makedepends=(
  cmake
  git
)
provides=(superfamiconv)
conflicts=(superfamiconv)
source=("git+https://github.com/Optiroc/SuperFamiconv.git"
        "0001-Mode-Add-default-cases.patch"
        "0004-cmake-Add-install-target.patch")
md5sums=(SKIP
         "7253cec1e63c2925154fdfa8ea9c21f7"
         "c56540c8efe5ac5b7246b3d27c3e4036")

pkgver() {
  cd SuperFamiconv
  git describe --tags | sed 's/^v//; s/-dev//; s/-/.r/; s/-g/./'
}

prepare() {
  if [[ -d build ]]; then
    rm -rf build
  fi
  mkdir build
  
  cd SuperFamiconv
  patch -p1 < ../0001-Mode-Add-default-cases.patch
  patch -p1 < ../0004-cmake-Add-install-target.patch
}

build() {
  cd build

  cmake ../SuperFamiconv \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  make DESTDIR="${pkgdir}" -C build install
  install -Dm644 "$srcdir/SuperFamiconv/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim: ts=2 sw=2 et: