summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 84410ad0b91bc14047de73729ea590caaddd0f12 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# $Id$
# Maintainer: Ondřej Hošek <ondra.hosek@gmail.com>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Christopher O'Neill <milkytracker@chrisoneill.co.uk>
# Contributor: Maks Verver <maksverver@geocities.com>

_pkgbase=milkytracker
pkgname=milkytracker-git
pkgver=v1.02.00.r25.gfd607a3
pkgrel=1
pkgdesc='Fast Tracker II inspired music tracker'
arch=('x86_64' 'i686')
url="http://www.milkytracker.org/"
license=('GPL3')
provides=("$_pkgbase")
conflicts=("$_pkgbase")
depends=('sdl2' 'alsa-lib' 'zlib' 'gcc-libs' 'lhasa' 'zziplib' 'rtaudio' 'rtmidi')
makedepends=('jack' 'gendesk' 'cmake')
optdepends=('jack: JACK audio support')
options=('docs' '!strip')
install="${_pkgbase}.install"
source=("${_pkgbase}::git+https://github.com/Deltafire/MilkyTracker.git"
        "${_pkgbase}.install")
sha256sums=('SKIP'
            'de270bb640a7ca57b4c70d270c55fc45228d823232b2fd9d00682465c635d1fb')

pkgver() {
  cd "$srcdir/${_pkgbase}"
  git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
}

prepare() {
  gendesk -f -n --pkgname "$_pkgbase" --pkgdesc "$pkgdesc" --name 'MilkyTracker' \
    --categories 'AudioVideo;Audio;AudioVideoEditing;'

  mkdir -p "$srcdir/build"
}

build() {
  cd "$srcdir/build"

  cmake \
    -DCMAKE_INSTALL_PREFIX:FILEPATH="/usr" \
    -DCMAKE_BUILD_TYPE:STRING="Release" \
    -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \
    -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \
    -DCMAKE_EXE_LINKER_FLAGS:STRING="${LDFLAGS}" \
    -DCMAKE_SHARED_LINKER_FLAGS:STRING="${LDFLAGS}" \
    "../${_pkgbase}"

  make
}

package() {
  cd "$srcdir/build"
  make DESTDIR="$pkgdir" install

  mkdir -p "$pkgdir/usr/share/applications" \
    "$pkgdir/usr/share/doc/milkytracker"

  cd "$srcdir/${_pkgbase}"
  install -Dm644 resources/pictures/carton.png \
    "$pkgdir/usr/share/pixmaps/milkytracker.png"
  install -m644 "$srcdir/milkytracker.desktop" \
    "$pkgdir/usr/share/applications"
  install -m644 docs/ChangeLog.html "$pkgdir/usr/share/doc/milkytracker"
  install -m644 docs/MilkyTracker.html "$pkgdir/usr/share/doc/milkytracker"
  install -m644 docs/readme_unix "$pkgdir/usr/share/doc/milkytracker"
  install -m644 docs/FAQ.html "$pkgdir/usr/share/doc/milkytracker"
}

# vim:set ts=2 sw=2 et: