summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorwinlu2015-08-15 17:35:12 +0200
committerwinlu2015-08-15 17:39:54 +0200
commit204a8dddb28080e4d57d31de861b64acff718dcf (patch)
tree03bfa720c401cf1beac9063dd847182f5aa67596
parent5fafd7e02a0d162b2bddfd3b681713e6f87c0d41 (diff)
downloadaur-204a8dddb28080e4d57d31de861b64acff718dcf.tar.gz
update to 2015_1_194
* update version * add soundsense.install with warnings for missing group and removal of /opt/soundsense * fix depends - replace java-environment with java-runtime - move coreutils and unzip to makedepends * cleaner prepare and install section * sticky group for /opt/soundsense * remove more unneeded files in package
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD69
-rw-r--r--soundsense.install10
-rw-r--r--soundsense_run3
4 files changed, 57 insertions, 43 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 38427ccc77a..d996be08595 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,18 @@
pkgbase = soundsense
pkgdesc = SoundSense is a sound-engine tool for Dwarf Fortress.
- pkgver = 43_187
- pkgrel = 3
+ pkgver = 2015_1_194
+ pkgrel = 1
url = http://df.zweistein.cz/soundsense/
+ install = soundsense.install
arch = any
license = custom
- depends = java-environment
- depends = coreutils
- source = http://df.zweistein.cz/soundsense/soundSense_43_187.zip
- source = soundsense_run
- md5sums = b3dfea9716e7bdfe05ca2c0f44f582d8
- md5sums = 9584745318a6ae276feb72b08a1e35ef
+ makedepends = coreutils
+ makedepends = unzip
+ depends = java-runtime
+ source = http://df.zweistein.cz/soundsense/soundSense_2015-1_194.zip
+ source = soundsense.install
+ md5sums = 95eebf4bdd0e048e217288b80aaae658
+ md5sums = 15fd5fb1136348807f7f5351887b3ef9
pkgname = soundsense
diff --git a/PKGBUILD b/PKGBUILD
index b0ffdac060d..806f90e7fa2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,40 +1,45 @@
-# MAINTAINER: winlu <derwinlu AT gmail DOT com>
-
+# MAINTAINER: winlu <derwinlu AT gmail DOT com>
pkgname=soundsense
-pkgver=43_187
-pkgrel=3
+_pkgver="2015-1_194"
+pkgver=${_pkgver//-/_}
+pkgrel=1
pkgdesc="SoundSense is a sound-engine tool for Dwarf Fortress."
arch=("any")
url="http://df.zweistein.cz/soundsense/"
-license=('custom')
-depends=("java-environment"
- "coreutils")
-source=("http://df.zweistein.cz/soundsense/soundSense_$pkgver.zip"
- "soundsense_run")
-md5sums=("b3dfea9716e7bdfe05ca2c0f44f582d8"
- "9584745318a6ae276feb72b08a1e35ef")
+license=("custom")
+install="soundsense.install"
+depends=("java-runtime")
+makedepends=("coreutils"
+ "unzip")
+source=("http://df.zweistein.cz/soundsense/soundSense_${_pkgver}.zip"
+ "soundsense.install")
+md5sums=('95eebf4bdd0e048e217288b80aaae658'
+ '15fd5fb1136348807f7f5351887b3ef9')
+
+DEST="/opt/soundsense"
+
+prepare() {
+ cd $srcdir/$pkgname
-DEST="opt/soundsense/"
+ # fix line breaks
+ sed -i $'s/\r$//' soundSense.sh
+ # set correct working dir
+ sed -i 's:${0\%/\*}:'"${DEST}"':' soundSense.sh
+
+ unzip -q -o packSkeletons.zip
+}
package() {
- mkdir -p ${pkgdir}/${DEST}
- mkdir -p ${pkgdir}/usr/bin/
- #fix line breaks
- mv $srcdir/$pkgname/soundSense.sh $srcdir/$pkgname/soundSense.sh.dos
- tr -d '\r' < $srcdir/$pkgname/soundSense.sh.dos > $srcdir/$pkgname/soundSense.sh
- rm $srcdir/$pkgname/soundSense.sh.dos
- #rm windows files
- rm $srcdir/$pkgname/*.cmd
- rm $srcdir/$pkgname/*.exe
- #rm sources zip
- rm $srcdir/$pkgname/soundSense_${pkgver}_source.zip
- #copy over and set permissions
- cp -r $srcdir/$pkgname/. ${pkgdir}/${DEST}
- chown :games -R ${pkgdir}/${DEST}
- find ${pkgdir}/${DEST}/ -type d -exec chmod 775 {} +
- find ${pkgdir}/${DEST}/ -type f -exec chmod 664 {} +
- find ${pkgdir}/${DEST}/ -type f -name "*.jar" -exec chmod 644 {} +
- chmod 755 ${pkgdir}/${DEST}/soundSense.sh
- #install soundsense script
- install -Dm755 $srcdir/soundsense_run $pkgdir/usr/bin/soundsense
+ # install runner
+ install -Dm755 ${srcdir}/${pkgname}/soundSense.sh $pkgdir/usr/bin/soundsense
+ # rm unneeded files
+ rm $srcdir/$pkgname/*.{cmd,exe,zip,sh}
+ # copy over and set permissions
+ install -dm755 -o root -g games ${pkgdir}${DEST}
+ cp -r $srcdir/$pkgname/. ${pkgdir}${DEST}
+ chown root:games -R ${pkgdir}${DEST}
+ find ${pkgdir}${DEST}/ -type d -exec chmod 6775 {} +
+ find ${pkgdir}${DEST}/ -type f -exec chmod 664 {} +
}
+
+# vim:set ts=2 sw=2 et:
diff --git a/soundsense.install b/soundsense.install
new file mode 100644
index 00000000000..34e6866ffab
--- /dev/null
+++ b/soundsense.install
@@ -0,0 +1,10 @@
+post_install() {
+ echo "Make sure to add your user to the games group to use soundsense."
+}
+
+post_remove() {
+ echo "Removing /opt/soundsense directory."
+ rm -Rf /opt/soundsense
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/soundsense_run b/soundsense_run
deleted file mode 100644
index 4a29f657fee..00000000000
--- a/soundsense_run
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-cd /opt/soundsense/
-./soundSense.sh