mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
b1bdce20a9
Crunch project websites and try to find the latest version for each package without having to do the work manually. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
43 lines
No EOL
1.3 KiB
Text
Executable file
43 lines
No EOL
1.3 KiB
Text
Executable file
MAJOR="4"
|
|
MINOR="16"
|
|
RELEASE="2"
|
|
|
|
VERSION="$MAJOR.$MINOR.$RELEASE"
|
|
SRCDIR="linux-$VERSION"
|
|
TARBALL="linux-$VERSION.tar.xz"
|
|
URL="https://www.kernel.org/pub/linux/kernel/v$MAJOR.x"
|
|
SHA256SUM="470b1fe3b8ee5d1e8e0be5c4e5928b6d5bc00e9ab6c4cff18ff680d3ef20f894"
|
|
DEPENDS="initrd"
|
|
|
|
prepare() {
|
|
return
|
|
}
|
|
|
|
build() {
|
|
local INITRDLIST="$PKGDEPLOYDIR/initrd/initrd.list"
|
|
|
|
export KBUILD_OUTPUT="$PKGBUILDDIR"
|
|
|
|
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" mrproper
|
|
cat_file_override "linux.config" > "$PKGBUILDDIR/.config"
|
|
|
|
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" oldconfig
|
|
sed -i "$PKGBUILDDIR/.config" -e 's,^CONFIG_CROSS_COMPILE=.*,CONFIG_CROSS_COMPILE="'$TARGET'-",'
|
|
sed -i "$PKGBUILDDIR/.config" -e 's,^CONFIG_INITRAMFS_SOURCE=.*,CONFIG_INITRAMFS_SOURCE="'$INITRDLIST'",'
|
|
sed -i "$PKGBUILDDIR/.config" -e 's,^CONFIG_LOCALVERSION=.*,CONFIG_LOCALVERSION="-'${OS_NAME}-${OS_RELEASE}'",'
|
|
make -C "$1" O="$PKGBUILDDIR" ARCH="$LINUX_CPU" CROSS_COMPILE="${TARGET}-" -j $NUMJOBS $LINUX_TGT
|
|
}
|
|
|
|
deploy() {
|
|
local SOURCE="$1"
|
|
local DEPLOY="$2"
|
|
|
|
install -m 755 "arch/$LINUX_CPU/boot/$LINUX_TGT" "$DEPLOY/vmlinuz"
|
|
}
|
|
|
|
check_update() {
|
|
curl --silent -L https://www.kernel.org/ | \
|
|
grep -o linux-[0-9.]*tar.xz | \
|
|
sed 's/linux-//g' | sed 's/.tar.xz//g' | \
|
|
verson_find_greatest "$VERSION"
|
|
} |