summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcopygirl2018-01-11 01:27:52 +0100
committercopygirl2018-01-11 01:27:52 +0100
commit5f0a2cc25dcd76e4d9a3251b0b9a8abfd7d2eb88 (patch)
tree3653f948772b71a58e1902b1768c070ff9953ec2
downloadaur-5f0a2cc25dcd76e4d9a3251b0b9a8abfd7d2eb88.tar.gz
Initial commit
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD53
-rw-r--r--vsmodelcreator.desktop9
-rwxr-xr-xvsmodelcreator.sh5
4 files changed, 86 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5c7832fea179
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = vsmodelcreator-git
+ pkgdesc = Vintage Story Model Creator
+ pkgver = r223.3327409
+ pkgrel = 1
+ url = https://github.com/anegostudios/vsmodelcreator
+ arch = any
+ license = Apache
+ makedepends = git
+ makedepends = java-environment>=8
+ depends = java-runtime>=8
+ source = vsmodelcreator::git://github.com/anegostudios/vsmodelcreator.git
+ source = vsmodelcreator.desktop
+ source = vsmodelcreator.sh
+ md5sums = SKIP
+ md5sums = 93ebcec3e1e896caf3685171c1d74df4
+ md5sums = c73547c2875d92655e67ed75fd98dd85
+
+pkgname = vsmodelcreator-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..03886a2375e4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: copygirl <copygirl@mcft.net>
+_pkgname=vsmodelcreator
+pkgname=${_pkgname}-git
+pkgver=r223.3327409
+pkgrel=1
+pkgdesc="Vintage Story Model Creator"
+arch=('any')
+url="https://github.com/anegostudios/vsmodelcreator"
+license=('Apache')
+depends=('java-runtime>=8')
+makedepends=('git' 'java-environment>=8')
+options=()
+source=("${_pkgname}::git://github.com/anegostudios/vsmodelcreator.git"
+ "vsmodelcreator.desktop"
+ "vsmodelcreator.sh")
+md5sums=("SKIP"
+ "93ebcec3e1e896caf3685171c1d74df4"
+ "c73547c2875d92655e67ed75fd98dd85")
+
+pkgver() {
+ cd "${_pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "${_pkgname}"
+ # Build the application
+ mkdir -p bin
+ javac -cp 'libs/*' -d bin $(find src -name "*.java")
+ # Create a .jar file
+ jar cfe "${_pkgname}.jar" at.vintagestory.modelcreator.Start -C bin . -C assets .
+ # (Specifying the main entry class here, but
+ # not actually using it in the launch script.)
+}
+
+package() {
+ cd "${_pkgname}"
+ mkdir -p "${pkgdir}/usr/share/java/${_pkgname}"
+ # Copy executable and library .jar files
+ cp --parents vsmodelcreator.jar "${pkgdir}/usr/share/java/${_pkgname}/"
+ cp --parents libs/* "${pkgdir}/usr/share/java/${_pkgname}/"
+ # Copy native libraries
+ cp --parents natives/linux/* "${pkgdir}/usr/share/java/${_pkgname}/"
+ # TODO: See if we can depend on other packages that provide our dependencies.
+
+ cd ".."
+ mkdir -p ${pkgdir}/usr/{bin,share/{applications,pixmaps}}
+ # Copy launcher .sh file
+ cp "${_pkgname}.sh" "${pkgdir}/usr/bin/${_pkgname}"
+ # Copy .desktop file and icon
+ cp "${_pkgname}.desktop" "${pkgdir}/usr/share/applications"
+ cp "${_pkgname}/assets/appicon.ico" "${pkgdir}/usr/share/pixmaps/vsmodelcreator.ico"
+}
diff --git a/vsmodelcreator.desktop b/vsmodelcreator.desktop
new file mode 100644
index 000000000000..ec016d83c50c
--- /dev/null
+++ b/vsmodelcreator.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=Vintage Story Model Creator
+Comment=Create and animate blocks, items and entities for Vintage Story
+Exec=/usr/bin/vsmodelcreator
+Icon=/usr/share/pixmaps/vsmodelcreator.ico
+Categories=Development;
+Terminal=false
diff --git a/vsmodelcreator.sh b/vsmodelcreator.sh
new file mode 100755
index 000000000000..f49f992212c9
--- /dev/null
+++ b/vsmodelcreator.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+NAME=vsmodelcreator
+MAIN_CLASS=at.vintagestory.modelcreator.Start
+cd /usr/share/java/$NAME/
+exec /usr/bin/java -cp $NAME'.jar:libs/*' $MAIN_CLASS "$@"