desktop/josm/PKGBUILD

50 lines
1.9 KiB
Bash
Raw Normal View History

2014-12-30 18:11:06 +08:00
# Maintainer: Jeff Huang <s8321414[at]gmail[dot]com>
# Contributor: Manuel 'UtG' <utg[dot]chakra.linux[at]gmail[dot]com>
# Contributor: abveritas@chakra-project.org
pkgname=josm
2014-12-30 18:11:06 +08:00
pkgver=7906
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"
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")
2014-12-12 08:57:12 +08:00
sha256sums=('b30949f2b2c326263f7306136980f307776da592a973ace181f2c14123e4b65b'
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
}