PKGBUILD 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. # Maintainer (arch): George Rawlinson <grawlinson@archlinux.org>
  2. # Contributor: Alad Wenter <alad@archlinux.org>
  3. # Contributor: schuay <jakob.gruber@gmail.com>
  4. # Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
  5. # Contributor: André Silva <emulatorman@hyperbola.info>
  6. # Contributor: Márcio Silva <coadde@hyperbola.info>
  7. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  8. # parabola changes and rationale:
  9. # - remove non-free archiver optdepends
  10. # - use versioned source-ball rather than VCS sources
  11. pkgname=mc
  12. pkgver=4.8.30
  13. pkgrel=1
  14. pkgrel+=.parabola1
  15. pkgdesc='A file manager that emulates Norton Commander'
  16. arch=('x86_64')
  17. arch+=('armv7h' 'i686')
  18. url='https://midnight-commander.org/'
  19. license=('GPL')
  20. depends=(
  21. 'e2fsprogs'
  22. 'glib2'
  23. 'gpm'
  24. 'libssh2'
  25. 'slang'
  26. 'which'
  27. )
  28. makedepends=(
  29. 'aspell'
  30. 'git'
  31. 'libxt'
  32. 'libx11'
  33. 'unzip'
  34. )
  35. optdepends=(
  36. 'aspell: spelling corrections'
  37. 'cabextract: ucab extfs'
  38. 'cdparanoia: audio extfs'
  39. 'cdrkit: iso9660 extfs'
  40. 'cvs: CVS support'
  41. 'gawk: hp48+ extfs'
  42. 'mtools: a+ extfs'
  43. 'p7zip: support for 7zip archives'
  44. 'perl: needed by several extfs scripts'
  45. 'python: to access uc1541 or s3 storage'
  46. 'python-boto: s3+ extfs'
  47. 'python-pytz: s3+ extfs'
  48. # non-free deleted
  49. # non-free deleted
  50. # non-free deleted
  51. 'unzip: open zip archives'
  52. 'zip: uzip extfs'
  53. )
  54. optdepends+=(
  55. 'samba: VFS support'
  56. 'arj: uarj extfs'
  57. )
  58. backup=(
  59. 'etc/mc/edit.indent.rc'
  60. 'etc/mc/filehighlight.ini'
  61. 'etc/mc/mc.ext'
  62. 'etc/mc/mc.keymap'
  63. 'etc/mc/mc.menu'
  64. 'etc/mc/mcedit.menu'
  65. 'etc/mc/sfs.ini'
  66. )
  67. options=('!emptydirs')
  68. source=(
  69. http://ftp.midnight-commander.org/${pkgname}-${pkgver}.tar.xz
  70. 'mc-python3.patch'
  71. )
  72. source+=('libre.patch')
  73. sha256sums=('5ebc3cb2144b970c5149fda556c4ad50b78780494696cdf2d14a53204c95c7df'
  74. '78df8592c86445fa6249433e8587889e3923c0bb8b604cae32d5e739d2cc025c')
  75. sha256sums+=('c5785a63c194363824e9218bfc1c068f4cc8fc41f7cbc934c0da9bdb495c5861')
  76. prepare() {
  77. ln -fs ${pkgname}{-${pkgver},} # link source-ball root dir as VCS root dirname
  78. cd "$pkgname"
  79. # port to Python 3
  80. # ref: https://github.com/MidnightCommander/mc/pull/149
  81. patch -p1 -i "$srcdir/mc-python3.patch"
  82. #./autogen.sh # does not exist in the source-ball
  83. ## parabola changes ##
  84. rm -v src/vfs/extfs/helpers/{uace,urar}.in
  85. echo "applying libre.patch"
  86. patch -Np1 -i ../libre.patch
  87. # libre.patch requires autotools reconfigure
  88. rm -v configure Makefile.in
  89. autoreconf -ifv
  90. }
  91. build() {
  92. cd "$pkgname"
  93. ./configure \
  94. --prefix=/usr \
  95. --libexecdir=/usr/lib \
  96. --sysconfdir=/etc \
  97. --enable-aspell \
  98. --enable-vfs-smb \
  99. --with-screen=slang \
  100. --with-x
  101. make
  102. }
  103. package() {
  104. cd "$pkgname"
  105. make DESTDIR="$pkgdir" install
  106. # FS#50889: Replace mc.keymap symlink with target file to fix backup mechanism.
  107. rm "$pkgdir/etc/mc/mc.keymap"
  108. cp "$pkgdir"/etc/mc/mc{.default,}.keymap
  109. }