12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #!/bin/bash
- # TODO: inject the appropriate values of '_basekernel' into the PKGBUILDs,
- # and commit to VCS
- # $ _commit_msg='[acpi_call][acpi_call-dkms][acpi_call-lts][tp_smapi][tp_smapi-lts]: rebuild against latest kernels'
- # $ git commit -m "${_commit_msg}" "${PKGBUILDS[@]}"
- readonly KERNEL_VER=6.1.5
- readonly KERNEL_LTS_VER=5.15.88
- readonly CHROOT_NAME_x86_64=x86_64
- readonly CHROOT_NAME_i686=i686
- readonly CHROOT_NAME_armv7h=armv7h
- readonly CHROOT_NAMES=( $CHROOT_NAME_x86_64 $CHROOT_NAME_i686 $CHROOT_NAME_armv7h )
- readonly ABS_ROOT=/var/lib/archbuild/packages/abslibre
- readonly PKG_DIRS=( $ABS_ROOT/libre/acpi_call{-dkms,,-lts} # NOTE: -dkms first
- $ABS_ROOT/libre/tp_smapi{,-lts} ) # no trailing slashes
- Main()
- {
- local arch pkg_dir kver
- for arch in ${CHROOT_NAMES[*]}
- do sudo librechroot -n $arch update || exit 1
- done
- for pkg_dir in ${PKG_DIRS[*]}
- do kver=$( [[ $pkg_dir =~ -lts$ ]] && echo ${KERNEL_LTS_VER} || echo ${KERNEL_VER} )
- cd $pkg_dir/
- sed -i "s|_basekernel=.*|_basekernel=${kver}|" PKGBUILD
- for arch in ${CHROOT_NAMES[*]}
- do sed "s|/$|| ; s|.*/\(.*\)|\1 ($arch)|" <<<$pkg_dir
- sudo libremakepkg -n $arch || break
- done
- done
- echo DONE ; printf "%s/*.pkg.tar.* " "${PKG_DIRS[@]}" ;
- ls $ABS_ROOT/libre/acpi_call{-dkms,,-lts}/*.pkg.tar.* \
- $ABS_ROOT/libre/tp_smapi{,-lts}/*.pkg.tar.*
- } ; Main ;
|