mirror of
https://github.com/pygos/build.git
synced 2024-11-22 19:19:46 +01:00
David Oberhollenzer
fa4eff263b
This commit adds an "emptypackage" template that implements defaults for all package functions and is included before every package. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
36 lines
921 B
Text
36 lines
921 B
Text
VERSION="1"
|
|
SRCDIR="rpi-userland-${VERSION}"
|
|
TARBALL="${SRCDIR}.tar.xz"
|
|
URL="http://infraroot.at/pygos"
|
|
SHA256SUM="4336d10e0ff93adfa2e93f3520e102a30c009ee0f823bb1d391edf9ab17b3f0f"
|
|
DEPENDS="toolchain"
|
|
SUBPKG="rpi-vc rpi-vc-dev gles2 gles2-dev"
|
|
|
|
build() {
|
|
local cflags="-O2 -Os"
|
|
local ldflags=""
|
|
|
|
if [ "x$TC_HARDENING" = "xyes" ]; then
|
|
cflags="$cflags -fstack-protector-all"
|
|
ldflags="$ldflags -z noexecstack -z relro -z now"
|
|
fi
|
|
|
|
CFLAGS="$cflags" LDFLAGS="$ldflags" \
|
|
cmake -DCMAKE_TOOLCHAIN_FILE="$CMAKETCFILE" \
|
|
-DCMAKE_INSTALL_PREFIX="" "$1"
|
|
|
|
make -j $NUMJOBS
|
|
}
|
|
|
|
deploy() {
|
|
make DESTDIR="$PKGDEPLOYDIR" install
|
|
|
|
strip_files ${PKGDEPLOYDIR}/opt/vc/bin/*
|
|
strip_files ${PKGDEPLOYDIR}/opt/vc/lib/*.so
|
|
strip_files ${PKGDEPLOYDIR}/opt/vc/lib/plugins/*.so
|
|
|
|
mkdir -p "$PKGDEPLOYDIR/lib"
|
|
mv "$PKGDEPLOYDIR/opt/vc/lib/pkgconfig" "$PKGDEPLOYDIR/lib"
|
|
|
|
cp $SCRIPTDIR/pkg/$PKGNAME/*.{files,desc} "$PKGDEPLOYDIR"
|
|
}
|