pmbootstrap-meow/test/testdata/build_local_src/APKBUILD
Oliver Smith 0f371e426f
pmbootstrap build --src: override source for any package (#1210)
* New "pmbootstrap build --src=/local/source/path hello-world" syntax
* The local source path gets mounted inside the chroot
* From there, a copy of the source code gets created with rsync (so
  we can write into the source folder if necessary, for better
  compatibility with all kinds of APKBUILDs)
* After the aport gets copied into the chroot before building (as
  usually), we extend the APKBUILD with overrides to make it use
  mountpoint's source instead of downloading the package's source
  from the web as usually
* The package built with the local source gets _pYYYYMMDDHHMMSS
  appended to the pkgver
* linux-postmarketos-mainline: use $builddir, fix patch checksum
2018-02-19 22:04:01 +00:00

31 lines
740 B
Text

pkgname=hello-world
pkgver=1
pkgrel=0
pkgdesc="hello world program for testing 'pmbootstrap build --src'"
url="https://en.wikipedia.org/wiki/%22Hello,_World!%22_program"
arch="all"
license="MIT"
depends=""
makedepends=""
subpackages=""
source="non-existing-file.c" # this will be overridden by --src
options=""
build() {
cd "$builddir"
make
}
check() {
cd "$builddir"
printf 'hello, world!\n' > expected
./hello-world > real
diff -q expected real
}
package() {
install -D -m755 "$builddir"/hello-world \
"$pkgdir"/usr/bin/hello-world
}
# These will be overridden as well
sha512sums="d5ad91600d9be3e53be4cb6e5846b0757786c947b2c0d10f612f67262fc91c148e8d73621623e259ca9dcd5e2c8ec7069cebec44165e203ea8c0133669d3382d invalid-file.c"