[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / devel / elfsh

File: [cvs.NetBSD.org] / pkgsrc / devel / elfsh / Makefile (download)

Revision 1.26, Wed Jul 4 13:40:13 2018 UTC (8 months, 2 weeks ago) by jperkin
Branch: MAIN
CVS Tags: pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, HEAD
Changes since 1.25: +2 -2 lines

*: Move SUBST_STAGE from post-patch to pre-configure

Performing substitutions during post-patch breaks tools such as mkpatches,
making it very difficult to regenerate correct patches after making changes,
and often leading to substituted string replacements being committed.

# $NetBSD: Makefile,v 1.26 2018/07/04 13:40:13 jperkin Exp $
#

VERS=		0.51b3
DISTNAME=	elfsh-${VERS}-portable
PKGNAME=	elfsh-${VERS}
PKGREVISION=	4
CATEGORIES=	devel
MASTER_SITES=	http://elfsh.asgardlabs.org/files/
EXTRACT_SUFX=	.tgz

MAINTAINER=	pkgsrc-users@NetBSD.org
#HOMEPAGE=	http://elfsh.segfault.net/
COMMENT=	ELF format exploration shell

MAKE_JOBS_SAFE=		no

LDFLAGS+=	${BUILDLINK_LDADD.dl:Q}
WRKSRC=		${WRKDIR}/${PKGNAME_NOREV}

SUBST_CLASSES+=		elfsh
SUBST_STAGE.elfsh=	pre-configure
SUBST_MESSAGE.elfsh=	Fixing hardcoded paths.
SUBST_FILES.elfsh=	vm/include/elfsh.h
SUBST_SED.elfsh=	-e '/ELFSH_SHELL/s,/bin/bash,${SH},'
SUBST_SED.elfsh+=	-e '/ELFSH_MODPATH/s,/usr/share/,${PREFIX}/lib/,'

# XXX This package should be converted to use libtool

INSTALLATION_DIRS=	bin include lib

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/vm/elfsh ${DESTDIR}${PREFIX}/bin/elfsh
	${INSTALL_DATA} ${WRKSRC}/libelfsh/libelfsh.a \
		${DESTDIR}${PREFIX}/lib/libelfsh.a
	${INSTALL_DATA} ${WRKSRC}/libelfsh/libelfsh.so \
		${DESTDIR}${PREFIX}/lib/libelfsh.so
	${INSTALL_DATA} ${WRKSRC}/libelfsh/include/libelfsh.h \
		${DESTDIR}${PREFIX}/include/libelfsh.h
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/elfsh
	${INSTALL_DATA} ${WRKSRC}/modules/modremap.so \
		${DESTDIR}${PREFIX}/lib/elfsh
	${INSTALL_DATA} ${WRKSRC}/modules/modtest.so \
		${DESTDIR}${PREFIX}/lib/elfsh
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/elfsh
	${INSTALL_DATA} ${WRKSRC}/doc/elfsh-ref.txt \
		${DESTDIR}${PREFIX}/share/doc/elfsh/elfsh-ref.txt
	${INSTALL_DATA} ${WRKSRC}/doc/libelfsh-ref.txt \
		${DESTDIR}${PREFIX}/share/doc/elfsh/libelfsh-ref.txt

.include "../../mk/dlopen.buildlink3.mk"
.include "../../devel/readline/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"