summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a43eb5374d4b2ebe6efe16377db2ec49fdea9e2d (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
41
42
# Maintainer: Cody P Schafer <dev@codyps.com>
# Maintainer: Michał Wojdyła <micwoj9292@gmail.com>
# Maintainer: Alexander Jacocks <alexander@redhat.com>
# Contributor: Pablo Lezaeta <prflr88@gmail.com>
pkgname=hfsutils
pkgver=3.2.6_p16
pkgrel=4
pkgdesc="Tools for reading and writing Macintosh volumes"
arch=('x86_64')
license=('GPL-2.0-or-later')
url="https://www.mars.org/home/rob/proj/hfs/"
depends=(glibc sh tcl tk)
source=(
	"https://deb.debian.org/debian/pool/main/${pkgname:0:1}/${pkgname}/${pkgname}_${pkgver/_p*}.orig.tar.gz"
	"https://deb.debian.org/debian/pool/main/${pkgname:0:1}/${pkgname}/${pkgname}_${pkgver/_p/-}.debian.tar.xz"
	)
sha256sums=('bc9d22d6d252b920ec9cdf18e00b7655a6189b3f34f42e58d5bb152957289840'
            'fa128b4701b02d5698fc4bbb393ad1a8a54fdd9a33ffad3fdc1f10fd0ad11a89')

prepare() {
	for file in $(cat ./debian/patches/series); do
		patch -Np1 -d ${pkgname}-${pkgver%_p*} <"debian/patches/$file"
	done

	cd "${pkgname}-${pkgver%_p*}"
	autoreconf -fi
}

build() {
	cd "${pkgname}-${pkgver%_p*}"
	CFLAGS="$CFLAGS -Wno-error=incompatible-pointer-types"
	./configure --with-tcl --with-tk
	make prefix=/usr
	make -C hfsck prefix=/usr
}

package() {
	cd "${pkgname}-${pkgver%_p*}"
	install -d -m755 "${pkgdir}/usr/bin"
	install -d -m755 "${pkgdir}/usr/share/man/man1"
	DESTDIR="${pkgdir}" make install prefix="${pkgdir}/usr" MANDEST="${pkgdir}/usr/share/man"
}