2017-12-14 21:17:18 +00:00
|
|
|
pkgname="devicepkg-dev"
|
2019-01-29 08:35:10 +00:00
|
|
|
pkgver=0.8
|
2018-10-15 19:54:15 +00:00
|
|
|
pkgrel=0
|
2017-12-14 21:17:18 +00:00
|
|
|
pkgdesc="Provides default device package functions"
|
2018-06-30 07:00:48 +00:00
|
|
|
url="https://postmarketos.org"
|
2017-12-14 21:17:18 +00:00
|
|
|
arch="all"
|
|
|
|
license="MIT"
|
|
|
|
source="
|
2018-10-05 06:02:52 +00:00
|
|
|
compiler-gcc.h
|
2017-12-14 21:17:18 +00:00
|
|
|
devicepkg_build.sh
|
|
|
|
devicepkg_package.sh
|
2018-07-02 00:12:49 +00:00
|
|
|
downstreamkernel_prepare.sh
|
2018-10-15 19:54:15 +00:00
|
|
|
devicepkg_subpackage_kernel.sh
|
|
|
|
testdata/deviceinfo
|
|
|
|
testdata/expected-deviceinfo-downstream
|
|
|
|
testdata/expected-deviceinfo-mainline
|
2017-12-14 21:17:18 +00:00
|
|
|
"
|
|
|
|
|
2018-10-15 19:54:15 +00:00
|
|
|
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"
|
|
|
|
}
|
|
|
|
|
2017-12-14 21:17:18 +00:00
|
|
|
package() {
|
|
|
|
install -Dm755 "$srcdir/devicepkg_build.sh" \
|
|
|
|
"$pkgdir/usr/bin/devicepkg_build"
|
|
|
|
install -Dm755 "$srcdir/devicepkg_package.sh" \
|
|
|
|
"$pkgdir/usr/bin/devicepkg_package"
|
2018-07-02 00:12:49 +00:00
|
|
|
install -Dm755 "$srcdir/downstreamkernel_prepare.sh" \
|
|
|
|
"$pkgdir/usr/bin/downstreamkernel_prepare"
|
2018-10-15 19:54:15 +00:00
|
|
|
install -Dm755 "$srcdir/devicepkg_subpackage_kernel.sh" \
|
|
|
|
"$pkgdir/usr/bin/devicepkg_subpackage_kernel"
|
2018-10-05 06:02:52 +00:00
|
|
|
install -Dm644 "$srcdir/compiler-gcc.h" \
|
|
|
|
"$pkgdir/usr/share/devicepkg-dev/compiler-gcc.h"
|
2017-12-14 21:17:18 +00:00
|
|
|
}
|
2018-10-05 06:02:52 +00:00
|
|
|
sha512sums="d69930dd790b00fb39760a37d95a10899f0d167e10e2804feb05d9ce04f94185dc32d36edc90214aba2ea2aa09bf18f7dab93f1d2eff23f67beb2cc83be30e7c compiler-gcc.h
|
2018-10-15 19:54:15 +00:00
|
|
|
55943344e6c6192642f20246566c8468dba33d4ec4223c4e930f723fdb0fa248001c65a9bbaa5f15c18e9a42811c9b9decedfd5586f481aa762b6423b55d55bb devicepkg_build.sh
|
|
|
|
cc35989539781da2bc847fe68448863174a79db3853f836c61da064030cb729a16681cb6ffa16add558a7dba8563cb7fab495a6db811dcc3a1af5123dc0e6f72 devicepkg_package.sh
|
2019-01-29 08:35:10 +00:00
|
|
|
1b038d0bca1e130674497cf7aeb26fac2bcec510ce094fa6f6700fcdcabc778741541c1aa89d3588ed42908f60708a2d9b83ffd5e50e99db619d366458e82256 downstreamkernel_prepare.sh
|
2018-10-15 19:54:15 +00:00
|
|
|
bedf319a74bff01780192cd11c872c41a451915cc7e7542c467cd84fa1784236401f57e197258c3aae734f478c31a2052129838861ea204c0985630501f152ca devicepkg_subpackage_kernel.sh
|
|
|
|
9bb7f2a0930f397a713e9f4b6d5b83a426d9a2a3f692dcc42ac30717bf26ead869d8823a38f3ad388af12b2b9a02e8ec4d4418e9c2062389ed06d2b891a49ff3 deviceinfo
|
|
|
|
136247a16ec91dc0c7241eeddb28c2196ae3b29946a9bc7e9566f848491ef1c53b12d05bf2dbc1cc352986712fd76f25c1510bcc8f301af540a2f01c33b299e1 expected-deviceinfo-downstream
|
|
|
|
8cdbf149e1bdfaf4d4a246a208732836956fd81a3aa01ef968e4c2e2cca4027f71cfc38e22debade83ddfca4e05267983c1c8a9c1aa9461a8cf493ef7e893097 expected-deviceinfo-mainline"
|