summaryrefslogtreecommitdiff
path: root/pcr/java-rsyntaxtextarea
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/java-rsyntaxtextarea')
-rw-r--r--pcr/java-rsyntaxtextarea/PKGBUILD50
1 files changed, 50 insertions, 0 deletions
diff --git a/pcr/java-rsyntaxtextarea/PKGBUILD b/pcr/java-rsyntaxtextarea/PKGBUILD
new file mode 100644
index 000000000..b0943640b
--- /dev/null
+++ b/pcr/java-rsyntaxtextarea/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+_pkgname=rsyntaxtextarea
+pkgname=java-${_pkgname}
+pkgver=2.5.8
+pkgrel=1
+pkgdesc="Java library for syntax highlighting text component"
+arch=('any')
+url="https://bobbylight.github.io/RSyntaxTextArea/"
+license=('BSD')
+depends=('java-runtime')
+makedepends=('java-environment' 'jh')
+source=("https://github.com/bobbylight/RSyntaxTextArea/archive/$pkgver.tar.gz"
+ 'rsyntaxtextarea-arduino.patch')
+sha256sums=('df6430cf15bfcb7612b52d4c3b961c8b7bf0b848c7c251e6d405d2598484b698'
+ '24b3f8e9e1643c3e55f8503362d9ba164be7cab31fed9734f48159bcf0edfcec')
+
+prepare() {
+ cd "$srcdir/RSyntaxTextArea-$pkgver"
+ mkdir -p build/classes
+ cp -r src/main/resources/org build/classes
+ patch -Np1 -i "$srcdir/rsyntaxtextarea-arduino.patch"
+}
+
+build() {
+ cd "$srcdir/RSyntaxTextArea-$pkgver"
+ javac -d build/classes $(find src/main/java -name \*.java)
+ javadoc -d build/javadoc -sourcepath src/main/java -subpackages org
+ jar -cvf "${_pkgname}.jar" -C build/classes .
+}
+
+package() {
+ cd "$srcdir/RSyntaxTextArea-$pkgver"
+
+ # Install license file
+ install -Dm644 src/main/dist/RSyntaxTextArea.License.txt \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
+
+ # Install documentation
+ install -d "$pkgdir/usr/share/doc/$pkgname"
+ cp -r build/javadoc "$pkgdir/usr/share/doc/$pkgname"
+
+ # Install Maven artifacts
+ export DESTDIR=$pkgdir
+ jh mvn-install com.fifesoft ${_pkgname} $pkgver \
+ pom.xml "${_pkgname}.jar" "${_pkgname}-$pkgver.jar"
+
+ ln -s "/usr/share/java/${_pkgname}-$pkgver.jar" \
+ "$pkgdir/usr/share/java/${_pkgname}.jar"
+}