summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD59
1 files changed, 59 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..bbe6b005d6e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Mckol <mckol363@gmail.com>
+
+pkgname=veloren-git
+pkgver=0.1.0.r149.4e9bc27
+pkgrel=1
+pkgdesc="An open-world, open-source multiplayer voxel RPG"
+arch=('x86_64' 'i686')
+url="veloren.net"
+license=('GPL3')
+depends=('bash')
+makedepends=(
+ 'git'
+ 'rust-nightly'
+ 'cargo-nightly'
+)
+provides=("$pkgname")
+conflicts=("$pkgname")
+source=(
+ "$pkgname::git+https://gitlab.com/veloren/game.git"
+ "git+https://gitlab.com/veloren/assets.git"
+ "veloren-voxygen"
+)
+noextract=("veloren-voxygen")
+md5sums=('SKIP' 'SKIP' 'SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g;s/v//'
+}
+
+prepare() {
+ cd "$srcdir/$pkgname/voxygen"
+ git submodule init assets
+ git config submodule.voxygen/assets.url "$srcdir/assets"
+ git submodule update
+}
+
+build() {
+ cd "$srcdir/$pkgname/voxygen"
+ cargo build --release
+ cd "$srcdir/$pkgname/server-cli"
+ cargo build --release
+}
+
+package() {
+ mkdir -p "$pkgdir/usr/share/veloren/voxygen"
+ mkdir -p "$pkgdir/usr/bin"
+ cp -r "$srcdir/$pkgname/voxygen/assets" "$pkgdir/usr/share/veloren/voxygen/assets"
+ cp -r "$srcdir/$pkgname/voxygen/shaders" "$pkgdir/usr/share/veloren/voxygen/shaders"
+ cp "$srcdir/$pkgname/target/release/voxygen" "$pkgdir/usr/share/veloren/voxygen/voxygen"
+ chmod +x "$pkgdir/usr/share/veloren/voxygen/voxygen"
+ # currently a script is needed to run voxygen from directory containing assets because using alternative assets path hasn't been implemented yet
+ cp "$srcdir/veloren-voxygen" "$pkgdir/usr/bin/"
+ chmod +x "$pkgdir/usr/bin/veloren-voxygen"
+
+ cp "$srcdir/$pkgname/target/release/server-cli" "$pkgdir/usr/bin/veloren-server"
+ chmod +x "$pkgdir/usr/bin/veloren-server"
+
+}