summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Careil2019-12-01 17:14:34 +0100
committerBaptiste Careil2019-12-01 17:14:34 +0100
commit05f22693d50c6eff5575a8b420b35d49c4eb7749 (patch)
treec371f731ee13cd29d79f37e346eea5a94ad1b5b1
downloadaur-05f22693d50c6eff5575a8b420b35d49c4eb7749.tar.gz
Initial version
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD72
-rw-r--r--PathOfBuilding.sh2
3 files changed, 101 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..06f5136b39c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = path-of-building-git
+ pkgdesc = An offline build planner for Path of Exile using PoBFrontent
+ pkgver = 1.4.152.r895.37
+ pkgrel = 1
+ url = https://github.com/Openarl/PathOfBuilding
+ arch = x86_64
+ license = MIT
+ makedepends = meson
+ makedepends = ninja
+ makedepends = unzip
+ makedepends = rsync
+ depends = zlib
+ depends = qt5-base
+ depends = luajit
+ depends = libgl
+ depends = curl
+ source = git+https://github.com/Openarl/PathOfBuilding
+ source = git+https://github.com/philroberts/pobfrontend
+ source = git+https://github.com/Lua-cURL/Lua-cURLv3
+ source = PathOfBuilding.sh
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = 02b44b44872bae4725bc6de600f4592ce33b26e90fa0f392922004ee15898446
+
+pkgname = path-of-building-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..6a669612f31
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,72 @@
+# Maintainer: bcareil <baptiste.careil@gmail.com>
+
+pkgname='path-of-building-git'
+pkgrel=1
+pkgdesc='An offline build planner for Path of Exile using PoBFrontent'
+arch=('x86_64')
+url='https://github.com/Openarl/PathOfBuilding'
+license=('MIT')
+pkgver=1.4.152.r895.37
+
+depends=('zlib' 'qt5-base' 'luajit' 'libgl' 'curl')
+makedepends=('meson' 'ninja' 'unzip' 'rsync')
+
+source=(
+ 'git+https://github.com/Openarl/PathOfBuilding'
+ 'git+https://github.com/philroberts/pobfrontend'
+ 'git+https://github.com/Lua-cURL/Lua-cURLv3'
+ 'PathOfBuilding.sh'
+)
+sha256sums=(
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ '02b44b44872bae4725bc6de600f4592ce33b26e90fa0f392922004ee15898446'
+)
+
+#prepare() {
+#}
+
+pkgver() {
+ cd "${srcdir}/PathOfBuilding"
+ pob_v=$(head -n1 CHANGELOG.md | sed 's/[^0-9]*\(\w\+\(\.\w\+\)\+\).*/\1/')
+ pob_r=$(git rev-list --count HEAD)
+ cd "${srcdir}/pobfrontend"
+ pf_r=$(git rev-list --count HEAD)
+ printf '%s.r%s.%s' "$pob_v" "$pob_r" "$pf_r"
+}
+
+build() {
+ # build lcurl.so
+ (cd "${srcdir}/Lua-cURLv3" && make LUA_IMPL=luajit)
+ # build pobfrontend
+ (cd "${srcdir}/pobfrontend" && meson -Dbuildtype=release build && cd build && ninja)
+}
+
+package() {
+ mkdir -p "${pkgdir}/usr/share/"
+ rsync -a '--exclude=.git*' "${srcdir}/PathOfBuilding" "${pkgdir}/usr/share/"
+ dst_dir="${pkgdir}/usr/share/PathOfBuilding"
+ cd "$dst_dir"
+ # extract skill tree assets
+ for f in tree*.zip; do
+ unzip "$f"
+ rm "$f"
+ done
+ # extract lua libs
+ unzip runtime-win32.zip lua/xml.lua lua/base64.lua lua/sha1.lua
+ mv lua/*.lua .
+ rmdir lua
+ rm runtime-win32.zip
+ # tidy-up permissions
+ chmod og-w -R "${dst_dir}"
+ # install binaries
+ install -s -m755 "${srcdir}/Lua-cURLv3/lcurl.so" -t "${dst_dir}"
+ install -s -m755 "${srcdir}/pobfrontend/build/pobfrontend" -t "${dst_dir}"
+ # install shell script
+ install -D -m755 "${srcdir}/PathOfBuilding.sh" "${pkgdir}/usr/bin/PathOfBuilding"
+ # licenses
+ install -D -m644 "${srcdir}/Lua-cURLv3/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/Lua-cURLv3-LICENSE"
+ install -D -m644 "${srcdir}/pobfrontend/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/pobfrontend-LICENSE"
+ install -D -m644 "${srcdir}/PathOfBuilding/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/PathOfBuilding-LICENSE.md"
+}
diff --git a/PathOfBuilding.sh b/PathOfBuilding.sh
new file mode 100644
index 00000000000..11c51947e9b
--- /dev/null
+++ b/PathOfBuilding.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+cd /usr/share/PathOfBuilding/ && ./pobfrontend