PKGBUILD 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # Maintainer: David P. <megver83@parabola.nu>
  2. # Maintainer (Artix): Tom Gundersen <teg@jklm.no>
  3. # Maintainer (Artix): Dave Reisner <dreisner@archlinux.org>
  4. # Contributor (Artix): judd <jvinet@zeroflux.org>
  5. pkgbase=util-linux
  6. pkgname=(util-linux util-linux-libs)
  7. _pkgmajor=2.37
  8. _realver=${_pkgmajor}.2
  9. pkgver=${_realver/-/}
  10. pkgrel=5
  11. pkgrel+=.nonsystemd1
  12. pkgdesc='Miscellaneous system utilities for Linux'
  13. url='https://github.com/karelzak/util-linux'
  14. arch=('x86_64')
  15. arch+=('i686' 'armv7h')
  16. makedepends=('asciidoctor' 'libcap-ng' 'libxcrypt' 'python' 'udev')
  17. license=('GPL2')
  18. options=('strip')
  19. validpgpkeys=('B0C64D14301CC6EFAEDF60E4E4B71D5EEC39C284') # Karel Zak
  20. source=("https://www.kernel.org/pub/linux/utils/util-linux/v${_pkgmajor}/${pkgbase}-${_realver}.tar."{xz,sign}
  21. '0001-agetty-resolve-tty-name-even-if-stdin-is-specified.patch'
  22. pam-{login,common,runuser,su}
  23. 'util-linux.sysusers'
  24. '60-rfkill.rules')
  25. sha256sums=('6a0764c1aae7fb607ef8a6dd2c0f6c47d5e5fd27aa08820abaad9ec14e28e9d9'
  26. 'SKIP'
  27. '53395b7e434b32e6fee25f1b6fa59330ab72c1a2f99a17c3d3fd92473379fd9a'
  28. '99cd77f21ee44a0c5e57b0f3670f711a00496f198fc5704d7e44f5d817c81a0f'
  29. '57e057758944f4557762c6def939410c04ca5803cbdd2bfa2153ce47ffe7a4af'
  30. '48d6fba767631e3dd3620cf02a71a74c5d65a525d4c4ce4b5a0b7d9f41ebfea1'
  31. 'b28f31fcafa401b0eb26bc0c710002acc4f7718f97af45b0d444e4af6dfb15a8'
  32. '10b0505351263a099163c0d928132706e501dd0a008dac2835b052167b14abe3'
  33. '7423aaaa09fee7f47baa83df9ea6fef525ff9aec395c8cbd9fe848ceb2643f37')
  34. prepare() {
  35. cd "${pkgbase}-${_realver}"
  36. patch -Np1 < ../0001-agetty-resolve-tty-name-even-if-stdin-is-specified.patch
  37. }
  38. build() {
  39. cd "${pkgbase}-${_realver}"
  40. ./configure \
  41. --prefix=/usr \
  42. --libdir=/usr/lib \
  43. --bindir=/usr/bin \
  44. --sbindir=/usr/bin \
  45. --localstatedir=/var \
  46. --enable-usrdir-path \
  47. --enable-fs-paths-default=/usr/bin:/usr/local/bin \
  48. --enable-raw \
  49. --enable-vipw \
  50. --enable-newgrp \
  51. --enable-chfn-chsh \
  52. --enable-write \
  53. --enable-mesg \
  54. --without-systemd \
  55. --with-python=3
  56. make
  57. }
  58. package_util-linux() {
  59. conflicts=('rfkill' 'hardlink')
  60. provides=('rfkill' 'hardlink')
  61. replaces=('rfkill' 'hardlink')
  62. depends=('pam' 'shadow' 'coreutils' 'libudev' 'libudev.so'
  63. 'libcap-ng' 'libxcrypt' 'libcrypt.so' 'util-linux-libs'
  64. 'libmagic.so' 'libncursesw.so' 'libreadline.so')
  65. optdepends=('python: python bindings to libmount'
  66. 'words: default dictionary for look')
  67. backup=(etc/pam.d/chfn
  68. etc/pam.d/chsh
  69. etc/pam.d/login
  70. etc/pam.d/runuser
  71. etc/pam.d/runuser-l
  72. etc/pam.d/su
  73. etc/pam.d/su-l)
  74. cd "${pkgbase}-${_realver}"
  75. make DESTDIR="${pkgdir}" install
  76. # setuid chfn and chsh
  77. chmod 4755 "${pkgdir}"/usr/bin/{newgrp,ch{sh,fn}}
  78. # install PAM files for login-utils
  79. install -Dm0644 "${srcdir}/pam-common" "${pkgdir}/etc/pam.d/chfn"
  80. install -m0644 "${srcdir}/pam-common" "${pkgdir}/etc/pam.d/chsh"
  81. install -m0644 "${srcdir}/pam-login" "${pkgdir}/etc/pam.d/login"
  82. install -m0644 "${srcdir}/pam-runuser" "${pkgdir}/etc/pam.d/runuser"
  83. install -m0644 "${srcdir}/pam-runuser" "${pkgdir}/etc/pam.d/runuser-l"
  84. install -m0644 "${srcdir}/pam-su" "${pkgdir}/etc/pam.d/su"
  85. install -m0644 "${srcdir}/pam-su" "${pkgdir}/etc/pam.d/su-l"
  86. # adjust for usrmove
  87. # TODO(dreisner): fix configure.ac upstream so that this isn't needed
  88. cd "${pkgdir}"
  89. mv usr/sbin/* usr/bin
  90. rmdir usr/sbin
  91. ### runtime libs are shipped as part of util-linux-libs
  92. rm "${pkgdir}"/usr/lib/lib*.{a,so}*
  93. ### install sysusers
  94. install -Dm0644 "${srcdir}/util-linux.sysusers" \
  95. "${pkgdir}/usr/lib/sysusers.d/util-linux.conf"
  96. install -Dm0644 "${srcdir}/60-rfkill.rules" \
  97. "${pkgdir}/usr/lib/udev/rules.d/60-rfkill.rules"
  98. }
  99. package_util-linux-libs() {
  100. pkgdesc="util-linux runtime libraries"
  101. provides=('libutil-linux' 'libblkid.so' 'libfdisk.so' 'libmount.so' 'libsmartcols.so' 'libuuid.so')
  102. conflicts=('libutil-linux')
  103. replaces=('libutil-linux')
  104. make -C "${pkgbase}-${_realver}" DESTDIR="${pkgdir}" install-usrlib_execLTLIBRARIES
  105. }