summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9a267102f4230ab5fd420e0aa137d08799876a59 (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
73
74
75
76
77
78
79
80
81
82
83
84
# Maintainer: neeshy <neeshy@tfwno.gf>
# Contributor: Evan Chen <evan@evanchen.cc>
# Contributor: éclairevoyant
# Contributor: Devin J dot  Pohly <djpohly+arch at gmail dot com>
# Contributor: Martin Kröning <m dot kroening at hotmail dot de>
# Contributor: sl1pkn07
# Contributor: Ryan Peters <sloshy45 at sbcglobal dot net>
# Contributor: Artefact2 <artefact2 at gmail dot com>
# Contributor: Lauri Niskanen <ape at ape3000 dot com>
# Contributor: Travis Nickles <ryoohki7 at yahoo dot com>
# Contributor: Stefan Lohmaier <noneuss at gmail dot com>
# Contributor: Dan Guzek <dguzek at gmail dot com>
_pkgname=stepmania
pkgname="$_pkgname-git"
pkgver=latest
pkgrel=5
pkgdesc="Advanced rhythm game. Designed for both home and arcade use."
arch=(x86_64)
url="http://www.stepmania.com/"
license=('MIT AND CC-BY-NC-4.0')
depends=('mesa' 'glew' 'glu' 'udev' 'libx11' 'libxext' 'libxtst' 'libxinerama' 'libxrandr'
         'alsa-lib' 'libpulse' 'ffmpeg' 'libmad' 'libogg' 'libvorbis' 'libjpeg' 'libpng'
         'gtk3' 'libtommath' 'libtomcrypt' 'jsoncpp' 'pcre' 'zlib')
makedepends=('cmake')
provides=('stepmania')
conflicts=('stepmania')
source=("git+https://github.com/stepmania/stepmania.git"
        "https://github.com/stepmania/stepmania/commit/3fef5ef60b7674d6431f4e1e4ba8c69b0c21c023.patch"
        "https://github.com/stepmania/stepmania/commit/e0d2a5182dcd855e181fffa086273460c553c7ff.patch"
        "ffmpeg-7.patch"
        "ffmpeg-remove-asm-requirement.patch"
        "stepmania.sh")
sha256sums=('SKIP'
            'fe3c77293d65b654c91d419ba7421feb2ad2da8e4561fadc5f02b3bd0f791634'
            'b04bc15cbe85a41117220fadbadce5aa0893582fa8d720697ee6b864f7f0c093'
            'f6406a9daa61f53a530402965cfc9533f9836d558026b0fc5627db05f8cde068'
            'ae8d9911eaf7680d7f05a5bafa98588a1582f9b7713a295a66603a2ca8b5addf'
            'e2caeb91fccaba9502273fba875355b516e821e6754b2238a20cb7c31f3c4a60')

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

prepare() {
  cd "$srcdir/$_pkgname"
  patch -Np1 -i "$srcdir/3fef5ef60b7674d6431f4e1e4ba8c69b0c21c023.patch"
  patch -Np1 -i "$srcdir/e0d2a5182dcd855e181fffa086273460c553c7ff.patch"
  patch -Np1 -i "$srcdir/ffmpeg-7.patch"
  patch -Np1 -i "$srcdir/ffmpeg-remove-asm-requirement.patch"
}

build() {
  cd "$srcdir/$_pkgname/Build"
  cmake \
    -DCMAKE_INSTALL_PREFIX=/opt \
    -DWITH_FULL_RELEASE=YES \
    -DWITH_PORTABLE_TOMCRYPT=NO \
    -DWITH_SYSTEM_FFMPEG=YES \
    -DWITH_SYSTEM_MAD=YES \
    -DWITH_SYSTEM_OGG=YES \
    -DWITH_SYSTEM_JPEG=YES \
    -DWITH_SYSTEM_PNG=YES \
    -DWITH_SYSTEM_GLEW=YES \
    -DWITH_SYSTEM_TOMMATH=YES \
    -DWITH_SYSTEM_TOMCRYPT=YES \
    -DWITH_SYSTEM_JSONCPP=YES \
    -DWITH_SYSTEM_PCRE=YES \
    -DWITH_SYSTEM_ZLIB=YES \
    -Wno-dev \
    ..
  make
}

package() {
  cd "$srcdir/$_pkgname"
  make -C Build DESTDIR="$pkgdir" install

  install -Dm755 "$srcdir/stepmania.sh" "$pkgdir/usr/bin/stepmania"
  install -Dm644 stepmania.desktop "$pkgdir/usr/share/applications/stepmania.desktop"

  install -Dm644 Docs/Licenses.txt "$pkgdir/usr/share/licenses/$pkgname/Licenses.txt"
  cp -a icons "$pkgdir/usr/share"
}