summaryrefslogtreecommitdiff
path: root/pcr/jericho-html/PKGBUILD
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-12-04 22:46:00 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-12-04 22:46:00 -0500
commitf3e283497f6a1d25197b965b7941b71d6a152299 (patch)
treec38e5d158fe0a63b87901a1cf7a9c8cb4a80bac6 /pcr/jericho-html/PKGBUILD
parent4b9f1031ff33cf93c0c52593f117d38ea39b8d1a (diff)
downloadabslibre-f3e283497f6a1d25197b965b7941b71d6a152299.tar.gz
abslibre-f3e283497f6a1d25197b965b7941b71d6a152299.tar.bz2
abslibre-f3e283497f6a1d25197b965b7941b71d6a152299.zip
jericho-html: add new package to [pcr]
Diffstat (limited to 'pcr/jericho-html/PKGBUILD')
-rw-r--r--pcr/jericho-html/PKGBUILD50
1 files changed, 50 insertions, 0 deletions
diff --git a/pcr/jericho-html/PKGBUILD b/pcr/jericho-html/PKGBUILD
new file mode 100644
index 000000000..f26fc40f0
--- /dev/null
+++ b/pcr/jericho-html/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+pkgname=jericho-html
+pkgver=3.3
+pkgrel=1
+pkgdesc='Java based library for HTML Parsing'
+arch=('any')
+url='http://jericho.htmlparser.net'
+license=('LGPL')
+depends=('java-runtime')
+makedepends=('java-environment' 'java-commons-logging' 'log4j-1.2' 'slf4j')
+source=("http://downloads.sourceforge.net/jerichohtml/$pkgname-$pkgver.zip")
+sha256sums=('236bc63259da9fe1b13d54f2b84e6c74ca5d9bea46b4db66eb136027dc821f5b')
+
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+ rm -rv {compile-time-dependencies,dist,docs,samples,test/lib}
+ mkdir -p build/classes
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ CLASSPATH="/usr/share/java/commons-logging.jar"
+ CLASSPATH+=":/usr/share/java/log4j-1.2.jar"
+ CLASSPATH+=":/usr/share/java/slf4j-api.jar"
+ javac -cp $CLASSPATH -d build/classes -encoding ISO-8859-1 \
+ $(find src/java -name \*.java)
+ javadoc -classpath $CLASSPATH -d build/javadoc -encoding ISO-8859-1 \
+ -sourcepath src/java -subpackages net
+
+ jar -cvf $pkgname-$pkgver.jar -C build/classes .
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # Install license file
+ install -Dm644 licence.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 jar
+ install -Dm755 "$pkgname-$pkgver.jar" \
+ "$pkgdir/usr/share/java/$pkgname/$pkgname-$pkgver.jar"
+ ln -s "/usr/share/java/$pkgname/$pkgname-$pkgver.jar" \
+ "$pkgdir/usr/share/java/$pkgname.jar"
+}