aboutsummaryrefslogtreecommitdiffstats
path: root/main/mc/APKBUILD
blob: 0d85696e12285808d099aab91db27d749fe6dc2f (plain) (blame)
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
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mc
pkgver=4.8.26
pkgrel=1
pkgdesc="Filemanager/shell that emulates Norton Commander"
url="https://www.midnight-commander.org"
arch="all"
license="GPL-3.0-or-later"
subpackages="$pkgname-doc $pkgname-lang"
makedepends="e2fsprogs-dev glib-dev libssh2-dev slang-dev perl"
source="https://www.midnight-commander.org/downloads/mc-$pkgver.tar.xz
	fix-cchar_t.patch
	alpine_syntax.patch"


build() {
	./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=slang \
		--with-subshell \
		--without-gpm-mouse \
		--without-included-gettext \
		--without-x
	make
}

check() {
	make check
}

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

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

lang() {
	default_lang
	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/
	mv "$pkgdir"/usr/share/mc/hints/mc.hint.* \
		"$subpkgdir"/usr/share/mc/hints/
}

sha512sums="f2f06915b775ecc94016fe5d5db9301e953cc89ee0708e79ee96e14a9f53142a467b27061ca57f65b40310fa86d4d13e2f2a29a601f8fefa6216fb10f73007be  mc-4.8.26.tar.xz
7d4c52ada69f9d66fda92a07d04de2a3060a7e5eed4cac21dfdbbcac69ab28f2c6debbfbcc84f9e6fed8587b2a14a929b3655c291323fc4c9b9872ea44f84f32  fix-cchar_t.patch
47aa001e8c20a24631617d665fd0d81b269ebad96696c4bd70c7040bbca713868e02fe53dfaee9a775a57f35a0e7c9e44ce299037379e249ad27354a78d905c3  alpine_syntax.patch"