pmaports/main/devicepkg-dev/APKBUILD
Luca Weiss 3fe7e1601c
main/devicepkg-dev: remove Image.gz from list of kernels to consider (!1014)
This breaks booting on Librem 5 and is not needed on any device
currently using downstreamkernel_package, so remove it.
2020-03-01 10:35:04 +01:00

71 lines
3.2 KiB
Text

pkgname="devicepkg-dev"
pkgver=0.11.2
pkgrel=0
pkgdesc="Provides default device package functions"
url="https://postmarketos.org"
arch="all"
license="MIT"
depends="postmarketos-splash"
source="
compiler-gcc.h
devicepkg_build.sh
devicepkg_package.sh
downstreamkernel_prepare.sh
downstreamkernel_package.sh
devicepkg_subpackage_kernel.sh
testdata/deviceinfo
testdata/expected-deviceinfo-downstream
testdata/expected-deviceinfo-mainline
"
check() {
# Prepare a temporary dir to run the tests
testdir=$(mktemp -d)
install -Dm644 "$srcdir/deviceinfo" \
"$testdir/src/deviceinfo"
# Execute the script to create the subpackage deviceinfo
sh devicepkg_subpackage_kernel.sh \
$testdir linux-test linux-test-kernel-downstream
sh devicepkg_subpackage_kernel.sh \
$testdir linux-test linux-test-kernel-mainline
# Compare the result with the expected files
if ! cmp -s "$srcdir/expected-deviceinfo-downstream" \
"$testdir/pkg/linux-test-kernel-downstream/etc/deviceinfo"; then
echo "ERROR: unexpected result with downstream deviceinfo"
exit 1
fi
if ! cmp -s "$srcdir/expected-deviceinfo-mainline" \
"$testdir/pkg/linux-test-kernel-mainline/etc/deviceinfo"; then
echo "ERROR: unexpected result with mainline deviceinfo"
exit 1
fi
# Cleanup
rm -r "$testdir"
}
package() {
install -Dm755 "$srcdir/devicepkg_build.sh" \
"$pkgdir/usr/bin/devicepkg_build"
install -Dm755 "$srcdir/devicepkg_package.sh" \
"$pkgdir/usr/bin/devicepkg_package"
install -Dm755 "$srcdir/downstreamkernel_prepare.sh" \
"$pkgdir/usr/bin/downstreamkernel_prepare"
install -Dm755 "$srcdir/downstreamkernel_package.sh" \
"$pkgdir/usr/bin/downstreamkernel_package"
install -Dm755 "$srcdir/devicepkg_subpackage_kernel.sh" \
"$pkgdir/usr/bin/devicepkg_subpackage_kernel"
install -Dm644 "$srcdir/compiler-gcc.h" \
"$pkgdir/usr/share/devicepkg-dev/compiler-gcc.h"
}
sha512sums="d69930dd790b00fb39760a37d95a10899f0d167e10e2804feb05d9ce04f94185dc32d36edc90214aba2ea2aa09bf18f7dab93f1d2eff23f67beb2cc83be30e7c compiler-gcc.h
332f693abfb3260ad6c1ef5d245062af8cc8eedba7db360d54db5a7fcf7b301a37a299a0004e9ff4de80b5dfcd260d0cd0f99f96ed6d56080bb4dea81116cc82 devicepkg_build.sh
5ac4a5087c598582cb12278a4ce0c2dccfe7f91c1620d3328d1d0944c89eff81f8afcc681506d73a80d69615401f96a99fb1fdaa755fea101e0d36ec6ef2d5d0 devicepkg_package.sh
69dad4bde05377ec235d72789c80cdfbdaa5a19b97defe9d4c19e0e12aa2c081d6dcf19fb80ebe33c2d6539ce8a39d36d98413404852d6bb2d56cc75d2f1ee95 downstreamkernel_prepare.sh
40ba3cf21ace39e8171030fb2bf23c879a4d734f1a054ebb7a299e587e8845d71d9f0d5777a3cf9ee147f9b148ccc05865ea8f9ba238a6ab883d36d28af4abe8 downstreamkernel_package.sh
cf5ee240cd1c1e9d30cdec833b4a007fd2e00f9a32ba3f265f99aa2e3dd3601cf43c08d3f3e01bade1d5b2648a6754b2f236e5cb4a9945e18e5c4e97aa2ed7c8 devicepkg_subpackage_kernel.sh
9bb7f2a0930f397a713e9f4b6d5b83a426d9a2a3f692dcc42ac30717bf26ead869d8823a38f3ad388af12b2b9a02e8ec4d4418e9c2062389ed06d2b891a49ff3 deviceinfo
136247a16ec91dc0c7241eeddb28c2196ae3b29946a9bc7e9566f848491ef1c53b12d05bf2dbc1cc352986712fd76f25c1510bcc8f301af540a2f01c33b299e1 expected-deviceinfo-downstream
8cdbf149e1bdfaf4d4a246a208732836956fd81a3aa01ef968e4c2e2cca4027f71cfc38e22debade83ddfca4e05267983c1c8a9c1aa9461a8cf493ef7e893097 expected-deviceinfo-mainline"