desktop/josm/PKGBUILD
2014-07-31 07:23:44 +00:00

49 lines
1.8 KiB
Bash

# Maintainer: Manuel 'UtG' <utg[dot]chakra.linux[at]gmail[dot]com>
# contributor: abveritas@chakra-project.org
pkgname=josm
pkgver=7347
pkgrel=1
pkgdesc="An editor for OpenStreetMap written in Java"
arch=('x86_64')
url="http://josm.openstreetmap.de"
license=('GPL')
depends=('java-runtime' 'intltool')
#screenshot=('http://wiki.openstreetmap.org/w/images/thumb/4/4e/JOSM-Jan-2009.jpg/800px-JOSM-Jan-2009.jpg')
source=("${url}/${pkgname}-tested.jar"
"${pkgname}.desktop"
"$pkgname.conf.d")
sha256sums=('959be95b6f1f12d083182ca90b7c3daf24f88ddc4ebf102675297a7bc5bafcce'
'970d65819cedaa3f5174044e2e2b5d8b1d923603de9844a9d4d6b94e9b106d90'
'4d94ccc5d8e6372e9d9eb1557994c8b41d5f011bc37a7dacdbc55b649da3b969')
package() {
install -D -m644 ${pkgname}-tested.jar "${pkgdir}/usr/share/java/${pkgname}/${pkgname}.jar"
# Desktop integration.
install -D -m644 ${pkgname}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop"
install -D -m644 images/logo.png "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
# Executable.
install -d "${pkgdir}/usr/bin"
# echo "#!/bin/sh" > ${pkgdir}/usr/bin/${pkgname}
# echo CLASSPATH="/usr/share/java/josm/josm.jar" >> "${pkgdir}/usr/bin/${pkgname}"
# echo java -cp \"\${CLASSPATH}\" org.openstreetmap.josm.gui.MainApplication \"\$@\" \
# >> ${pkgdir}/usr/bin/${pkgname}
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
chmod 755 "${pkgdir}/usr/bin/${pkgname}"
install -Dm644 ${srcdir}/$pkgname.conf.d ${pkgdir}/etc/conf.d/$pkgname
}