Prune sysutils/rubygem-smart_proxy_salt
[dports.git] / news / newsstar / Makefile
1 # Created by: Andrey Slusar <anray@FreeBSD.org>
2 # $FreeBSD$
3
4 PORTNAME=       newsstar
5 PORTVERSION=    1.5.6
6 PORTREVISION=   1
7 CATEGORIES=     news
8 MASTER_SITES=   SF
9
10 MAINTAINER=     mandree@FreeBSD.org
11 COMMENT=        Transfer news between a local NNTP server (INN, sn, s-news)
12
13 LICENSE=        GPLv3
14
15 LIB_DEPENDS=    libgdbm.so:${PORTSDIR}/databases/gdbm
16 BUILD_DEPENDS=  xmlto:${PORTSDIR}/textproc/xmlto \
17                 ${LOCALBASE}/share/xml/docbook/4.5/docbookx.dtd:${PORTSDIR}/textproc/docbook-xml
18
19 GNU_CONFIGURE=  yes
20 USES=           iconv perl5 shebangfix
21 SHEBANG_FILES=  newsstar.in
22
23 OPTIONS_DEFINE=         SSL DOCS EXAMPLES
24 OPTIONS_DEFAULT=        SSL
25
26 CONFIGURE_ARGS+=--disable-chown \
27                 --with-conf-dir=${PREFIX}/etc/newsstar \
28                 --with-rc-dir=/var/spool/newsstar/lib \
29                 --with-incoming-dir=/var/spool/newsstar/incoming
30
31 CPPFLAGS+=      -I${LOCALBASE}/include
32 LIBS+=          -L${LOCALBASE}/lib ${ICONV_LIB}
33
34 .include <bsd.port.options.mk>
35
36 .if ! ${PORT_OPTIONS:MDOCS}
37 INSTALL_TARGET= install-am
38 .endif
39
40 .if ${PORT_OPTIONS:MSSL}
41 USE_OPENSSL=    yes
42 .else
43 CONFIGURE_ARGS+=--disable-ssl
44 .endif
45
46 .include <bsd.port.pre.mk>
47
48 .if exists(/var/spool/s-news)
49 CONFIGURE_ARGS+=--with-spool-dir=/var/spool/s-news \
50                 --with-snews-outgoing-dir=${LOCALBASE}/etc/s-news/suck
51 .endif
52
53 .if exists(${LOCALBASE}/sbin/snntpd)
54 CONFIGURE_ARGS+=--with-sn-spool-dir=/var/spool/news \
55                 --with-sn-articles-dir=/var/spool/news \
56                 --with-outgoing-dir=/var/spool/news/.outgoing
57 .endif
58
59 .if exists(${LOCALBASE}/news/bin/innconfval)
60 CONFIGURE_ARGS+=--with-inn-path=${LOCALBASE}/news/bin
61 .endif
62
63 DOCS=           AUTHORS INSTALL NEWS README TODO docs/QuickStart docs/manual.txt \
64                 docs/index.html docs/ar01s02.html docs/ar01s03.html docs/ar01s04.html \
65                 docs/ar01s05.html docs/ar01s06.html docs/ar01s07.html docs/ar01s08.html \
66                 docs/ar01s09.html docs/ar01s10.html docs/ar01s11.html docs/ar01s12.html \
67                 docs/news.html
68
69 EX_CONFIGS=     cf.server.sample curses.cf.sample filter.pl.sample main.cf.sample \
70                 master.ignore.sample master.score.sample newsrc.sample
71
72 post-patch:
73         ${REINPLACE_CMD} -e 's|/usr/share/sgml/docbook/dtd/xml|${LOCALBASE}/share/xml/docbook|' ${WRKSRC}/docs/manual.xml
74         ${REINPLACE_CMD} -e 's|/usr/share/sgml/docbook/dtd/xml|${LOCALBASE}/share/xml/docbook|' ${WRKSRC}/docs/news.xml
75         ${REINPLACE_CMD} -e 's|install-data-local: install-docs|install-data-local:|' ${WRKSRC}/Makefile.in
76
77 post-install:
78 .if ${PORT_OPTIONS:MEXAMPLES}
79         ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
80 .for i in ${EX_CONFIGS}
81         ${INSTALL_DATA} ${WRKSRC}/sample_config/${i} ${STAGEDIR}${EXAMPLESDIR}
82 .endfor
83 .endif
84 .if ${PORT_OPTIONS:MDOCS}
85         ${MKDIR} ${STAGEDIR}${DOCSDIR}
86 .for i in ${DOCS}
87         ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
88 .endfor
89 .else
90         ${MAKE} -C ${WRKSRC}/src install DESTDIR=${STAGEDIR}
91         ${MAKE} -C ${WRKSRC}/docs install-man DESTDIR=${STAGEDIR}
92 .endif
93
94 .include <bsd.port.post.mk>