void-packages/srcpkgs/jedit/template

57 lines
1.5 KiB
Bash

# Template file for 'jedit'
pkgname=jedit
version=5.6.0
revision=2
hostmakedepends="apache-ant openjdk11 docbook-xsl"
depends="openjdk11 desktop-file-utils"
short_desc="Plugin-based editor for programmers"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="http://jedit.org"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${version}/${pkgname}${version}source.tar.bz2"
checksum=76c16ae0168d9b64ecddd8bf08aa49ab352adb2c9687191bc71895a96a8dfe1d
post_patch() {
# skip junit stuff, fails in chroot
vsed -i 's/,test//' build.xml
}
do_build() {
. /etc/profile.d/apache-ant.sh
. /etc/profile.d/openjdk.sh
ant -propertyfile ${FILESDIR}/build.properties build
ant -propertyfile ${FILESDIR}/build.properties docs-html
}
do_install() {
# stuff from build/
vmkdir usr/share/jedit
vinstall build/jedit.jar 644 usr/share/jedit
vcopy build/jars usr/share/jedit
vcopy build/keymaps usr/share/jedit
vcopy build/macros usr/share/jedit
vcopy build/modes usr/share/jedit
vcopy build/properties usr/share/jedit
vcopy build/startup usr/share/jedit
# documentation
vmkdir usr/share/doc/${pkgname}
vcopy "build/doc/*" usr/share/doc/${pkgname}
# man page
cp package-files/linux/jedit.1 build
vsed -i "s,@jedit.version@,${version},g" build/jedit.1
vman build/jedit.1
# desktop file
vmkdir usr/share/applications
cp package-files/linux/deb/jedit.desktop build
vsed -i "s,usr/share/jEdit/doc,usr/share/doc/${pkgname},g" \
build/jedit.desktop
vinstall build/jedit.desktop 755 usr/share/applications
# launcher
vbin ${FILESDIR}/jedit
}