APKBUILD 1.86 KB
Newer Older
1
# Contributor: Valery Kartel <valery.kartel@gmail.com>
Natanael Copa's avatar
Natanael Copa committed
2 3
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mc
prspkt's avatar
prspkt committed
4
pkgver=4.8.23
Andy Postnikov's avatar
Andy Postnikov committed
5
pkgrel=0
prspkt's avatar
prspkt committed
6 7
pkgdesc="Filemanager/shell that emulates Norton Commander"
url="https://www.midnight-commander.org"
8
arch="all"
9
license="GPL-3.0-or-later"
Natanael Copa's avatar
Natanael Copa committed
10
depends=""
Natanael Copa's avatar
Natanael Copa committed
11
subpackages="$pkgname-doc $pkgname-lang"
12
makedepends="e2fsprogs-dev glib-dev libssh2-dev ncurses-dev pcre-dev perl"
prspkt's avatar
prspkt committed
13
source="https://www.midnight-commander.org/downloads/$pkgname-$pkgver.tar.xz
Andy Postnikov's avatar
Andy Postnikov committed
14
	alpine_syntax.patch"
Roberto Oliveira's avatar
Roberto Oliveira committed
15

Valery Kartel's avatar
Valery Kartel committed
16
builddir="$srcdir/$pkgname-$pkgver"
Natanael Copa's avatar
Natanael Copa committed
17 18

build() {
Valery Kartel's avatar
Valery Kartel committed
19
	cd "$builddir"
20 21 22 23
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
Natanael Copa's avatar
Natanael Copa committed
24 25 26 27 28 29
		--libexecdir=/usr/lib \
		--mandir=/usr/share/man \
		--sysconfdir=/etc \
		--enable-background \
		--enable-charset \
		--enable-largefile \
30
		--enable-vfs-sftp \
Valery Kartel's avatar
Valery Kartel committed
31
		--with-internal-edit \
Natanael Copa's avatar
Natanael Copa committed
32
		--with-mmap \
33
		--with-screen=ncurses \
Natanael Copa's avatar
Natanael Copa committed
34 35 36
		--with-subshell \
		--without-gpm-mouse \
		--without-included-gettext \
prspkt's avatar
prspkt committed
37
		--without-x
Valery Kartel's avatar
Valery Kartel committed
38
	make
Natanael Copa's avatar
Natanael Copa committed
39 40
}

Roberto Oliveira's avatar
Roberto Oliveira committed
41 42 43 44 45
check() {
	cd "$builddir"
	make check
}

Natanael Copa's avatar
Natanael Copa committed
46
package() {
prspkt's avatar
prspkt committed
47 48
	cd "$builddir"
	make DESTDIR="$pkgdir" install
Valery Kartel's avatar
Valery Kartel committed
49
	rm -fr "$pkgdir"/usr/share/man/??
Natanael Copa's avatar
Natanael Copa committed
50 51
}

52
doc() {
prspkt's avatar
prspkt committed
53 54
	default_doc
	mkdir -p "$subpkgdir"/usr/share/doc
Valery Kartel's avatar
Valery Kartel committed
55
	mv "$pkgdir"/usr/share/mc/examples \
prspkt's avatar
prspkt committed
56
		"$subpkgdir"/usr/share/doc/mc
Valery Kartel's avatar
Valery Kartel committed
57 58
	find "$pkgdir"/usr/lib/mc -name README* \
		-exec mv {} "$subpkgdir"/usr/share/doc/mc/ \;
59 60 61
}

lang() {
prspkt's avatar
prspkt committed
62
	default_lang
Valery Kartel's avatar
Valery Kartel committed
63
	mkdir -p "$subpkgdir"/usr/share/mc/help \
64
		"$subpkgdir"/usr/share/mc/hints
Valery Kartel's avatar
Valery Kartel committed
65
	mv "$pkgdir"/usr/share/mc/help/mc.hlp.* \
prspkt's avatar
prspkt committed
66
		"$subpkgdir"/usr/share/mc/help/
Valery Kartel's avatar
Valery Kartel committed
67 68
	mv "$pkgdir"/usr/share/mc/hints/mc.hint.* \
		"$subpkgdir"/usr/share/mc/hints/
69 70
}

prspkt's avatar
prspkt committed
71
sha512sums="e51c7f926d296280a57a8ecb5f4b296a850022b7ab9beaba89f5cb7554d8fc3e13c73b8571f78c3162ee85df88f7f46d07c9c893156cda4d1377a01071cdd1c6  mc-4.8.23.tar.xz
prspkt's avatar
prspkt committed
72
47aa001e8c20a24631617d665fd0d81b269ebad96696c4bd70c7040bbca713868e02fe53dfaee9a775a57f35a0e7c9e44ce299037379e249ad27354a78d905c3  alpine_syntax.patch"