upgpkg: ufw 0.36.2-1
[ArchLinux/community.git] / klystrack-plus / trunk / PKGBUILD
blob402b5083dcd928a25e9dffe0109ed62a034a83ed
1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
3 pkgname=klystrack-plus
4 pkgver=0.10.0.alpha2
5 pkgrel=1
6 pkgdesc='A tracker for making C64/NES/Amiga-style chiptunes on a modern platform'
7 arch=('x86_64')
8 url='https://github.com/LTVA1/klystrack'
9 license=('MIT')
10 depends=(
11   'glibc'
12   'alsa-lib'
13   'sdl2'
14   'sdl2_image'
15   'hicolor-icon-theme'
17 makedepends=('git')
18 _commit='dddea70c9378ab9c3dbd09e5a0283295fcce2ede'
19 options=('!lto')
20 source=(
21   "$pkgname::git+$url#commit=$_commit"
22   'github.com-LTVA1-klystron::git+https://github.com/LTVA1/klystron'
23   'update-desktop-file.patch'
24   'repro-klystrack-plus.patch'
25   'repro-klystron.patch'
27 b2sums=('SKIP'
28         'SKIP'
29         '5543cae63098a27ee6539cf92f06a87756bbfcbad0e6000eed8c5ad32fb354f18439730d021a278ffd8d4359b8c6847d8c0ae06a882faf1887b8a4c1c912ec50'
30         '761ef03457b9ea2009b8483608a99befe3444641ef5f351ab3d3d33271bedca1b32a2cec8c9d6fbec0a6d871134915cd5c11111c48b5015019021b61388e0a2c'
31         'c22be63b5103b9c9c21366df6d0a76b59d3f39054204a56845fe105de54240fc0f269db48330fb52269e9b32bef147bd529c39d1f26a088386c70f5d702168ff')
34 pkgver() {
35   cd "$pkgname"
37   git describe --tags | sed -e 's/^v//' -e 's/-/./g'
40 prepare() {
41   cd "$pkgname"
43   # prepare git submodules
44   git submodule init
45   git config submodule.klystron.url "$srcdir/github.com-LTVA1-klystron"
46   git -c protocol.file.allow=always submodule update
48   # update desktop file to point to klystrack-plus,
49   # just in case users have the original klystrack installed
50   patch --strip 1 --input "$srcdir/update-desktop-file.patch"
52   # first pass at ensuring reproducibility by using 
53   # git commit date instead of date
54   patch --strip 1 --input "$srcdir/repro-klystrack-plus.patch"
55   patch --directory klystron --strip 1 --input "$srcdir/repro-klystron.patch"
58 build() {
59   cd "$pkgname"
61   make CFG=release RES_PATH=/usr/lib/klystrack-plus
64 package() {
65   cd "$pkgname"
67   make DESTDIR="$pkgdir" CFG=release RES_PATH=/usr/lib/klystrack-plus install
69   # rename binary
70   mv -v "$pkgdir/usr/bin/"klystrack{,-plus}
72   # documentation
73   install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
75   # additional data
76   cp -vr examples "$pkgdir/usr/share/$pkgname"
78   # man page
79   install -vDm644 doc/klystrack.1 "$pkgdir/usr/share/man/man1/$pkgname.1"
81   # desktop file
82   install -vDm644 linux/klystrack.desktop "$pkgdir/usr/share/applications/$pkgname.desktop"
84   # application icon
85   install -vDm644 icon/256x256.png "$pkgdir/usr/share/icons/hicolor/256x256/apps/$pkgname.png"
87   # license
88   install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE