From f3e283497f6a1d25197b965b7941b71d6a152299 Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Sun, 4 Dec 2016 22:46:00 -0500 Subject: jericho-html: add new package to [pcr] --- pcr/jericho-html/PKGBUILD | 50 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 pcr/jericho-html/PKGBUILD 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 + +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" +} -- cgit v1.2.3