summaryrefslogtreecommitdiff
path: root/editors/mined/Makefile
blob: def876ee6cb4dd1abaad94d74f437d28840e3f0d (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
# Created by: thierry@pompo.net

PORTNAME=	mined
PORTVERSION=	2015.25
CATEGORIES=	editors
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}%20${PORTVERSION}

MAINTAINER=	thierry@FreeBSD.org
COMMENT=	Text mode editor with Unicode support

LICENSE=	GPLv3

OPTIONS_DEFINE=	DOCS

PORTDOCS=	*

USES=		desktop-file-utils gmake ncurses
MAKEFILE=	makefile
REINPLACE_ARGS=	-i ""
MAKE_ARGS=	GMAKE="${MAKE_CMD}" CC="${CC}" OPT="${CFLAGS}"
INSTALL_TARGET=	localinstall
MAKE_JOBS_UNSAFE=	yes

PRFX2FIX=	src/makefile.bsd usrshare/conf_user/xinitrc.mined	\
		src/minedaux.c man/mined.1 src/mkinclud.mak		\
		src/makefile.gcc

pre-configure:
.for FILE in ${PRFX2FIX}
	${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' ${WRKSRC}/${FILE}
.endfor

pre-build:
	${MV} ${WRKSRC}/src/mkinclud.cc ${WRKSRC}/src/mkinclud.cc.bak
	${CP} ${WRKSRC}/src/mkinclud.gcc ${WRKSRC}/src/mkinclud.cc
	(if [ ! -f ${WRKSRC}/src/mkinclud.${CC:T} ] ; then	\
	${LN} -sf ${WRKSRC}/src/mkinclud.cc ${WRKSRC}/src/mkinclud.${CC:T} ; \
	fi)

post-install:
	${INSTALL_DATA} ${WRKSRC}/usrshare/setup_install/mined.desktop	\
		${STAGEDIR}${DESKTOPDIR}
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/mined
	${MKDIR} ${STAGEDIR}${DOCSDIR}
	cd ${WRKSRC}/doc && ${INSTALL_DATA} * ${STAGEDIR}${DOCSDIR}
	cd ${WRKSRC}/usrshare/package_doc && ${INSTALL_DATA} * ${STAGEDIR}${DOCSDIR}
	${RM} -r ${STAGEDIR}${DATADIR}/setup_install/cyg
	@${RM} -r ${STAGEDIR}${DOCSDIR}/CHANGES ${STAGEDIR}${DOCSDIR}/LICENCE.GPL
	@${RM} -r ${STAGEDIR}${DATADIR}/doc_user ${STAGEDIR}${DATADIR}/package_doc

.include <bsd.port.mk>