aboutsummaryrefslogtreecommitdiffstats
path: root/main/mc/APKBUILD
blob: 2e0de9aef75a2c44f6e1966dda9f473d1155a220 (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
67
68
69
70
71
72
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mc
pkgver=4.8.20
pkgrel=0
pkgdesc="A filemanager/shell that emulates Norton Commander"
url="http://www.midnight-commander.org"
arch="all"
license="GPL-3.0-or-later"
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
}

check() {
	cd "$builddir"
	make check
}

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="533aff7079374e070c8df9e967c151ef09f44ad507517dd3e607d58eba7357cb6ba3cad31b6a0b27c52791a163b28f8c8218e12eda1d900e83bb25daf9d47849  mc-4.8.20.tar.bz2
aee89eaacaafcdfe2ceb2eb7b7dcf08d669dbaffcb76f4c1613498017096c33068b7bf9d06e6f7d0685c9928cebaa932ab78b3a68f3b2de59b512022b3944e8d  alpine_syntax.patch"