# Maintainer: Jaromir Capik <tavvva@email.cz>
#
# Thanks to:
# Sergej Pupykin <ps@lx-ltd.ru>

pkgname=mc
pkgver=4.7.5.2
pkgrel=4
pkgdesc="midnight commander with utf8 support (charsets do not work)"
url="http://www.midnight-commander.org/"
groups=('ap')
conflicts=(mc)
provides=(mc)
depends=('gettext' 'glib2' 'gpm' 'libiconv' 'libpcre' 'slang' 'uclibc')
makedepends=('pkgconfig' 'gettext-devel' 'glib2-devel' 'gpm-devel'
	     'libiconv-devel' 'libpcre-devel' 'slang-devel' 'uclibc-devel')
source=(http://www.midnight-commander.org/downloads/$pkgname-$pkgver.tar.gz
	20mc.sh)

build() {
  cd ${srcdir}/$pkgname-$pkgver

  CPPFLAGS="-DUTF8" \
  ./configure --prefix=/usr --without-gnome --without-debug --with-screen=slang \
	      --without-included-gettext --enable-largefile --with-subshell \
	      --with-edit --with-vfs --with-mmap --without-x --with-gpm-mouse \
	      --enable-charset --host=$CHOST --build=$CHOST

  make || return 1
  make DESTDIR=${pkgdir} install || return 1

  install -Dm 644 ${srcdir}/20mc.sh ${pkgdir}/etc/profile.d/20mc.sh
}

md5sums=('9fdfe7c0fcff362436eb35fcd1adf0fd' 'ddec2a9b2bc9048b3f9e2163f20e8a49')
