summaryrefslogtreecommitdiff
path: root/mail/rss2email/Makefile
blob: 2360dc2c98b1eaa74ba824d035186bc89f9df2b3 (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
# $NetBSD: Makefile,v 1.26 2011/02/12 14:11:42 schmonz Exp $
#

DISTNAME=		rss2email-2.70
PKGREVISION=		1
CATEGORIES=		mail
MASTER_SITES=		${HOMEPAGE}

MAINTAINER=		schmonz@NetBSD.org
HOMEPAGE=		http://www.allthingsrss.com/rss2email/
COMMENT=		Get RSS feeds emailed to you

DEPENDS+=		${PYPKGPREFIX}-feedparser-[0-9]*:../../textproc/py-feedparser
DEPENDS+=		${PYPKGPREFIX}-html2text-[0-9]*:../../textproc/py-html2text

PKG_DESTDIR_SUPPORT=	user-destdir

NO_BUILD=		yes
PYTHON_PATCH_SCRIPTS=	*.py

SUBST_CLASSES+=		bin
SUBST_STAGE.bin=	do-configure
SUBST_FILES.bin=	rss2email.py r2e
SUBST_SED.bin=		-e 's|@LOCALBASE@|${LOCALBASE}|g'
SUBST_SED.bin+=		-e 's|@PREFIX@|${PREFIX}|g'
SUBST_SED.bin+=		-e 's|@PYTHONBIN@|${PYTHONBIN}|g'

SUBST_CLASSES+=		crlf
SUBST_STAGE.crlf=	post-extract
SUBST_FILES.crlf=	config.py.example
SUBST_SED.crlf=		-e 's|
||g'

SHAREDIR=		${PREFIX}/share/rss2email
EGDIR=			${PREFIX}/share/examples/rss2email
INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1

post-extract:
	cp ${FILESDIR}/r2e.1 ${WRKSRC}

do-install:
	set -e; cd ${WRKSRC};						\
	${INSTALL_SCRIPT_DIR} ${DESTDIR}${SHAREDIR};			\
	${INSTALL_SCRIPT} rss2email.py ${DESTDIR}${SHAREDIR};		\
	${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR};				\
	${INSTALL_DATA} config.py.example ${DESTDIR}${EGDIR}/config.py;	\
	${INSTALL_MAN} r2e.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1;	\
	${INSTALL_SCRIPT} r2e ${DESTDIR}${PREFIX}/bin

.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"