summaryrefslogtreecommitdiff
path: root/libre/debootstrap/PKGBUILD
blob: 02167ab2a45dcb2084b9b8a957b5ef04b7d22dbe (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Maintainer (Arch): Felix Yan <felixonmars@archlinux.org>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: Andreas Grapentin <andreas@grapentin.org>
# Contributor: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
# Contributor: André Silva <emulatorman@hyperbola.info>

pkgname=debootstrap
pkgver=1.0.110
pkgrel=1
pkgrel+=.par1
pkgdesc="Bootstrap a basic gNewSense and Trisquel system, without Debian support"
arch=(any)
license=(GPL)
url="https://tracker.debian.org/pkg/debootstrap"
depends=(wget binutils)
source=("$pkgname-$pkgver.tar.gz::https://github.com/felixonmars/debootstrap/archive/$pkgver.tar.gz"
        arch-detect.patch
        debootstrap.8
        gnewsense
        trisquel)
optdepends=('gnupg: check release signatures'
            'trisquel-keyring: check Trisquel release signatures')
sha512sums=('e687bd3ca43f41f2f2d196b1519e6a7cc3a3e63d9b2e50c808a7508ff90aece4499d61f613a872325df27e44b723e9157a27f85f0e0aa355e49017f84bbb1561'
            '56e25f48027f99f7e720859a9e14fe769b1cbd6227c7a7e27e14c2fea88520109342d6e5b127dc34ce8cc40f46941a0c5157ad35cf8ef9b3e4323877a4b32d97'
            '0b3507756b8f29d19146df3201143ccbd71cfd1f7ef865d184079180612b90c046cabab59fe42d246bfe476ae8fd5c43e81ee2fc3ee06bbc1fc3e75d9f1382ca'
            '968ef005bf1f399b3400080b2ba65f1b32c067c49faadc1caa7ee524a85980f0a6625c7b06838e01bbd8b99a496492da77a38f0e17f0a81fc029ee611fe639b6'
            'bf0310b9c4c7ad03bfcb0f47dff80e66fbb30f1d010a00137dcce84e52ff97c145bfa8079d9a05393e7e11a50c52656f2f555c5e53960643c8e2c7813acf4bfc')

prepare() {
  cd debootstrap-$pkgver

  sed -i 's/sbin/bin/g' Makefile

  # gNewSense/Trisquel defaults
  sed -i 's|export PATH|export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"|' debootstrap

  # Detect Architecture
  patch -p1 -i ../arch-detect.patch

  # Remove Debian files
  rm -v debootstrap.8

  # Add rebranded man
  install -m644 ../debootstrap.8 .

  # Remove (non-FSDG compliant) distributions's scripts
  for SCRIPT in scripts/* ; do
    case $SCRIPT in
    scripts/debian-common)
      ;;
    *)
      rm -v $SCRIPT
      ;;
    esac
  done

  # Add gNewSense script
  install -m644 $srcdir/gnewsense scripts

  # Add Trisquel script
  install -m644 $srcdir/trisquel scripts

  # Enter to scripts dir
  cd scripts

  # Create gNewSense symlinks
  ln -s gnewsense ucclia
  ln -s gnewsense parkes

  # Create Trisquel symlinks
  ln -s trisquel awen
  ln -s trisquel belenos
  ln -s trisquel brigantia
  ln -s trisquel dagda
  ln -s trisquel dwyn
  ln -s trisquel flidas
  ln -s trisquel robur
  ln -s trisquel slaine
  ln -s trisquel taranis
  ln -s trisquel toutatis
}

package() {
  cd debootstrap-$pkgver
  make DESTDIR="$pkgdir" install

  install -Dm644 debootstrap.8 "$pkgdir"/usr/share/man/man8/debootstrap.8
}