summaryrefslogtreecommitdiff
path: root/archiso32/PKGBUILD
blob: 932310ef9f7c25978e977e5f0ae986cc596ac2c7 (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
50
51
52
53
54
# Maintainer: Erich Eckner <arch at eckner dot net>

# repo: releng

_target_arch=$(printf '%s' i 6 8 6)

pkgname=archiso32
_pkgbase=archiso

pkgver=55
pkgrel=1
pkgdesc='Tools for creating Arch Linux 32 live and install iso images'
arch=('any')
license=('GPL3')
url='https://gitlab.archlinux.org/archlinux/archiso'
makedepends=(git)
depends=('archiso' 'pacman-mirrorlist32' 'archlinux32-keyring')
source=(
  "git+https://gitlab.archlinux.org/archlinux/archiso.git#tag=v${pkgver}?signed"
)
sha512sums=('SKIP')
validpgpkeys=('C7E7849466FE2358343588377258734B41C31549') # David Runge <dvzrv@archlinux.org>

package() {

  cd "${_pkgbase}"
  mkdir "${srcdir}/pkg"
  make DESTDIR="${srcdir}/pkg" install
  mkdir -p "${pkgdir}/usr/share/archiso/configs"
  mv "${srcdir}/pkg/usr/share/archiso/configs/releng" "${pkgdir}/usr/share/archiso/configs/releng32"

  # borrowed from archlinux32/packages32/extra/archiso
  cd "${pkgdir}/usr/share/archiso/configs/releng32"
  mv packages.x86_64 packages.i686
  sed -i '
    /^edk2-shell$/d
  ' packages.i686
  sed -i '
    s@archlinux@archlinux32@g
    s@ARCH_@ARCH32_@g
    s@\bx86_64\b@i686@g
    /^bootmodes=/ s@\(\s\+'"'"'uefi-x64\.systemd-boot\.\S\+'"'"'\)\+@@
  ' profiledef.sh
  find airootfs efiboot syslinux -type f -exec \
    sed -i '
      s@\bx86_64\b@i686@g
      s@Arch Linux@\0 32@g
      s@pacman-key --populate archlinux@\032@g
    ' {} +

  sed -i '
    s@\bmirrorlist\b@\032@
  ' pacman.conf
}