aboutsummaryrefslogtreecommitdiffstats
path: root/main/mc/APKBUILD
blob: 02304438b6accd981747dde3f8702d77f38df54e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mc
pkgver=4.8.19
pkgrel=0
pkgdesc="A filemanager/shell that emulates Norton Commander"
url="http://www.midnight-commander.org"
arch="all"
license="GPL3+"
depends=""
subpackages="$pkgname-doc $pkgname-lang"
makedepends="e2fsprogs-dev glib-dev pcre-dev ncurses-dev libssh2-dev"
source="http://www.midnight-commander.org/downloads/$pkgname-$pkgver.tar.bz2
	alpine_syntax.patch"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--libexecdir=/usr/lib \
		--mandir=/usr/share/man \
		--sysconfdir=/etc \
		--enable-background \
		--enable-charset \
		--enable-largefile \
		--enable-vfs-sftp \
		--with-internal-edit \
		--with-mmap \
		--with-screen=ncurses \
		--with-subshell \
		--without-gpm-mouse \
		--without-included-gettext \
		--without-x \
		|| return 1
	make
}

package() {
	make -C "$builddir" DESTDIR="$pkgdir" install || return 1
	rm -fr "$pkgdir"/usr/share/man/??
}

doc() {
	default_doc || return 1
	mkdir -p "$subpkgdir"/usr/share/doc || return 1
	mv "$pkgdir"/usr/share/mc/examples \
		"$subpkgdir"/usr/share/doc/mc || return 1
	find "$pkgdir"/usr/lib/mc -name README* \
		-exec mv {} "$subpkgdir"/usr/share/doc/mc/ \;
}

lang() {
	default_lang || return 1
	mkdir -p "$subpkgdir"/usr/share/mc/help \
		"$subpkgdir"/usr/share/mc/hints
	mv "$pkgdir"/usr/share/mc/help/mc.hlp.* \
		"$subpkgdir"/usr/share/mc/help/ || return 1
	mv "$pkgdir"/usr/share/mc/hints/mc.hint.* \
		"$subpkgdir"/usr/share/mc/hints/
}

sha512sums="eecf39b3f043cad1f47aabcd25a0e672e7bbf406944f457521e0ff5db344f01cdc8572bb45b2507a54469ff1130c457a90f62eb7d5e6191f9c7d4f35a4b46a2e  mc-4.8.19.tar.bz2
aee89eaacaafcdfe2ceb2eb7b7dcf08d669dbaffcb76f4c1613498017096c33068b7bf9d06e6f7d0685c9928cebaa932ab78b3a68f3b2de59b512022b3944e8d  alpine_syntax.patch"