summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD58
1 files changed, 58 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6b21c6ee407a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Clint Valentine <valentine.clint@gmail.com>
+
+pkgname=rtg-tools
+pkgver=3.8.4
+pkgrel=1
+pkgdesc="Utilities for accurate VCF comparison and manipulation"
+arch=('i686' 'x86_64')
+url="https://github.com/RealTimeGenomics/rtg-tools"
+license=('Simplified BSD')
+depends=('java-runtime>=1.8')
+makedepends=('apache-ant>1.9')
+source=(
+ "https://github.com/RealTimeGenomics/${pkgname}/archive/${pkgver}.tar.gz"
+ "rtg.cfg"
+ "rtg.sh")
+md5sums=(
+ 'c5b558cbe845fcb315e943162b7da38e'
+ '1e5e1f5df474ab87b5a28a9d694e4e17'
+ '64a6dc8d7c7ed9c3e0ba3d8c42f8194d')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ant zip-nojre
+ unzip -qn dist/rtg-tools-3.8.4-*-nojre.zip
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ant runalltests
+}
+
+package() {
+ cd "${srcdir}"
+ # Add environment variable to specify custom location of RTG.jar
+ install -Dm655 rtg.cfg "${pkgdir}/etc/rtg.cfg"
+ echo "RTG_JAR=/usr/share/java/${pkgname}/RTG.jar" >> "${pkgdir}/etc/rtg.cfg"
+
+ # Install primary JAR file
+ cd "${srcdir}/${pkgname}-${pkgver}/${pkgname}-${pkgver}-"*
+ install -Dm655 RTG.jar "${pkgdir}/usr/share/java/${pkgname}/RTG.jar"
+
+ # Remove the need for a local configuration file, respect only system config
+ install -Dm755 rtg "${pkgdir}/usr/bin/rtg"
+ sed -i "s#\$THIS_DIR/rtg.cfg#${pkgdir}/etc/rtg.cfg#g" "${pkgdir}/usr/bin/rtg"
+
+ # Install demo script, data, and bash completions scrips
+ cp -r scripts "${pkgdir}/usr/share/${pkgname}"
+
+ # Install completion hook in profile.d to be sourced with each shell
+ install -Dm755 "scripts/rtg-bash-completion" "${pkgdir}/etc/profile.d/rtg-bash-completer.sh"
+
+ # Licenses and documentation
+ install -Dm655 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
+ install -Dm655 README.txt "${pkgdir}/usr/share/doc/${pkgname}/README.txt"
+ install -Dm655 ReleaseNotes.txt "${pkgdir}/usr/share/doc/${pkgname}/ReleaseNotes.txt"
+ install -Dm655 RTGOperationsManual.pdf "${pkgdir}/usr/share/doc/${pkgname}/RTGOperationsManual.pdf"
+ cp -r RTGOperationsManual "${pkgdir}/usr/share/doc/${pkgname}/RTGOperationsManual"
+}