template 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Template file for 'ditaa'
  2. pkgname=ditaa
  3. version=0.11.0
  4. revision=2
  5. create_wrksrc=yes
  6. build_style=fetch
  7. # Liberation: Added for build
  8. hostmakedepends="tar openjdk8 leiningen"
  9. depends="virtual?java-environment"
  10. short_desc="Small utility that converts ascii-art diagrams to bitmap diagrams"
  11. maintainer="Alexander Egorenkov <egorenar-dev@posteo.net>"
  12. license="GPL-3.0-or-later"
  13. homepage="https://github.com/stathissideris/ditaa"
  14. # Liberation: Changed to source file
  15. distfiles="${homepage}/archive/v${version}.tar.gz"
  16. checksum=0cd69b13febd285d90fcdc220e81158aae0cba54c6d6bdfd38d97e708c611ebd
  17. # Liberation: Extract source
  18. do_extract() {
  19. # Extract without sub sub directories
  20. tar -xvf "${XBPS_SRCDISTDIR}/${pkgname}-${version}/v${version}.tar.gz" --strip 1
  21. }
  22. do_build() {
  23. # Liberation: Build from source
  24. # To fix JAVA_HOME related messages
  25. . /etc/profile.d/10_openjdk8.sh
  26. # Run build with leiningen
  27. lein uberjar
  28. # This mv is for keeping rest of the code intact
  29. mv target/${pkgname}-${version}-standalone.jar ${pkgname}-${version}-standalone.jar
  30. mv ${pkgname}-${version}-standalone.jar ${pkgname}-${version}.jar
  31. echo "#!/bin/sh" > ditaa
  32. echo "java -jar /usr/share/java/${pkgname}-${version}.jar \$@" >> ditaa
  33. chmod 755 ditaa
  34. }
  35. do_install() {
  36. vbin ditaa
  37. vinstall ${pkgname}-${version}.jar 644 usr/share/java ${pkgname}-${version}.jar
  38. }