summaryrefslogtreecommitdiff
path: root/libre/debootstrap/PKGBUILD
blob: d166dc5d2375b3ca0fb744ec272cd632b3e7fe40 (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
# $Id: PKGBUILD 196034 2016-11-16 15:40:42Z felixonmars $
# Maintainer (Arch): Felix Yan <felixonmars@archlinux.org>
# Maintainer: André Silva <emulatorman@parabola.nu>

pkgname=debootstrap
pkgver=1.0.87
pkgrel=1.parabola1
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')
makedepends=('git')
replaces=(${pkgname}-libre)
conflicts=(${pkgname}-libre)
source=("git+https://anonscm.debian.org/git/d-i/debootstrap.git#tag=$pkgver"
        arch-detect.patch
        debootstrap.8
        gnewsense
        trisquel)
optdepends=('gnupg: check release signatures')
md5sums=('SKIP'
         'af21c8c6e073dbedcd472d876f5a50c2'
         '654761198068b51b027d47cba4b7cfa2'
         '13978bdd1d877a0dd2c3c874ecd54f03'
         'b020aa8426e70a6024c8e76312c17d78')

prepare() {
  cd debootstrap

  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 Debian scripts
  rm -v scripts/*

  # 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 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 robur
  ln -s trisquel slaine
  ln -s trisquel taranis
  ln -s trisquel toutatis
}

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

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