summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Knapp2020-12-04 12:07:51 -0800
committerJonathan Knapp2020-12-04 12:10:00 -0800
commitca92f01dd7cc0474697f61a0b0f7b0875299eb1b (patch)
treee3cd9ae672f11422245201714d59f3dbf802a20d
parentfc44d52bc281452d6b2ad0c697eeae639408234d (diff)
downloadaur-ca92f01dd7cc0474697f61a0b0f7b0875299eb1b.tar.gz
Use git repo
-rw-r--r--.SRCINFO12
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD59
3 files changed, 43 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d3283b7543b2..b064455d8e49 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
-pkgbase = powder-toy
+pkgbase = powder-toy-git
pkgdesc = Desktop version of the classic falling sand physics sandbox, simulates air pressure, velocity & heat!
- pkgver = 95.0
+ pkgver = snapshot.204.2.ga3c2a0d6
pkgrel = 1
url = http://powdertoy.co.uk/
arch = x86_64
@@ -16,18 +16,20 @@ pkgbase = powder-toy
depends = bzip2
depends = zlib
depends = hicolor-icon-theme
- source = powder-toy-95.0.tar.gz::http://github.com/ThePowderToy/The-Powder-Toy/archive/v95.0.tar.gz
+ provides = powder-toy
+ conflicts = powder-toy
+ source = powder-toy::git+https://github.com/ThePowderToy/The-Powder-Toy.git#branch=master
source = powder-toy.patch
source = powder-toy.sh
source = powder-toy.desktop
source = powder-toy-open.desktop
source = powder-toy-ptsave.desktop
- sha256sums = f60c3dc93e4ceddeda92b768e75a2d218f8df3da4a569b7d7cb57fff5515e15b
+ sha256sums = SKIP
sha256sums = 4b75d58bfff9278bceb27fa14738e9a1abef6fe60680bb9f5eb0592f3d69a02a
sha256sums = b5d181c3141715b7dced8813cae6d07d2adc03bca2a7efe527592740de2d45e2
sha256sums = 265f530be7597fcc7bbaf2690fd517fe4f8f18372c808a90ddef49a604c8d455
sha256sums = 398f6d068dd37e12989f4132ea5966886b14036bac07a589991b283d242b4ca5
sha256sums = fcbf035d286d805dced55f147d649aa0bc74d3be873d5430de92d175d9f59431
-pkgname = powder-toy
+pkgname = powder-toy-git
diff --git a/.gitignore b/.gitignore
index 84863c533b73..8b37d12ed638 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
/src/
/pkg/
+/powder-toy/
/powder-toy-*.pkg.tar.*
/powder-toy-*.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
index 91b31c2fe5b3..ae1f0678bd34 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,3 +1,4 @@
+# Maintainer: Jonathan Knapp <jaknapp8+aur@gmail.com>
# Maintainer: Dmytro Meleshko <dmytro.meleshko@gmail.com>
# Contributor: farseerfc <farseerfc@archlinuxcn.org>
# Contributor: refujee <gmail.com: refujee>
@@ -7,36 +8,46 @@
# Select version of Lua. Possible values are luajit, lua51, lua52 and an empty
# string to disable Lua support. luajit is used in the official builds.
_lua=luajit
+_branch=master
+#_branch=stable
-pkgname=powder-toy
-pkgver=95.0
+_ogname=powder-toy
+pkgname=powder-toy-git
+pkgver=snapshot.204.2.ga3c2a0d6
pkgrel=1
pkgdesc="Desktop version of the classic falling sand physics sandbox, simulates air pressure, velocity & heat!"
arch=(x86_64 i686)
+provides=('powder-toy')
+conflicts=('powder-toy')
depends=('glibc' 'libx11' 'sdl2' $_lua 'fftw' 'bzip2' 'zlib' 'hicolor-icon-theme')
makedepends=('scons' 'libicns')
url="http://powdertoy.co.uk/"
license=('GPL3')
-source=("${pkgname}-${pkgver}.tar.gz::http://github.com/ThePowderToy/The-Powder-Toy/archive/v${pkgver}.tar.gz"
- "${pkgname}.patch"
- "${pkgname}.sh"
- "${pkgname}.desktop"
- "${pkgname}-open.desktop"
- "${pkgname}-ptsave.desktop")
-sha256sums=('f60c3dc93e4ceddeda92b768e75a2d218f8df3da4a569b7d7cb57fff5515e15b'
+source=("${_ogname}::git+https://github.com/ThePowderToy/The-Powder-Toy.git#branch=$_branch"
+ "${_ogname}.patch"
+ "${_ogname}.sh"
+ "${_ogname}.desktop"
+ "${_ogname}-open.desktop"
+ "${_ogname}-ptsave.desktop")
+sha256sums=('SKIP'
'4b75d58bfff9278bceb27fa14738e9a1abef6fe60680bb9f5eb0592f3d69a02a'
'b5d181c3141715b7dced8813cae6d07d2adc03bca2a7efe527592740de2d45e2'
'265f530be7597fcc7bbaf2690fd517fe4f8f18372c808a90ddef49a604c8d455'
'398f6d068dd37e12989f4132ea5966886b14036bac07a589991b283d242b4ca5'
'fcbf035d286d805dced55f147d649aa0bc74d3be873d5430de92d175d9f59431')
+pkgver() {
+ cd ${_ogname}
+ git describe --tags | sed 's/^v//;s/[-+]/./g'
+}
+
prepare() {
- cd "The-Powder-Toy-${pkgver}"
- patch --forward --strip=1 --input="${srcdir}/${pkgname}.patch"
+ cd ${_ogname}
+ patch --forward --strip=1 --input="${srcdir}/${_ogname}.patch"
}
build() {
- cd "The-Powder-Toy-${pkgver}"
+ cd ${_ogname}
# extract document icons from macOS .icns files
( cd resources && icns2png -x document.icns )
@@ -65,29 +76,29 @@ build() {
"") extra_flags+=(--nolua) ;;
esac
- msg2 "building ${pkgname} with the following extra flags: ${extra_flags[*]}"
- scons --lin --release --output="${pkgname}" ${MAKEFLAGS} "${extra_flags[@]}"
+ msg2 "building ${_ogname} with the following extra flags: ${extra_flags[*]}"
+ scons --lin --release --output="${_ogname}" ${MAKEFLAGS} "${extra_flags[@]}"
}
package() {
- install -Dm755 "${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
- install -Dm644 "${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
- install -Dm644 "${pkgname}-open.desktop" "${pkgdir}/usr/share/applications/${pkgname}-open.desktop"
- install -Dm644 "${pkgname}-ptsave.desktop" "${pkgdir}/usr/share/applications/${pkgname}-ptsave.desktop"
+ install -Dm755 "${_ogname}.sh" "${pkgdir}/usr/bin/${_ogname}"
+ install -Dm644 "${_ogname}.desktop" "${pkgdir}/usr/share/applications/${_ogname}.desktop"
+ install -Dm644 "${_ogname}-open.desktop" "${pkgdir}/usr/share/applications/${_ogname}-open.desktop"
+ install -Dm644 "${_ogname}-ptsave.desktop" "${pkgdir}/usr/share/applications/${_ogname}-ptsave.desktop"
- cd "The-Powder-Toy-${pkgver}"
+ cd ${_ogname}
- install -Dm755 "build/${pkgname}" "${pkgdir}/usr/lib/${pkgname}/${pkgname}"
- install -Dm644 "resources/powdertoy-save.xml" "${pkgdir}/usr/share/mime/packages/${pkgname}-save.xml"
- install -Dm644 "resources/powder.appdata.xml" "${pkgdir}/usr/share/metainfo/${pkgname}.appdata.xml"
+ install -Dm755 "build/${_ogname}" "${pkgdir}/usr/lib/${_ogname}/${_ogname}"
+ install -Dm644 "resources/powdertoy-save.xml" "${pkgdir}/usr/share/mime/packages/${_ogname}-save.xml"
+ install -Dm644 "resources/powder.appdata.xml" "${pkgdir}/usr/share/metainfo/${_ogname}.appdata.xml"
local icon_size
for icon_size in 16 24 32 48 128 256; do
install -Dm644 "resources/icon/powder-${icon_size}.png" \
- "${pkgdir}/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps/${pkgname}.png"
+ "${pkgdir}/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps/${_ogname}.png"
done
for icon_size in 16 32 128 256 512; do
install -Dm644 "resources/document_${icon_size}x${icon_size}x32.png" \
- "${pkgdir}/usr/share/icons/hicolor/${icon_size}x${icon_size}/mimetypes/application-vnd.${pkgname}.save.png"
+ "${pkgdir}/usr/share/icons/hicolor/${icon_size}x${icon_size}/mimetypes/application-vnd.${_ogname}.save.png"
done
}