PKGBUILD 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Maintainer (Arch): Lukas Fleischer <lfleischer@archlinux.org>
  2. # Contributor (Arch): Stefan Husmann <stefan-husmann@t-online.de>
  3. # Contributor (Arch): Simon Lipp <sloonz+aur@gmail.com>
  4. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  5. pkgname=fop
  6. pkgver=2.2
  7. pkgrel=1.parabola1
  8. pkgdesc='XSL-FO implementation in Java.'
  9. arch=('any')
  10. url='http://xmlgraphics.apache.org/fop/'
  11. license=('APACHE')
  12. depends=('java-xmlgraphics-commons' 'java-commons-logging' 'java-commons-io' 'java-batik'
  13. 'java-avalon-framework' 'java-qdox' 'fontbox' 'tomcat8')
  14. makedepends=('apache-ant' 'jh')
  15. source=("http://ftp-stud.hs-esslingen.de/pub/Mirrors/ftp.apache.org/dist/xmlgraphics/$pkgname/source/$pkgname-$pkgver-src.tar.gz"
  16. 'fop.conf')
  17. sha256sums=('5052fef87fc4b888bd49d29bf626255c9d3443b628f21393c11ea121d44a6552'
  18. 'd2900605dc271f5938d0820ca30bdec8060724976b56e43d827157bd6975da96')
  19. backup=('etc/fop.conf')
  20. prepare() {
  21. cd "$srcdir/$pkgname-$pkgver/fop"
  22. rm -rv lib/*
  23. mkdir -p lib/build
  24. ln -sf /usr/share/java/qdox.jar lib/build/qdox.jar
  25. }
  26. build() {
  27. cd "$srcdir/$pkgname-$pkgver"
  28. ant -f "$pkgname/build.xml" package \
  29. -lib /usr/share/java/serializer.jar \
  30. -lib /usr/share/java/xmlgraphics-commons.jar \
  31. -lib /usr/share/java/avalon-framework-api.jar \
  32. -lib /usr/share/java/avalon-framework-impl.jar \
  33. -lib /usr/share/java/commons-io.jar \
  34. -lib /usr/share/java/batik/batik-all.jar \
  35. -lib /usr/share/java/batik/batik-libs.jar \
  36. -lib /usr/share/java/tomcat8/servlet-api.jar \
  37. -lib /usr/share/java/xml-apis-ext.jar \
  38. -lib /usr/share/java/fontbox.jar
  39. }
  40. package() {
  41. cd "$srcdir/$pkgname-$pkgver"
  42. # Install license file
  43. install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
  44. # Install documentation
  45. #install -d "$pkgdir/usr/share/doc/$pkgname"
  46. #cp -r build/javadocs "$pkgdir/usr/share/doc/$pkgname"
  47. # Install Maven artifacts
  48. export DESTDIR=$pkgdir
  49. jh mvn-install org.apache.xmlgraphics $pkgname $pkgver \
  50. "$pkgname/pom.xml" \
  51. "$pkgname/build/$pkgname.jar" \
  52. "$pkgname-$pkgver.jar"
  53. ln -s "/usr/share/java/$pkgname-$pkgver.jar" \
  54. "$pkgdir/usr/share/java/$pkgname.jar"
  55. install -d "$pkgdir/usr/share/java/$pkgname"
  56. ln -s "/usr/share/java/$pkgname.jar" \
  57. "$pkgdir/usr/share/java/$pkgname/$pkgname.jar"
  58. install -Dm0644 "../fop.conf" "$pkgdir/etc/fop.conf"
  59. install -Dm0755 "$pkgname/$pkgname" "$pkgdir/usr/bin/$pkgname"
  60. }