summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbipin kumar2023-09-21 09:12:20 +0530
committerbipin kumar2023-09-21 09:12:20 +0530
commit16097ba1b7a182588063f8c9c9f82ef584d7aaa4 (patch)
tree028f9817a4b0c33294e2efaf5501ea5aa48e2c74
downloadaur-16097ba1b7a182588063f8c9c9f82ef584d7aaa4.tar.gz
amrfinderplus: updated to 3.11.20
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD47
-rw-r--r--destdir.patch98
3 files changed, 164 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ddf9ebf3f8b2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = amrfinderplus
+ pkgdesc = Identify Antimicrobial resistance genes in assembled bacterial nucleotide and protein sequence. https://doi.org/10.1038/s41598-021-91456-0
+ pkgver = 3.11.20
+ pkgrel = 1
+ url = https://www.ncbi.nlm.nih.gov/pathogens/antimicrobial-resistance/AMRFinder/
+ arch = x86_64
+ arch = i686
+ license = custom: Public Domain
+ depends = glibc
+ depends = gcc-libs
+ depends = curl
+ depends = blast+
+ depends = hmmer
+ source = amrfinderplus-3.11.20.tar.gz::https://github.com/ncbi/amr/archive/refs/tags/amrfinder_v3.11.20.tar.gz
+ source = destdir.patch
+ sha256sums = 698462c4fa688a91130b72e44756d21faf406e186a02da914982044332419ef6
+ sha256sums = 1364d6dedb96c9a5aa2353e9abe7f766d721f55cb0811dd0aece43639f0f2152
+
+pkgname = amrfinderplus
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1050f28a1bcf
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintianer: Bipin Kumar <bipin@ccmb.res.in>
+
+pkgname=amrfinderplus
+pkgver=3.11.20
+pkgrel=1
+pkgdesc="Identify Antimicrobial resistance genes in assembled bacterial nucleotide and protein sequence. https://doi.org/10.1038/s41598-021-91456-0"
+arch=('x86_64' 'i686')
+url="https://www.ncbi.nlm.nih.gov/pathogens/antimicrobial-resistance/AMRFinder/"
+license=('custom: Public Domain')
+depends=(
+ 'glibc'
+ 'gcc-libs'
+ 'curl'
+ 'blast+'
+ 'hmmer'
+ )
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ncbi/amr/archive/refs/tags/amrfinder_v${pkgver}.tar.gz"
+ "destdir.patch")
+sha256sums=('698462c4fa688a91130b72e44756d21faf406e186a02da914982044332419ef6'
+ '1364d6dedb96c9a5aa2353e9abe7f766d721f55cb0811dd0aece43639f0f2152')
+
+prepare() {
+ cp *.patch amr-amrfinder_v${pkgver}
+ cd amr-amrfinder_v${pkgver}
+ # patch Makefile to use gnu make's destdir variable
+ patch -p1 < destdir.patch
+}
+
+build() {
+ cd amr-amrfinder_v${pkgver}
+ make PREFIX=/usr DEFAULT_DB_DIR=/usr/share/amrfinderplus/data
+}
+
+package() {
+ cd amr-amrfinder_v${pkgver}
+ install -d ${pkgdir}/usr/bin
+ make DESTDIR=${pkgdir} install
+ install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/"${pkgname}"
+ install -d ${pkgdir}/usr/share/amrfinderplus/data
+ cd ${pkgdir}/usr/share/amrfinderplus/data
+ curl -O https://raw.githubusercontent.com/ncbi/amr/master/test_dna.fa \
+ -O https://raw.githubusercontent.com/ncbi/amr/master/test_prot.fa \
+ -O https://raw.githubusercontent.com/ncbi/amr/master/test_prot.gff \
+ -O https://raw.githubusercontent.com/ncbi/amr/master/test_both.expected \
+ -O https://raw.githubusercontent.com/ncbi/amr/master/test_dna.expected \
+ -O https://raw.githubusercontent.com/ncbi/amr/master/test_prot.expected
+}
diff --git a/destdir.patch b/destdir.patch
new file mode 100644
index 000000000000..bc77265c215b
--- /dev/null
+++ b/destdir.patch
@@ -0,0 +1,98 @@
+--- amr-amrfinder_v3.11.20.orig/Makefile 2023-09-06 22:49:21.000000000 +0530
++++ amr-amrfinder_v3.11.20.new/Makefile 2023-09-21 00:23:04.406125302 +0530
+@@ -37,7 +37,7 @@
+ # This is a little convoluted because I broke things and don't want
+ # to change two different ways of defining the paths. This could
+ # be simplified in a later release
+-PREFIX ?= /usr/local
++PREFIX ?= /usr
+ ifneq '$(INSTALL_DIR)' ''
+ bindir=$(INSTALL_DIR)
+ endif
+@@ -73,12 +73,12 @@
+ CPPFLAGS = -std=gnu++17 -pthread --signed-char -falign-jumps -fno-math-errno -O3
+ else
+ # set x86_x64 CFLAGS
+- CPPFLAGS = -std=gnu++17 -pthread -malign-double -fno-math-errno -O3
++ CPPFLAGS = -std=gnu++17 -pthread -malign-double -fno-math-errno -O2
+ endif
+ # was: -std=gnu++14
+
+ CXX=g++
+-COMPILE.cpp= $(CXX) $(CPPFLAGS) $(SVNREV) $(DBDIR) $(TEST_UPDATE_DB) -c
++COMPILE.cpp= $(CXX) $(CPPFLAGS) $(LDFLAGS) $(SVNREV) $(DBDIR) $(TEST_UPDATE_DB) -c
+
+
+ .PHONY: all clean install release
+@@ -99,12 +99,12 @@
+ amr_report.o: common.hpp common.inc gff.hpp alignment.hpp
+ amr_reportOBJS=amr_report.o common.o gff.o alignment.o
+ amr_report: $(amr_reportOBJS)
+- $(CXX) -o $@ $(amr_reportOBJS)
++ $(CXX) $(LDFLAGS) -o $@ $(amr_reportOBJS)
+
+ amrfinder.o: common.hpp common.inc gff.hpp
+ amrfinderOBJS=amrfinder.o common.o gff.o tsv.o
+ amrfinder: $(amrfinderOBJS)
+- $(CXX) -o $@ $(amrfinderOBJS) -pthread $(DBDIR)
++ $(CXX) $(LDFLAGS) -o $@ $(amrfinderOBJS) -pthread $(DBDIR)
+
+ amrfinder_update.o: common.hpp common.inc
+ amrfinder_updateOBJS=amrfinder_update.o common.o curl_easy.o
+@@ -113,37 +113,37 @@
+ then \
+ touch amrfinder_update.cpp ;\
+ fi # make sure the next make command rebuilds amrfinder_update
+- $(CXX) -o $@ $(amrfinder_updateOBJS) -lcurl
++ $(CXX) $(LDFLAGS) -o $@ $(amrfinder_updateOBJS) -lcurl
+
+ amrfinder_index.o: common.hpp common.inc
+ amrfinder_indexOBJS=amrfinder_index.o common.o
+ amrfinder_index: $(amrfinder_indexOBJS)
+- $(CXX) -o $@ $(amrfinder_indexOBJS)
++ $(CXX) $(LDFLAGS) -o $@ $(amrfinder_indexOBJS)
+
+ fasta_check.o: common.hpp common.inc
+ fasta_checkOBJS=fasta_check.o common.o
+ fasta_check: $(fasta_checkOBJS)
+- $(CXX) -o $@ $(fasta_checkOBJS)
++ $(CXX) $(LDFLAGS) -o $@ $(fasta_checkOBJS)
+
+ fasta_extract.o: common.hpp common.inc
+ fasta_extractOBJS=fasta_extract.o common.o
+ fasta_extract: $(fasta_extractOBJS)
+- $(CXX) -o $@ $(fasta_extractOBJS)
++ $(CXX) $(LDFLAGS) -o $@ $(fasta_extractOBJS)
+
+ fasta2parts.o: common.hpp common.inc
+ fasta2partsOBJS=fasta2parts.o common.o
+ fasta2parts: $(fasta2partsOBJS)
+- $(CXX) -o $@ $(fasta2partsOBJS)
++ $(CXX) $(LDFLAGS) -o $@ $(fasta2partsOBJS)
+
+ gff_check.o: common.hpp common.inc gff.hpp
+ gff_checkOBJS=gff_check.o common.o gff.o
+ gff_check: $(gff_checkOBJS)
+- $(CXX) -o $@ $(gff_checkOBJS)
++ $(CXX) $(LDFLAGS) -o $@ $(gff_checkOBJS)
+
+ dna_mutation.o: common.hpp common.inc alignment.hpp
+ dna_mutationOBJS=dna_mutation.o common.o alignment.o
+ dna_mutation: $(dna_mutationOBJS)
+- $(CXX) -o $@ $(dna_mutationOBJS)
++ $(CXX) $(LDFLAGS) -o $@ $(dna_mutationOBJS)
+
+
+
+@@ -154,9 +154,9 @@
+ install:
+ @if [ ! -e $(bindir) ]; \
+ then \
+- mkdir -p $(bindir); \
++ mkdir -p $(DESTDIR)$(bindir); \
+ fi
+- $(INSTALL) $(BINARIES) $(bindir)
++ $(INSTALL) $(BINARIES) $(DESTDIR)$(bindir)
+
+ # amrfinder binaries for github binary release
+ GITHUB_FILE=amrfinder_binaries_v$(VERSION_STRING)