summaryrefslogtreecommitdiff
path: root/sysutils/mc46/Makefile
blob: 1ca0027b43dad06ed2ddfe429bc4364ed536cd9a (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
# $NetBSD: Makefile,v 1.3 2011/04/22 13:44:44 obache Exp $

DISTNAME=	mc-4.6.1
PKGREVISION=	8
CATEGORIES=	sysutils
MASTER_SITES=	http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/ \
		${MASTER_SITE_SUNSITE:=utils/file/managers/mc/}

MAINTAINER=	pavel.arnost@clnet.cz
HOMEPAGE=	http://www.ibiblio.org/mc/
COMMENT=	User-friendly file manager and visual shell (old 4.6 branch)

PKG_DESTDIR_SUPPORT=	user-destdir
PKG_INSTALLATION_TYPES=	overwrite pkgviews

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

.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"

PKG_SYSCONFSUBDIR=	mc
SUBST_CLASSES+=		conf
SUBST_STAGE.conf=	post-patch
SUBST_FILES.conf=	vfs/extfs.c vfs/sfs.c
SUBST_VARS.conf=	PKG_SYSCONFDIR

.if !empty(PKG_OPTIONS:Mvfs)
EGDIR=			${PREFIX}/share/examples/mc
CONF_FILES+=		${EGDIR}/extfs.ini ${PKG_SYSCONFDIR}/extfs.ini
CONF_FILES+=		${EGDIR}/sfs.ini ${PKG_SYSCONFDIR}/sfs.ini
.endif

post-install:
# remove dir if no extensions were installed there
	rmdir ${DESTDIR}${PREFIX:Q}/lib/mc 2>/dev/null || ${TRUE}
.if !empty(PKG_OPTIONS:Mvfs)
	${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/vfs/extfs/extfs.ini ${DESTDIR}${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/vfs/extfs/sfs.ini ${DESTDIR}${EGDIR}
.endif

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