amrfinderplus: cleanup PKGBUILD

This commit is contained in:
bipin kumar 2023-09-24 19:45:43 +05:30
parent 8e860edb24
commit fcd45c0cff
No known key found for this signature in database
GPG key ID: C67233497C15E476
2 changed files with 13 additions and 17 deletions

View file

@ -1,4 +1,4 @@
# Maintianer: Bipin Kumar <bipin@ccmb.res.in>
# Maintianer: Bipin Kumar <kbipinkumar@pm.me>
pkgname=amrfinderplus
pkgver=3.11.20
@ -17,7 +17,7 @@ depends=(
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/ncbi/amr/archive/refs/tags/amrfinder_v${pkgver}.tar.gz"
"destdir.patch")
sha256sums=('698462c4fa688a91130b72e44756d21faf406e186a02da914982044332419ef6'
'1364d6dedb96c9a5aa2353e9abe7f766d721f55cb0811dd0aece43639f0f2152')
'2adee0fa212d4b45054fdd9be5c31298bef7caa079c46d7c26340cb64375c1e4')
prepare() {
cp *.patch amr-amrfinder_v${pkgver}
@ -28,12 +28,14 @@ prepare() {
build() {
cd amr-amrfinder_v${pkgver}
make PREFIX=/usr DEFAULT_DB_DIR=/usr/share/amrfinderplus/data
export LDFLAGS="-Wl,-O2,--sort-common,--as-needed,-z,relro,-z,now"
export PREFIX="/usr"
export DEFAULT_DB_DIR="/usr/share/amrfinderplus/data"
make
}
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
@ -44,4 +46,4 @@ package() {
-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
}
}

View file

@ -1,14 +1,5 @@
--- 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
+++ amr-amrfinder_v3.11.20.new/Makefile 2023-09-24 11:02:41.286592064 +0530
@@ -73,12 +73,12 @@
CPPFLAGS = -std=gnu++17 -pthread --signed-char -falign-jumps -fno-math-errno -O3
else
@ -84,9 +75,12 @@
@@ -154,9 +154,9 @@
@@ -152,11 +152,11 @@
rm -f $(BINARIES)
install:
@if [ ! -e $(bindir) ]; \
- @if [ ! -e $(bindir) ]; \
+ @if [ ! -e $(DESTDIR)$(bindir) ]; \
then \
- mkdir -p $(bindir); \
+ mkdir -p $(DESTDIR)$(bindir); \