diff options
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | Makefile.patch | 58 | ||||
-rw-r--r-- | PKGBUILD | 47 | ||||
-rw-r--r-- | euk.patch | 11 | ||||
-rw-r--r-- | tRNAscan-SE.conf.src.patch | 11 | ||||
-rw-r--r-- | tRNAscan-SE.src.patch | 20 |
6 files changed, 171 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..36612e5944f3 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = trnascan-se + pkgdesc = Program for improved detection of transfer RNA (tRNA) genes in genomic sequence. + pkgver = 2.0.12 + pkgrel = 2 + url = http://lowelab.ucsc.edu/tRNAscan-SE/ + arch = i686 + arch = x86_64 + license = GPL3 + depends = infernal + depends = perl + depends = glibc + backup = etc/tRNAscan-SE.conf + source = https://github.com/UCSC-LoweLab/tRNAscan-SE/archive/refs/tags/v2.0.12.tar.gz + source = euk.patch + source = Makefile.patch + source = tRNAscan-SE.conf.src.patch + source = tRNAscan-SE.src.patch + sha512sums = 808ba99c5d492b77a32f64c16c3400c2094cfb882fee03bbbd77d3cccb26f2184ff7e1872edccee854918019571a88c9b9e0b95f9738294ba18979d49ecef4d1 + sha512sums = db98b453090d3870e5f20941bad3f4462d31a77c293df959f4da242356b7a87684f1941e534a807e9ac5c1df28d493ae565d507bc21c0dd0bbfda42d7ef407e8 + sha512sums = a938790ec87967b3fd4688d19d9be08a55ac0f485ca5b8d2c2b641e745a85b0917ad70d9d2d6c301b0426ecf621c2e655b8c38b51fe6c603af79ebc4e978ca0c + sha512sums = d8f956c4c8796c069e17b6fc3087ab6b6bf4a1b9ed381032e580e0296679aeb7947151ce08f97d3e92771e36521dbfb716b575fc60ca02f21dcae76435f2bc63 + sha512sums = 3aa37cf95d18d9ac5d9a641abeb18283e82f3c9f64b1734c8bf6f3cc8ac6e9e1e7545c417292ad459c9b385e7d5e03236198e328f6191113d43b3eda2a58f9b6 + +pkgname = trnascan-se diff --git a/Makefile.patch b/Makefile.patch new file mode 100644 index 000000000000..2cd1092ff8d0 --- /dev/null +++ b/Makefile.patch @@ -0,0 +1,58 @@ +--- a/Makefile.am 2023-04-21 19:13:21.119884090 +0530 ++++ b/Makefile.am 2023-04-21 19:10:37.533407100 +0530 +@@ -23,16 +23,17 @@ + bin_PROGRAMS = bin/eufindtRNA bin/trnascan-1.4 bin/covels-SE bin/coves-SE + bin_eufindtRNA_SOURCES = $(SQUIDHDRS) $(SQUIDSRC) $(EUFIND) + bin_trnascan_1_4_SOURCES = src/trnascan.c +-bin_trnascan_1_4_CFLAGS = -DTSCANDIR=\"$(libdir)\/tRNAscan-SE\/models\" $(AM_CFLAGS) ++bin_trnascan_1_4_CFLAGS = -DTSCANDIR=\"$(pkgdatadir)\/models\" $(AM_CFLAGS) + bin_covels_SE_SOURCES = $(COVESRC) src/scan_main.c + bin_coves_SE_SOURCES = $(COVESRC) src/score_main.c + + # process scripts +-# treat tRNAscan-SE.conf as a script since it's just easier +-dist_bin_SCRIPTS = bin/sstofa bin/fasta2gsi bin/EukHighConfidenceFilter bin/MitoHighConfidenceFilter tRNAscan-SE tRNAscan-SE.conf ++dist_bin_SCRIPTS = bin/sstofa bin/fasta2gsi bin/EukHighConfidenceFilter bin/MitoHighConfidenceFilter tRNAscan-SE ++# config file ++dist_sysconf_DATA = tRNAscan-SE.conf + # for a few files, need to substitute perl path, bin directory, and lib directory + # first, define a function for it +-do_subst = sed -e 's,\@bindir\@,$(bindir),g' -e 's,\@libdir\@,$(libdir),g' -e 's,[@]PERL[@],$(PERL),g' -e 's,\@INFERNAL\@,$(INFERNAL),g' ++do_subst = sed -e 's,\@bindir\@,$(bindir),g' -e 's,\@pkgdatadir\@,$(pkgdatadir),g' -e 's,[@]PERL[@],$(PERL),g' -e 's,\@INFERNAL\@,$(INFERNAL),g' -e 's,\@sysconfdir\@,$(sysconfdir),g' + + # extra steps for cleaning/distribution + CLEANFILES = $(dist_bin_SCRIPTS) $(srcdir)/lib/* +@@ -51,15 +52,15 @@ + + bin/sstofa: src/sstofa.in Makefile + $(do_subst) < $(srcdir)/src/sstofa.in > bin/sstofa +- chmod +x bin/sstofa ++ if [ -x bin/sstofa ] ; then chmod +x bin/sstofa ; fi + + bin/fasta2gsi: src/fasta2gsi.in Makefile + $(do_subst) < $(srcdir)/src/fasta2gsi.in > bin/fasta2gsi +- chmod +x bin/fasta2gsi ++ if [ -x bin/fasta2gsi ] ; then chmod +x bin/fasta2gsi ; fi + + bin/EukHighConfidenceFilter: EukHighConfidenceFilter.in Makefile + $(do_subst) < $(srcdir)/EukHighConfidenceFilter.in > bin/EukHighConfidenceFilter +- chmod +x bin/EukHighConfidenceFilter ++ if [ -x bin/EukHighConfidenceFilter ] ; then chmod +x bin/EukHighConfidenceFilter ; fi + + bin/MitoHighConfidenceFilter: MitoHighConfidenceFilter.in Makefile + $(do_subst) < $(srcdir)/MitoHighConfidenceFilter.in > bin/MitoHighConfidenceFilter +@@ -67,11 +68,9 @@ + + # copy libraries. We don't have "libraries" in the libgmp.so.4 kind, but we do have data libraries, so we don't have to deal with lib_LTLIBRARIES. + install-data-hook: +- chmod u+w $(exec_prefix) +- test -d $(libdir) || mkdir $(libdir) +- chmod u+w $(libdir) +- test -d $(libdir)/tRNAscan-SE || mkdir $(libdir)/tRNAscan-SE +- cp -rf $(srcdir)/lib/* $(libdir)/tRNAscan-SE ++ test -d $(DESTDIR)/$(pkgdatadir) || mkdir -p $(DESTDIR)/$(pkgdatadir) ++ chmod u+w $(DESTDIR)/$(pkgdatadir) ++ cp -rf $(srcdir)/lib/* $(DESTDIR)/$(pkgdatadir) + + # remove lib/ files during uninstallation. A bit of a hack, since lib files are write-protected by default. Files + uninstall-hook: diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..3b550b68254f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: bipin kumar <kbipinkumar@pm.me> +# Contributor: Fabio Heday <fheday@gmail.com> + +pkgname=trnascan-se +pkgver=2.0.12 +pkgrel=2 +pkgdesc="Program for improved detection of transfer RNA (tRNA) genes in genomic sequence." +arch=('i686' 'x86_64') +url="http://lowelab.ucsc.edu/tRNAscan-SE/" +license=(GPL3) +depends=('infernal' 'perl' 'glibc') +backup=('etc/tRNAscan-SE.conf') +source=("https://github.com/UCSC-LoweLab/tRNAscan-SE/archive/refs/tags/v${pkgver}.tar.gz" + 'euk.patch' + 'Makefile.patch' + 'tRNAscan-SE.conf.src.patch' + 'tRNAscan-SE.src.patch') + +sha512sums=('808ba99c5d492b77a32f64c16c3400c2094cfb882fee03bbbd77d3cccb26f2184ff7e1872edccee854918019571a88c9b9e0b95f9738294ba18979d49ecef4d1' + 'db98b453090d3870e5f20941bad3f4462d31a77c293df959f4da242356b7a87684f1941e534a807e9ac5c1df28d493ae565d507bc21c0dd0bbfda42d7ef407e8' + 'a938790ec87967b3fd4688d19d9be08a55ac0f485ca5b8d2c2b641e745a85b0917ad70d9d2d6c301b0426ecf621c2e655b8c38b51fe6c603af79ebc4e978ca0c' + 'd8f956c4c8796c069e17b6fc3087ab6b6bf4a1b9ed381032e580e0296679aeb7947151ce08f97d3e92771e36521dbfb716b575fc60ca02f21dcae76435f2bc63' + '3aa37cf95d18d9ac5d9a641abeb18283e82f3c9f64b1734c8bf6f3cc8ac6e9e1e7545c417292ad459c9b385e7d5e03236198e328f6191113d43b3eda2a58f9b6') + +prepare() { + chmod -R o+xr tRNAscan-SE-${pkgver}/lib/tRNAscanSE/ + cp -r *.patch tRNAscan-SE-${pkgver}/ + cd tRNAscan-SE-${pkgver}/ + # Patches for using Directory structure as recommended in Archwiki + patch -p1 < Makefile.patch + patch -p1 < tRNAscan-SE.conf.src.patch + patch -p1 < tRNAscan-SE.src.patch + patch -p1 < euk.patch + autoreconf -i + automake +} + +build() { + cd tRNAscan-SE-${pkgver}/ + ./configure --prefix=/usr --sysconfdir=/etc --datadir=/usr/share/ --includedir=/usr/include/${pkgname} + make +} + +package() { + cd tRNAscan-SE-${pkgver} + make DESTDIR=${pkgdir}/ install +} diff --git a/euk.patch b/euk.patch new file mode 100644 index 000000000000..96c25410ed22 --- /dev/null +++ b/euk.patch @@ -0,0 +1,11 @@ +--- a/EukHighConfidenceFilter.in 2023-04-21 10:24:56.668769519 +0530 ++++ b/EukHighConfidenceFilter.in 2023-04-21 10:51:58.870350139 +0530 +@@ -13,7 +13,7 @@ + # -------------------------------------------------------------------- + + use strict; +-use lib "@libdir@/tRNAscan-SE"; ++use lib "@pkgdatadir@"; + use Getopt::Long; + + use tRNAscanSE::tRNA; diff --git a/tRNAscan-SE.conf.src.patch b/tRNAscan-SE.conf.src.patch new file mode 100644 index 000000000000..f66d2bf6d8a8 --- /dev/null +++ b/tRNAscan-SE.conf.src.patch @@ -0,0 +1,11 @@ +--- a/tRNAscan-SE.conf.src 2023-04-21 10:25:27.827758950 +0530 ++++ b/tRNAscan-SE.conf.src 2023-04-21 10:52:42.085467328 +0530 +@@ -3,7 +3,7 @@ + + # default paths + bin_dir: @bindir@ +-lib_dir: @libdir@/tRNAscan-SE ++lib_dir: @pkgdatadir@ + infernal_dir: {bin_dir} + + # temporary files diff --git a/tRNAscan-SE.src.patch b/tRNAscan-SE.src.patch new file mode 100644 index 000000000000..84d9036033d4 --- /dev/null +++ b/tRNAscan-SE.src.patch @@ -0,0 +1,20 @@ +--- a/tRNAscan-SE.src 2023-04-21 10:25:14.931510647 +0530 ++++ b/tRNAscan-SE.src 2023-04-21 10:51:14.938595131 +0530 +@@ -18,7 +18,7 @@ + # + + use strict; +-use lib "@libdir@/tRNAscan-SE"; ++use lib "@pkgdatadir@"; + use Getopt::Long; + use tRNAscanSE::Configuration; + use tRNAscanSE::tRNA; +@@ -44,7 +44,7 @@ + our $program_id = "tRNAscan-SE-".$version; + + # modified by 'make' +-our $default_conf = "@bindir@/tRNAscan-SE.conf"; ++our $default_conf = "@sysconfdir@/tRNAscan-SE.conf"; + + # Signal handling + $SIG{'TERM'} = 'error_handler'; |