summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a3deadd1cc7b3217f83f47405cc41d7e7a9e1670 (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
# Maintainer: peterix@gmail.com

pkgname=multimc-git
pkgver=0.6.7.r0.gc291946d
pkgrel=1
pkgdesc="Free, open source launcher and instance manager for Minecraft."
arch=('i686' 'x86_64')
url="http://multimc.org/"
license=('Apache')
depends=('zlib' 'libgl' 'qt5-base' 'qt5-x11extras' 'java-runtime' 'qt5-svg' 'xorg-xrandr')
makedepends=('git' 'cmake' 'qt5-tools' 'qt5-x11extras' 'jdk8-openjdk')
conflicts=('multimc' 'multimc5' 'multimc5-git')
provides=('multimc' 'multimc5' 'multimc5-git')
replaces=('multimc5-git')
source=("$pkgname"::"git://github.com/MultiMC/MultiMC5.git")
sha512sums=('SKIP')

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

prepare() {
  cd "$srcdir/$pkgname"
  git submodule update --init
}

build() {
  export JAVA_HOME=/usr/lib/jvm/java-8-openjdk/
  cd "$srcdir/$pkgname"

  mkdir -p build
  cd build
  cmake -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DMultiMC_LAYOUT=lin-system \
        -DMultiMC_NOTIFICATION_URL:STRING=https://files.multimc.org/notifications.json \
        ..
  make
}

check() {
  cd "$srcdir/$pkgname/build"
  make test
}

package() {
 cd "$srcdir/$pkgname/build"
 make install DESTDIR="$pkgdir"
 install -D $srcdir/$pkgname/application/resources/multimc/scalable/multimc.svg $pkgdir/usr/share/pixmaps/multimc.svg
 install -D $srcdir/$pkgname/application/package/linux/multimc.desktop $pkgdir/usr/share/applications/multimc.desktop
}