desktop/josm/PKGBUILD

41 lines
1.4 KiB
Bash
Raw Normal View History

pkgname=josm
2016-03-15 22:23:23 +08:00
pkgver=9979
2016-04-17 06:08:13 +08:00
pkgrel=2
2014-06-06 05:02:52 +08:00
pkgdesc="An editor for OpenStreetMap written in Java"
2013-12-10 12:22:42 +08:00
arch=('x86_64')
2014-03-01 13:22:43 +08:00
url="http://josm.openstreetmap.de"
license=('GPL')
depends=('java-runtime' 'intltool')
2014-06-06 05:02:52 +08:00
#screenshot=('http://wiki.openstreetmap.org/w/images/thumb/4/4e/JOSM-Jan-2009.jpg/800px-JOSM-Jan-2009.jpg')
2014-03-01 13:22:43 +08:00
source=("${url}/${pkgname}-tested.jar"
2014-06-06 05:02:52 +08:00
"${pkgname}.desktop"
"$pkgname.conf.d")
2016-03-15 22:23:23 +08:00
sha256sums=('70a71600ccb2c23788bfdedd2297790f94af9457964748f7911e87038943c87f'
2014-06-06 05:02:52 +08:00
'970d65819cedaa3f5174044e2e2b5d8b1d923603de9844a9d4d6b94e9b106d90'
'4d94ccc5d8e6372e9d9eb1557994c8b41d5f011bc37a7dacdbc55b649da3b969')
2013-09-28 19:16:45 +08:00
package() {
install -D -m644 ${pkgname}-tested.jar "${pkgdir}/usr/share/java/${pkgname}/${pkgname}.jar"
2011-03-10 21:16:30 +08:00
2011-07-13 19:44:46 +08:00
# Desktop integration.
2013-09-28 19:16:45 +08:00
install -D -m644 ${pkgname}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop"
install -D -m644 images/logo.png "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
2011-03-10 21:16:30 +08:00
2011-07-13 19:44:46 +08:00
# Executable.
2013-09-28 19:16:45 +08:00
install -d "${pkgdir}/usr/bin"
2014-06-06 05:02:52 +08:00
cat <<"EOF" >${pkgdir}/usr/bin/$pkgname
#!/bin/sh
# source application-specific settings
while true; do
JOSM_ARGS=
[ -f /etc/conf.d/josm ] && . /etc/conf.d/josm
CLASSPATH="/usr/share/java/josm/josm.jar"
java ${JOSM_ARGS} -cp "${CLASSPATH}" -Djosm.restart=true org.openstreetmap.josm.gui.MainApplication "$@"
[ $? -eq 9 ] || break
done
EOF
2013-09-28 19:16:45 +08:00
chmod 755 "${pkgdir}/usr/bin/${pkgname}"
2014-06-06 05:02:52 +08:00
install -Dm644 ${srcdir}/$pkgname.conf.d ${pkgdir}/etc/conf.d/$pkgname
}