summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD49
-rw-r--r--gz-models.install11
3 files changed, 77 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..43cdd878685
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = gz-models
+ pkgdesc = HiRes 3D Models for GZDoom
+ pkgver = 16
+ pkgrel = 1
+ url = http://code.google.com/p/ds-models/
+ install = gz-models.install
+ arch = any
+ license = GPL
+ makedepends = subversion
+ makedepends = perl
+ makedepends = p7zip
+ depends = gzdoom
+ source = GZ-Models::svn+http://ds-models.googlecode.com/svn/trunk/GZ-Models/
+ sha256sums = SKIP
+
+pkgname = gz-models
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f49df91078d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Contributor: 3ED <krzysztof1987@gmail.com>
+
+pkgname=gz-models
+_svnmod=GZ-Models
+pkgver=16
+pkgrel=1
+pkgdesc="HiRes 3D Models for GZDoom"
+arch=('any')
+url="http://code.google.com/p/ds-models/"
+license=('GPL')
+depends=('gzdoom')
+makedepends=('subversion' 'perl' 'p7zip')
+install=gz-models.install
+source=("${_svnmod}::svn+http://ds-models.googlecode.com/svn/trunk/GZ-Models/")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd ${_svnmod}
+ local ver="$(svnversion)"
+ printf "%s" "${ver//[[:alpha:]]}"
+}
+
+prepare() {
+ cd "$srcdir"
+
+ find "$_svnmod" -type f -name "*.def" -print0|xargs -0 perl -pe 's/\xA0/ /g' -i
+
+ if [ -d "build" ]; then
+ rm -rf "build"
+ fi
+
+ mkdir -p -m 755 build/Models
+ mv "$_svnmod"/Build/*/*.def build/
+ mv "$_svnmod"/Build/Hires build/
+ mv "$_svnmod"/Build/*/*/ build/Models/
+
+ rm -rf "$_svnmod"
+}
+
+build() {
+ cd "$srcdir/build"
+ 7za a -bd -tzip ../GZ-Models.pk3 *.def Models Hires
+# bsdtar --format zip -cf ../GZ-Models.pk3 *.def Models Hires # not working :<
+}
+
+package() {
+ cd "$srcdir"
+ install -Dm644 GZ-Models.pk3 "$pkgdir"/usr/share/games/gzdoom/GZ-Models.pk3
+}
diff --git a/gz-models.install b/gz-models.install
new file mode 100644
index 00000000000..800920657ee
--- /dev/null
+++ b/gz-models.install
@@ -0,0 +1,11 @@
+post_install() {
+ cat << EOF
+>> I. Autoload:
+>> 1. Edit this file: "~/.config/gzdoom/zdoom.ini"
+>> 2. And put this: "Path=GZ-Models.pk3"; below that:
+>> a) for globally usage: "[Global.Autoload]"
+>> b) per game (eg. only for doom2): "[Doom2.Autoload]"
+>> II. Manually as gzdoom argument eg:
+>> gzdoom -iwad doom2.wad -file GZ-Models.pk3
+EOF
+}