summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ad0fc7510b762b7c53a8747e141cd01edc5e729c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Maintainer: Jonas Witschel <diabonas@archlinux.org>
# Contributor: Alad Wenter <alad@mailbox.org>
# Contributor: Uffe Jakobsen <uffe@uffe.org>

pkgname=hashdeep
pkgver=4.4
pkgrel=7
pkgdesc="cross-platform tools to message digests for any number of files"
arch=('x86_64')
url="https://github.com/jessek/hashdeep"
license=('GPL' 'custom')
depends=('gcc-libs')
source=("$pkgname-$pkgver.tar.gz::https://github.com/jessek/hashdeep/archive/refs/tags/v$pkgver.tar.gz"
        "hashdeep-4.4-fix-errors-found-by-clang.patch::https://github.com/jessek/hashdeep/commit/6ef69a26126ee4e69a25392fd456b8a66c51dffd.patch")
sha256sums=('ad78d42142f9a74fe8ec0c61bc78d6588a528cbb9aede9440f50b6ff477f3a7f'
            'e690df50252700517bf3f62f8f83930469108dd2869808bcbc8f7bac1b47ffc7')

prepare() {
    cd "$pkgname-$pkgver"

    # Fix compilation with GCC 11
    patch --forward --strip=1 --input="$srcdir/hashdeep-4.4-fix-errors-found-by-clang.patch"

    ./bootstrap.sh
}

build() {
    cd "$pkgname-$pkgver"
    ./configure --prefix=/usr
    make
}

package() {
    cd "$pkgname-$pkgver"
    make DESTDIR="$pkgdir/" install

    mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
    install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}