summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3bea1807d253bac5724093a834612ae896d23f9c (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Maintainer: Zile995 <stefan.zivkovic995@gmail.com>

pkgname=booster-um
pkgver=1.4
pkgrel=1
pkgdesc="Booster UKI Manager - A simple bash script to manage UKI files generated by booster and systemd-ukify"
url="https://github.com/Zile995/booster-um"
arch=('any')
license=('GPL3')
backup=(etc/booster-um.yaml)
depends=('booster' 'go-yq' 'systemd' 'systemd-ukify' 'util-linux')
optdepends=("sbctl: Sign the UKI files"
            "sbsigntools: Sign the UKI files with sbsign"
            "efibootmgr: Manage EFI entries")
source=(${pkgname}-${pkgver}.zip::${url}/archive/${pkgver}.zip)
sha512sums=('9ed944bad784f85e46341744a5f4e13a6dbb1f02f34e8612e0524dbea98569fd6e20141c3b6dd6aa31a5cdd09a1d509abd0b11feae947a29a1bf7eae553229b2')

package() {
  cd "${pkgname}-${pkgver}"

  # Create config file
  mkdir "${pkgdir}/etc/"
  touch "${pkgdir}/etc/booster-um.yaml"

  # Install the booster-um
  install -Dm0755 booster-um -t "${pkgdir}/usr/bin"

  # Install the helper scripts
  for script in scripts/*; do
    install -Dm0755 "$script" -t "${pkgdir}/usr/share/booster-um"
  done

  # Install the libaplm scripts
  for libalpm_script in libalpm/scripts/*; do
    install -Dm0755 "$libalpm_script" -t "${pkgdir}/usr/share/libalpm/scripts"
  done

  # Install the libalpm hooks
  for libalpm_hook in libalpm/hooks/*; do
    install -Dm0644 "$libalpm_hook" -t "${pkgdir}/usr/share/libalpm/hooks"
  done

  # Install completions
  install -Dm644 "completions/zsh/_${pkgname}" -t "${pkgdir}/usr/share/zsh/site-functions/"
  install -Dm644 "completions/bash/${pkgname}" -t "${pkgdir}/usr/share/bash-completion/completions"

  # Install the LICENSE
  install -Dm0644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}