summaryrefslogtreecommitdiff
path: root/sysutils/mc/Makefile
blob: 3223a5e2bfc9c671bdc1a02fd0abe16a1deb5008 (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
# $NetBSD: Makefile,v 1.89 2012/09/15 10:06:30 obache Exp $

DISTNAME=	mc-4.7.0.10
PKGREVISION=	8
CATEGORIES=	sysutils
MASTER_SITES=	http://www.midnight-commander.org/downloads/
EXTRACT_SUFX=	.tar.bz2

MAINTAINER=	cheusov@NetBSD.org
HOMEPAGE=	http://www.midnight-commander.org/
COMMENT=	User-friendly file manager and visual shell
LICENSE=	gnu-gpl-v2

PKG_DESTDIR_SUPPORT=	user-destdir
PKG_INSTALLATION_TYPES=	overwrite pkgviews

USE_TOOLS+=		pkg-config unzip:run
GNU_CONFIGURE=		YES
USE_PKGLOCALEDIR=	YES

CHECK_INTERPRETER_SKIP=	libexec/mc/extfs.d/s3+

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "Linux"
PLIST_SRC+=		${PKGDIR}/PLIST.cons.saver
.endif

# we need working e2fsprogs and gpm packages first
CONFIGURE_ARGS+=	--without-ext2undel
CONFIGURE_ARGS+=	--without-gpm-mouse
CONFIGURE_ARGS+=	UNZIP=${TOOLS_PATH.unzip} ZIP=${TOOLS_PATH.zip}

PLIST_SRC+=		${PKGDIR}/PLIST

.include "options.mk"

EGDIR=			${PREFIX}/share/examples/mc

CONFFILES=	cedit.menu edit.indent.rc edit.spell.rc filehighlight.ini \
		mc.ext mc.keymap mc.keymap.default mc.keymap.emacs mc.lib \
		mc.menu mc.menu.sr

.if !empty(PKG_OPTIONS:Mmc-edit)
CONFFILES+=	syntax/Syntax
.endif

.if !empty(PKG_OPTIONS:Mmc-vfs)
CONFFILES+=	sfs.ini
.endif

.if !empty(PKG_OPTIONS:Mmc-charset)
CONFFILES+=	mc.charsets
.endif

OWN_DIRS+=	${PKG_SYSCONFDIR}/mc ${PKG_SYSCONFDIR}/mc/syntax

.for i in ${CONFFILES}
CONF_FILES+=	${EGDIR}/${i} ${PKG_SYSCONFDIR}/mc/${i}
.endfor

INSTALLATION_DIRS+=	${EGDIR} ${EGDIR}/syntax

post-install:
# remove dir if no extensions were installed there
	rmdir ${DESTDIR}${PREFIX}/lib/mc 2>/dev/null || ${TRUE}

.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../devel/glib2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"