2014-06-06 05:02:52 +08:00
|
|
|
# Maintainer: Manuel 'UtG' <utg[dot]chakra.linux[at]gmail[dot]com>
|
2013-12-10 12:22:42 +08:00
|
|
|
# contributor: abveritas@chakra-project.org
|
2010-09-14 05:12:48 +08:00
|
|
|
|
|
|
|
pkgname=josm
|
2014-07-31 15:23:44 +08:00
|
|
|
pkgver=7347
|
2014-05-09 21:21:46 +08:00
|
|
|
pkgrel=1
|
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"
|
2010-09-14 05:12:48 +08:00
|
|
|
license=('GPL')
|
2011-03-12 04:20:28 +08:00
|
|
|
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")
|
2014-07-31 15:23:44 +08:00
|
|
|
sha256sums=('959be95b6f1f12d083182ca90b7c3daf24f88ddc4ebf102675297a7bc5bafcce'
|
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
|
|
|
|
|
|
|
# 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
|
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
|
2010-09-14 05:12:48 +08:00
|
|
|
}
|