template 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # Template file for 'debootstrap'
  2. pkgname=debootstrap
  3. version=1.0.123
  4. # Liberation: _pureos* variables added for pureos distfiles
  5. _pureospkgver=1.0.108
  6. _pureospkgrel=pureos2
  7. revision=2
  8. # Liberation: We're building from source. So changed fetch into this.
  9. build_style=gnu-makefile
  10. depends="binutils gnupg gzip tar wget xz"
  11. # Liberation: Changed according to Parabola to indicate inclusion of Free distros
  12. # and ommision of Debian
  13. short_desc="Bootstrap a basic gNewSense and Trisquel system, without Debian support"
  14. maintainer="Leah Neukirchen <leah@vuxu.org>"
  15. license="MIT"
  16. homepage="http://packages.qa.debian.org/d/debootstrap.html"
  17. # Liberation: Changed files to build from source
  18. distfiles="https://github.com/felixonmars/${pkgname}/archive/${version}.tar.gz
  19. https://repo.puri.sm/pureos/pool/main/d/${pkgname}/${pkgname}_${_pureospkgver}${_pureospkgrel}.tar.gz"
  20. checksum="ccc6cf2eb5e5481d88e1cebd5430a86ffc686be019f7f4dc66cfbb717b107d56
  21. c0d8c1d7bf7f612c654c475c7e997711fc0a925ddebc0b8c063d4386a25a9cd5"
  22. case "$XBPS_TARGET_MACHINE" in
  23. armv5*l*) _debarch=armel;;
  24. arm*l*) _debarch=armhf;;
  25. aarch64*) _debarch=arm64;;
  26. x86_64*) _debarch=amd64;;
  27. i686*) _debarch=i386;;
  28. ppc64le*) _debarch=ppc64el;;
  29. ppc64*) _debarch=ppc64;;
  30. ppc*) _debarch=powerpc;;
  31. *) broken="please add your architecture";;
  32. esac
  33. # Liberation
  34. # Some commands has been taken and modified from:
  35. # https://git.parabola.nu/abslibre.git/tree/libre/debootstrap/PKGBUILD
  36. post_patch() {
  37. # Invalid argument fix
  38. sed -i 's/chown/#chown/g' Makefile
  39. # Below is mostly from Parabola project with minor changes...
  40. sed -i 's/sbin/bin/g' Makefile
  41. # gNewSense/Trisquel defaults
  42. sed -i 's|export PATH|export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"|' debootstrap
  43. # arch-detect.patch from Parabola was omitted
  44. # Remove Debian files
  45. rm -v debootstrap.8
  46. # Add rebranded man
  47. install -m644 ${FILESDIR}/debootstrap.8 .
  48. # Remove (non-FSDG compliant) distributions's scripts
  49. for SCRIPT in scripts/* ; do
  50. case $SCRIPT in
  51. scripts/debian-common)
  52. ;;
  53. *)
  54. rm -v $SCRIPT
  55. ;;
  56. esac
  57. done
  58. # Add gNewSense script
  59. install -m644 ${FILESDIR}/gnewsense scripts
  60. # Add PureOS script
  61. install -m644 ${XBPS_BUILDDIR}/debootstrap/scripts/amber scripts/pureos
  62. # Add Trisquel script
  63. install -m644 ${FILESDIR}/trisquel scripts
  64. # Enter to scripts dir
  65. cd scripts
  66. # Create gNewSense symlinks
  67. ln -s gnewsense ucclia
  68. ln -s gnewsense parkes
  69. # Create PureOS symlinks
  70. ln -s pureos amber
  71. ln -s pureos green
  72. ln -s pureos landing
  73. ln -s pureos purple
  74. # Create Trisquel symlinks
  75. ln -s trisquel awen
  76. ln -s trisquel belenos
  77. ln -s trisquel brigantia
  78. ln -s trisquel dagda
  79. ln -s trisquel dwyn
  80. ln -s trisquel etiona
  81. ln -s trisquel flidas
  82. ln -s trisquel robur
  83. ln -s trisquel slaine
  84. ln -s trisquel taranis
  85. ln -s trisquel toutatis
  86. }
  87. # Liberation: Removed do_install
  88. # Liberation
  89. # Some commands has been taken and modified from:
  90. # https://git.parabola.nu/abslibre.git/tree/libre/debootstrap/PKGBUILD
  91. post_install() {
  92. install -Dm644 ${FILESDIR}/debootstrap.8 "${DESTDIR}"/usr/share/man/man8/debootstrap.8
  93. # Some commands from previous do_install...
  94. vlicense debian/copyright LICENSE
  95. echo ${_debarch} >${DESTDIR}/usr/share/debootstrap/arch
  96. }