summaryrefslogtreecommitdiff
path: root/devel/elfsh/Makefile
blob: dbd9855f4f3a301f5de4bf0d5db72a12ad36f33d (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
# $NetBSD: Makefile,v 1.22 2012/10/31 11:16:55 asau 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

WRKSRC=		${WRKDIR}/${PKGNAME_NOREV}

USE_GNU_READLINE=	yes

SUBST_CLASSES+=		elfsh
SUBST_STAGE.elfsh=	post-patch
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 "../../devel/readline/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"