PKGBUILD 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. # Maintainer (Arch): Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
  2. # Contributor (Arch): Allan McRae <allan@archlinux.org>
  3. # Contributor (Arch): Aaron Griffin <aaron@archlinux.org>
  4. # Maintainer: André Silva <emulatorman@hyperbola.info>
  5. # Maintainer: Márcio Silva <coadde@hyperbola.info>
  6. pkgbase=bash
  7. pkgname=($pkgbase $pkgbase-shcompat)
  8. _basever=5.1
  9. _patchlevel=008
  10. pkgver=${_basever}+${_patchlevel}
  11. _debver=5.1
  12. _debrel=2
  13. pkgrel=2
  14. pkgdesc='GNU Bourne Again SHell'
  15. arch=(i686 x86_64)
  16. license=(GPL-3)
  17. url='https://www.gnu.org/software/bash/bash.html'
  18. backup=(etc/bash.bash{rc,_logout} etc/skel/.bash{rc,_profile,_logout})
  19. # grep and sed are necessary for *.install files
  20. # grep (in pcre dependency) already have readline as package dependency
  21. depends=('grep' 'sed')
  22. makedepends=('texi2html' 'quilt') # use system texi2html (patched by Debian)
  23. install=$pkgbase.install
  24. source=(https://ftp.gnu.org/gnu/bash/bash-$_basever.tar.gz{,.sig}
  25. https://deb.debian.org/debian/pool/main/b/bash/bash_$_debver-$_debrel.debian.tar.xz
  26. dot.bashrc
  27. dot.bash_profile
  28. dot.bash_logout
  29. system.bashrc
  30. system.bash_logout)
  31. validpgpkeys=('7C0135FB088AAF6C66C650B9BB5869F064EA74AB') # Chet Ramey
  32. if [[ $((10#${_patchlevel})) -gt 0 ]]; then
  33. for (( _p=1; _p<=$((10#${_patchlevel})); _p++ )); do
  34. source=(${source[@]} https://ftp.gnu.org/gnu/bash/bash-$_basever-patches/bash${_basever//.}-$(printf "%03d" $_p){,.sig})
  35. done
  36. fi
  37. prepare() {
  38. cd $pkgname-$_basever
  39. if [[ ${_basever%.*} = ${_debver%.*} ]]; then
  40. # Debian patches
  41. export QUILT_PATCHES=debian/patches
  42. export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
  43. export QUILT_DIFF_ARGS='--no-timestamps'
  44. mv "$srcdir"/debian .
  45. # Doesn't apply and seems unimportant
  46. rm -v debian/patches/bash-default-editor.diff || true
  47. rm -v debian/patches/bash50-* || true
  48. rm -v debian/patches/bashbug-editor.diff || true
  49. rm -v debian/patches/deb-bash-config.diff || true
  50. rm -v debian/patches/deb-examples.diff || true
  51. rm -v debian/patches/man-bashlogout.diff
  52. quilt push -av
  53. fi
  54. }
  55. build() {
  56. cd $pkgname-$_basever
  57. _bashconfig=(-DDEFAULT_PATH_VALUE=\'\"/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin\"\'
  58. -DSTANDARD_UTILS_PATH=\'\"/usr/bin:/bin:/usr/sbin:/sbin\"\'
  59. -DSYS_BASHRC=\'\"/etc/bash.bashrc\"\'
  60. -DSYS_BASH_LOGOUT=\'\"/etc/bash.bash_logout\"\'
  61. -DNON_INTERACTIVE_LOGIN_SHELLS)
  62. export CFLAGS="${CFLAGS} ${_bashconfig[@]}"
  63. ./configure --prefix=/usr --with-curses --enable-readline \
  64. --without-bash-malloc --with-installed-readline \
  65. --bindir=/bin
  66. make
  67. }
  68. package_bash() {
  69. optdepends=('bash-completion: for tab completion')
  70. make -C $pkgbase-$_basever DESTDIR="$pkgdir" install
  71. ln -s $pkgbase "$pkgdir/bin/r$pkgbase"
  72. ln -s $pkgbase.1.gz $pkgdir/usr/share/man/man1/r$pkgbase.1.gz
  73. # system-wide configuration files
  74. install -Dm644 system.${pkgbase}rc "$pkgdir/etc/$pkgbase.${pkgbase}rc"
  75. install -Dm644 system.${pkgbase}_logout "$pkgdir/etc/$pkgbase.${pkgbase}_logout"
  76. # user configuration file skeletons
  77. install -dm755 "$pkgdir/etc/skel/"
  78. install -m644 dot.${pkgbase}rc "$pkgdir/etc/skel/.${pkgbase}rc"
  79. install -m644 dot.${pkgbase}_profile "$pkgdir/etc/skel/.${pkgbase}_profile"
  80. install -m644 dot.${pkgbase}_logout "$pkgdir/etc/skel/.${pkgbase}_logout"
  81. # license
  82. install -Dm644 "$srcdir/$pkgbase-$_basever/COPYING" -t "$pkgdir/usr/share/licenses/$pkgname"
  83. }
  84. package_bash-shcompat() {
  85. pkgdesc='POSIX Shell compatibility for GNU Bourne Again SHell'
  86. groups=(base)
  87. depends=($pkgbase)
  88. makedepends=(quilt)
  89. provides=(sh)
  90. conflicts=(sh)
  91. install=$pkgname.install
  92. install -dm755 $pkgdir/{bin,usr/share/man/man1}
  93. ln -s $pkgbase $pkgdir/bin/sh
  94. ln -s $pkgbase $pkgdir/bin/rsh
  95. ln -s $pkgbase.1.gz $pkgdir/usr/share/man/man1/sh.1.gz
  96. ln -s $pkgbase.1.gz $pkgdir/usr/share/man/man1/rsh.1.gz
  97. # license
  98. install -Dm644 "$srcdir/$pkgbase-$_basever/COPYING" -t "$pkgdir/usr/share/licenses/$pkgname"
  99. }
  100. sha512sums=('c44a0ce381469219548a3a27589af3fea4f22eda1ca4e9434b59fc16da81b471c29ce18e31590e0860a6a251a664b68c2b45e3a17d22cfc02799ffd9a208390c'
  101. 'SKIP'
  102. '911769dfa4c0f74ce811a0ebaa001f5707292e634bc3bb0db6ab89f3f7370bc148b18f9f7b4bcecf81e74529aa373386ea38da54f3e55a5aafa6a4c672a7b18b'
  103. 'e5171e7260978195878ccbc8e4ba42ecc3a10d976722b00295b895387dc797629a0f6368036856eed7cce93245a7ef5f427dd0cf4e0750a25fc621218ef0ec8f'
  104. '626122baaf8bb4b292741a9d8409736db01b3aaf2788b475ca5ff3cf1733e78dc84e71985868958c8072a5348b6aab34985a03ff4332e19bbfe1f9017c2e6b07'
  105. '9da5cbf2044ff23f2bfb80d4dca074f0e4a753d7260ca4730de6ffde08471ca08c2fa211d3ae9e65c508f5eef8c90c862b1f0d1b16e3610aa85a6eea1bb29add'
  106. 'd143fca5e782f751ff1cd50371f5e456f3bc5ca4a162080fba04c7f4f11b745b171b8fc92d7840ef0912dc21d93018e472aa583e69e2a5cac3a2633618bbb607'
  107. '75331199cdc46cc4f4c845f20eaee3d1f3c5e4aaad75cc4e3d6537bfe845ef8680d105f2636ccd0c8fa9ddd057c43704056ba731dd089e69b1d6c5d0905e32a4'
  108. '1cd86805a2639614372aec29a710bc456e330abcbbaa0867820c94f714a1fa5fb5c1b18aa2c10263ae0bce9dad7579c7af2f732282315c1c34bfd6a90777bfd2'
  109. 'SKIP'
  110. '923e7822a9629645347d3aea0058fb5e2d52223507159a62369309f264612df44a84931c19e0ccb3852e98ce672dfbd454477090b4041b5a0de477c94eb61088'
  111. 'SKIP'
  112. '01e952dcfdae58624723d64912ea3444eed2fdcd266ba1a929b95ec3abd70f914bf400607c3f7bb7a94ac2925f794f91f37c1929d5bb987de2ba7f60a19cb8bd'
  113. 'SKIP'
  114. '10ff24cd91a2cd88818bfa7218050843af6b409e43fcca89f5ec70d8266020c6c2a55132426271f165cd0f154f49eb0f8ec2761b80fc066c921b83120bb543ce'
  115. 'SKIP'
  116. 'fa83d894fe874a05b9a7d47b8bca8e5b7f4067221d82e8b1af616d17725592c3737c621f2a8ad3c917b29846012c37c85acd34dcbb43eb6b05065ccce89b260c'
  117. 'SKIP'
  118. 'b9b6e3d71f7b7718e2e8598ec8e337dcc675571fb233c29e5230ebf14eab2249204531f2fe8c4d1459c5fed10acb679048588d1e457e98dbc00ffc4d2cd227e3'
  119. 'SKIP'
  120. 'e4ebdc47e780ddc2588ecdfcfe00cb618039c7044e250ab2b836b0735c461ebacd15beaf2145e277c70b7f51cded55bd8dde7757df810f33f8dae306ee5ba571'
  121. 'SKIP'
  122. '97f9558a08a66cc9da62c285bf9118b39328e25ed3b9277728e0539b1ac0adef176a090e39cd96dc03d6fd900d8155bd58040cb3390a09f637bab1de8af3faf6'
  123. 'SKIP')