mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
47 lines
1.5 KiB
Bash
47 lines
1.5 KiB
Bash
pkgname=josm
|
|
pkgver=13053
|
|
pkgrel=1
|
|
pkgdesc="An editor for OpenStreetMap written in Java"
|
|
arch=('x86_64')
|
|
url="https://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")
|
|
noextract=($pkgname-tested.jar)
|
|
sha256sums=('e6fbff5274641e124803bcf9eb5b3401d6db05978024d33fde8356fd40affa33'
|
|
'970d65819cedaa3f5174044e2e2b5d8b1d923603de9844a9d4d6b94e9b106d90'
|
|
'4d94ccc5d8e6372e9d9eb1557994c8b41d5f011bc37a7dacdbc55b649da3b969')
|
|
|
|
prepare() {
|
|
cd "${srcdir}"
|
|
bsdtar -xf $pkgname-tested.jar images/logo.png
|
|
}
|
|
|
|
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"
|
|
|
|
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
|
|
}
|