facetimehd-calibration-files/PKGBUILD

41 lines
1.6 KiB
Text
Raw Permalink Normal View History

2021-07-26 14:43:40 +02:00
# Maintainer: Your Name <youremail@domain.com>
pkgname=facetimehd-calibration-files
pkgver=5.1.5769
pkgrel=1
pkgdesc="Sensor calibration files for facetimehd webcam"
arch=('x86_64')
url="https://github.com/patjak/bcwc_pcie/wiki/Extracting-the-sensor-calibration-files"
license=('unknown')
depends=()
makedepends=("unzip" "unrar")
options=(!strip)
source=("https://download.info.apple.com/Mac_OS_X/031-30890-20150812-ea191174-4130-11e5-a125-930911ba098f/bootcamp$pkgver.zip"
"sha512sums")
noextract=("bootcamp$pkgver.zip")
sha512sums=('96ecc8e55a74de85fbb3026a05eb49ad4dbc8a48f0aafebd3b27a6a47ce53df1179b8442ce77320f643df7e67075d8430e197dc43258b0a6ba47f58cfa947132'
'ecece7869de1e28f7b7abe9f4bd1aeb376c00a40b9676a7942845778e9d250510b68bfe209901e405f5bbc573c32b5e115c646b133f339fcbbb60bc2ec950886')
prepare() {
unzip -o -q -j "bootcamp$pkgver.zip" BootCamp/Drivers/Apple/AppleCamera64.exe
unrar -o+ -idq x AppleCamera64.exe AppleCamera.sys
}
build() {
dd bs=1 skip=1663920 count=33060 if=AppleCamera.sys of=9112_01XX.dat
dd bs=1 skip=1644880 count=19040 if=AppleCamera.sys of=1771_01XX.dat
dd bs=1 skip=1606800 count=19040 if=AppleCamera.sys of=1871_01XX.dat
dd bs=1 skip=1625840 count=19040 if=AppleCamera.sys of=1874_01XX.dat
}
check() {
sha512sum -c sha512sums
}
package() {
mkdir -p "$pkgdir/usr/lib/firmware/facetimehd"
install -m 644 9112_01XX.dat "$pkgdir/usr/lib/firmware/facetimehd"
install -m 644 1771_01XX.dat "$pkgdir/usr/lib/firmware/facetimehd"
install -m 644 1871_01XX.dat "$pkgdir/usr/lib/firmware/facetimehd"
install -m 644 1874_01XX.dat "$pkgdir/usr/lib/firmware/facetimehd"
}