summaryrefslogtreecommitdiff
path: root/libre/mkinitcpio-parabolaiso/PKGBUILD
blob: d20b3b2c93b71162bc4a46e0bfebec1500cbe1d2 (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
55
56
# Maintainer (Arch): David Runge <dvzrv@archlinux.org>
# Maintainer: David P. <megver83@parabola.nu>

pkgname=mkinitcpio-parabolaiso
pkgver=58
pkgrel=1
pkgdesc="Initcpio scripts used by parabolaiso"
arch=('any')
url="https://gitlab.archlinux.org/mkinitcpio/mkinitcpio-archiso"
license=('GPL3')
depends=('bash' 'device-mapper' 'mkinitcpio')
makedepends=('git')
checkdepends=('shellcheck' 'shfmt')
optdepends=(
  'curl: for PXE over HTTP'
  'mkinitcpio-nfs-utils: for PXE over NFS'
  'nbd: for PXE over NBD'
  'pv: for status display during copy to RAM'
)
source=("${pkgname}::git+https://gitlab.archlinux.org/mkinitcpio/mkinitcpio-archiso.git#tag=v${pkgver}?signed")
sha256sums=('SKIP')
validpgpkeys=('C7E7849466FE2358343588377258734B41C31549') # David Runge <dvzrv@archlinux.org>

provides=("mkinitcpio-archiso=$pkgver")
conflicts=('mkinitcpio-archiso')
replaces=(${conflicts[@]})

check() {
  cd "$pkgname"
  make -k check
}

prepare() {
  local rebrand
  rebrand='
  s|Arch Linux|Parabola GNU/Linux-libre|g;
  s|archiso|parabolaiso|g;
  s|ARCHISO|PARABOLAISO|g;
  s|ARCH|PARA|g;
  s|parabolaisobasedir=".*"|parabolaisobasedir="parabola"|;
  s|dm_snap_prefix=".*"|dm_snap_prefix="parabola"|;
  s|/arch/|/parabola/|;
  '

  cd "$pkgname"
  sed -i "$rebrand" script/* Makefile hooks/* docs/* install/*

  for f in hooks/* install/* script/*; do
    mv "$f" "${f/archiso/parabolaiso}"
  done
}

package() {
  cd "$pkgname"
  make DESTDIR="$pkgdir/" PREFIX='/usr' install
}