void-packages/srcpkgs/pinebookpro-uboot/template
Đoàn Trần Công Danh 49cb564d14 srcpkgs/p*: convert patches to -Np1
* par is kept at -Np0

```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

56 lines
1.8 KiB
Bash

# Template file for 'pinebookpro-uboot'
pkgname=pinebookpro-uboot
reverts="20200212_1 20200212_2"
version=2020.10
revision=1
archs="aarch64*"
wrksrc="u-boot-${version}"
hostmakedepends="flex bc dtc python3"
makedepends="atf-rk3399-bl31"
depends="u-boot-tools"
short_desc="U-Boot for Pinebook Pro"
maintainer="Renato Aguiar <renato@renatoaguiar.net>"
license="GPL-2.0-only, BSD-3-Clause"
homepage="https://www.denx.de/wiki/U-Boot/"
distfiles="https://ftp.denx.de/pub/u-boot/u-boot-${version}.tar.bz2"
checksum=0d481bbdc05c0ee74908ec2f56a6daa53166cc6a78a0e4fac2ac5d025770a622
do_configure() {
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
make ${makejobs} pinebook-pro-rk3399_defconfig
}
do_build() {
unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
if [ "$CROSS_BUILD" ]; then
export CROSS_COMPILE=${XBPS_CROSS_TRIPLET}-
fi
make ${makejobs} EXTRAVERSION=-${revision} \
BL31="${XBPS_CROSS_BASE}/usr/lib/trusted-firmware-a/rk3399/bl31.elf"
}
do_install() {
vinstall idbloader.img 0644 usr/lib/pinebookpro-uboot
vinstall u-boot.itb 0644 usr/lib/pinebookpro-uboot
# FWIW this file is not at all specific to the PBP and will overwrite any custom
# u-boot boot.scr files that a user installs into /boot.
# I would like to remove it, but it could cause breakage for existing setups.
# It would also require some changes to void-mklive to configure u-boot suitably.
vinstall "${FILESDIR}/kernel.d/uboot" 750 \
etc/kernel.d/post-install 60-uboot
vlicense Licenses/Exceptions
vlicense Licenses/OFL.txt
vlicense Licenses/README
vlicense Licenses/bsd-2-clause.txt
vlicense Licenses/bsd-3-clause.txt
vlicense Licenses/eCos-2.0.txt
vlicense Licenses/gpl-2.0.txt
vlicense Licenses/ibm-pibs.txt
vlicense Licenses/isc.txt
vlicense Licenses/lgpl-2.0.txt
vlicense Licenses/lgpl-2.1.txt
vlicense Licenses/r8a779x_usb3.txt
vlicense Licenses/x11.txt
}