package-all-acpi_call-tp_smapi 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/bash
  2. # TODO: inject the appropriate values of '_basekernel' into the PKGBUILDs,
  3. # and commit to VCS
  4. # $ _commit_msg='[acpi_call][acpi_call-dkms][acpi_call-lts][tp_smapi][tp_smapi-lts]: rebuild against latest kernels'
  5. # $ git commit -m "${_commit_msg}" "${PKGBUILDS[@]}"
  6. readonly KERNEL_VER=6.1.5
  7. readonly KERNEL_LTS_VER=5.15.88
  8. readonly CHROOT_NAME_x86_64=x86_64
  9. readonly CHROOT_NAME_i686=i686
  10. readonly CHROOT_NAME_armv7h=armv7h
  11. readonly CHROOT_NAMES=( $CHROOT_NAME_x86_64 $CHROOT_NAME_i686 $CHROOT_NAME_armv7h )
  12. readonly ABS_ROOT=/var/lib/archbuild/packages/abslibre
  13. readonly PKG_DIRS=( $ABS_ROOT/libre/acpi_call{-dkms,,-lts} # NOTE: -dkms first
  14. $ABS_ROOT/libre/tp_smapi{,-lts} ) # no trailing slashes
  15. Main()
  16. {
  17. local arch pkg_dir kver
  18. for arch in ${CHROOT_NAMES[*]}
  19. do sudo librechroot -n $arch update || exit 1
  20. done
  21. for pkg_dir in ${PKG_DIRS[*]}
  22. do kver=$( [[ $pkg_dir =~ -lts$ ]] && echo ${KERNEL_LTS_VER} || echo ${KERNEL_VER} )
  23. cd $pkg_dir/
  24. sed -i "s|_basekernel=.*|_basekernel=${kver}|" PKGBUILD
  25. for arch in ${CHROOT_NAMES[*]}
  26. do sed "s|/$|| ; s|.*/\(.*\)|\1 ($arch)|" <<<$pkg_dir
  27. sudo libremakepkg -n $arch || break
  28. done
  29. done
  30. echo DONE ; printf "%s/*.pkg.tar.* " "${PKG_DIRS[@]}" ;
  31. ls $ABS_ROOT/libre/acpi_call{-dkms,,-lts}/*.pkg.tar.* \
  32. $ABS_ROOT/libre/tp_smapi{,-lts}/*.pkg.tar.*
  33. } ; Main ;