summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSparticuz2022-08-11 15:59:05 -0400
committerSparticuz2022-08-11 15:59:05 -0400
commit9207e74132734875ae6be93709e93035f191fb72 (patch)
tree553e4f57fff29f23726d4ef3ba9f7e6e6a07a384
parent77f59aa9cbd915ae25b4a656c5cc3e90912bdd03 (diff)
downloadaur-9207e74132734875ae6be93709e93035f191fb72.tar.gz
Add patch to fix build error
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD12
-rw-r--r--remove_sys_mount_h.patch14
3 files changed, 26 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d65d7e86cdda..eadf7672daae 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = snapraid
pkgdesc = tool for Snapshot RAID: generate parity files, maintain checksums on data, restore lost data
pkgver = 12.1
- pkgrel = 3
+ pkgrel = 4
url = http://www.snapraid.it/
arch = x86_64
arch = i686
@@ -9,6 +9,8 @@ pkgbase = snapraid
depends = libutil-linux
depends = glibc
source = https://github.com/amadvance/snapraid/releases/download/v12.1/snapraid-12.1.tar.gz
+ source = remove_sys_mount_h.patch
sha256sums = 49337d9bafa96c2beac0125463bd22622be2fc00f3b4dee7e4b0e864d2a49661
+ sha256sums = 34c87c06ff9ce72638e19ec8e78841a1c2c06040b23107dc8df347dcc256d4b1
pkgname = snapraid
diff --git a/PKGBUILD b/PKGBUILD
index 908db53d96c0..8c36ed013730 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,15 @@
# Contributor: John Williams <jwilliams4200 liamg reverse&remove moc>
pkgname=snapraid
pkgver=12.1
-pkgrel=3
+pkgrel=4
pkgdesc="tool for Snapshot RAID: generate parity files, maintain checksums on data, restore lost data"
arch=('x86_64' 'i686')
url="http://www.snapraid.it/"
license=('GPL3')
depends=('libutil-linux' 'glibc')
-source=("https://github.com/amadvance/snapraid/releases/download/v${pkgver}/snapraid-${pkgver}.tar.gz")
-sha256sums=('49337d9bafa96c2beac0125463bd22622be2fc00f3b4dee7e4b0e864d2a49661')
+source=("https://github.com/amadvance/snapraid/releases/download/v${pkgver}/snapraid-${pkgver}.tar.gz" remove_sys_mount_h.patch)
+sha256sums=('49337d9bafa96c2beac0125463bd22622be2fc00f3b4dee7e4b0e864d2a49661'
+ '34c87c06ff9ce72638e19ec8e78841a1c2c06040b23107dc8df347dcc256d4b1')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -23,6 +24,11 @@ check() {
make check
}
+prepare() {
+ # Patch for 12.1
+ patch --directory="$pkgname-$pkgver" --forward --strip=2 --input="${srcdir}/remove_sys_mount_h.patch"
+}
+
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}/" prefix="/usr" mandir="/usr/share/man" install
diff --git a/remove_sys_mount_h.patch b/remove_sys_mount_h.patch
new file mode 100644
index 000000000000..698ae78143cc
--- /dev/null
+++ b/remove_sys_mount_h.patch
@@ -0,0 +1,14 @@
+diff --unified --recursive --text src/snapraid-12.1/cmdline/portable.h new/snapraid-12.1/cmdline/portable.h
+--- src/snapraid-12.1/cmdline/portable.h 2022-01-09 02:46:57.000000000 -0500
++++ new/snapraid-12.1/cmdline/portable.h 2022-08-11 15:47:27.064154515 -0400
+@@ -101,10 +101,6 @@
+ #include <sys/param.h>
+ #endif
+
+-#if HAVE_SYS_MOUNT_H
+-#include <sys/mount.h>
+-#endif
+-
+ #if HAVE_SYS_VFS_H
+ #include <sys/vfs.h>
+ #endif