summarylogtreecommitdiffstats
path: root/build_pkgs
blob: 6c7190a305e8f82cf1bd45c5d94ba4a650b865f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# default config
# default build arches
CPU_ARCHES=(sandybridge skylake broadwell silvermont)
# load local build script if found to apply gpg settings or alike, if existing
if [ -e build_pkgs.local ] ; then
    source build_pkgs.local
fi
# FIXME maybe check for local changes
# build generic first
git checkout .
echo 'source+=(batch_opts)' >> PKGBUILD
touch batch_opts
updpkgsums
makepkg -f --cleanbuild

for cpu in ${CPU_ARCHES[*]} ; do
   git checkout PKGBUILD
   cat >> PKGBUILD <<EOF
source+=(batch_opts)
pkgname=(linux-pf-$cpu)
eval "package_linux-pf-$cpu() {
     \$(declare -f _package)
     _package
     }"
EOF
    echo "CPU=$cpu" > batch_opts
    updpkgsums
    makepkg -f --cleanbuild
done
git checkout .