summaryrefslogtreecommitdiff
path: root/www/surfraw/Makefile
blob: be6b65d68c3c5a2b7f79f49bff96292a88964e58 (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
# $NetBSD: Makefile,v 1.52 2014/11/23 22:02:44 wiz Exp $

DISTNAME=	surfraw-2.2.9
PKGREVISION=	2
CATEGORIES=	www
MASTER_SITES=	http://surfraw.alioth.debian.org/dist/

MAINTAINER=	wiz@NetBSD.org
HOMEPAGE=	http://surfraw.alioth.debian.org/
COMMENT=	Shell Users' Revolutionary Front Rage Against the Web
LICENSE=	public-domain

CONFLICTS+=	surfaw-[0-9]*

GNU_CONFIGURE=		YES
CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR:Q}
CONFIGURE_ARGS+=	--disable-sr
USE_TOOLS+=		perl sed
REPLACE_PERL+=		surfraw-update-path.IN opensearch-discover \
			opensearch-genquery

DOCDIR=			${PREFIX}/share/doc/surfraw
EGDIR=			${PREFIX}/share/examples/surfraw
INSTALLATION_DIRS=	${DOCDIR}
INSTALL_MAKE_FLAGS=	sysconfdir=${EGDIR}
MAKE_DIRS+=		${PKG_SYSCONFDIR}/xdg/surfraw
CONF_FILES=		${EGDIR}/xdg/surfraw/conf ${PKG_SYSCONFDIR}/xdg/surfraw/conf
CONF_FILES+=		${EGDIR}/xdg/surfraw/bookmarks ${PKG_SYSCONFDIR}/xdg/surfraw/bookmarks

# avoid installing useless manpage links
post-patch:
	-${GREP} -v elvi.1sr.gz ${WRKSRC}/links.IN > ${WRKSRC}/links.IN.new
	${MV} ${WRKSRC}/links.IN.new ${WRKSRC}/links.IN
	${SED} -e s/sr/surfraw/g ${WRKSRC}/surfraw.1.IN > ${WRKSRC}/surfraw.1.IN.new
	${MV} ${WRKSRC}/surfraw.1.IN.new ${WRKSRC}/surfraw.1.IN
	${SED} -e s/sr/surfraw/g ${WRKSRC}/elvi.1sr.IN > ${WRKSRC}/elvi.1sr.IN.new
	${MV} ${WRKSRC}/elvi.1sr.IN.new ${WRKSRC}/elvi.1sr.IN

# fix man page name; install additional documentation
post-install:
	${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${DOCDIR}
	${MV} ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/elvi.1sr \
		${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/elvi.1

.include "../../mk/bsd.pkg.mk"