summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b91249874f3732ec42d3662ed494c8e7618f8ceb (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
# Maintainer: Julian <juliannfairfax@protonmail.com>

pkgname=isight-firmware-tools
pkgver=1.6
pkgrel=1
pkgdesc="Tools to manipulate firmware for Built-in iSight found on Apple machines"
arch=("x86_64")
url="https://gitlab.com/bersace/isight-firmware-tools"
license=("GPL2")
source=("git+https://gitlab.com/bersace/isight-firmware-tools")
sha256sums=("SKIP")
depends=("libusb-compat")
makedepends=("intltool" "gcc" "git")

build() {
	cd "${srcdir}"/"$pkgname"

	sed -i 's/ doc//' Makefile.am

	sed -i 's/fprintf(stderr, g_option_context_get_help(context,/fprintf(stderr, "%s", g_option_context_get_help(context,/' src/export.c

	sed -i 's/fprintf(stderr, g_option_context_get_help(context,/fprintf(stderr, "%s", g_option_context_get_help(context,/' src/extract.c

	sed -i 's/fprintf(stderr, g_option_context_get_help(context,/fprintf(stderr, "%s", g_option_context_get_help(context,/' src/udev.c

	autoreconf --install

	./configure --prefix=/usr --sysconfdir=/etc

	make
}

package() {
	cd "${srcdir}"/"$pkgname"

	make DESTDIR="${pkgdir}" install

	sed -i 's|/lib/firmware/isight.fw|/usr/lib/firmware/isight.fw|' "${pkgdir}"/etc/udev/rules.d/isight.rules
}