1 # Created by: Andrey Slusar <anray@FreeBSD.org>
10 MAINTAINER= mandree@FreeBSD.org
11 COMMENT= Transfer news between a local NNTP server (INN, sn, s-news)
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
20 USES= iconv perl5 shebangfix
21 SHEBANG_FILES= newsstar.in
23 OPTIONS_DEFINE= SSL DOCS EXAMPLES
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
31 CPPFLAGS+= -I${LOCALBASE}/include
32 LIBS+= -L${LOCALBASE}/lib ${ICONV_LIB}
34 .include <bsd.port.options.mk>
36 .if ! ${PORT_OPTIONS:MDOCS}
37 INSTALL_TARGET= install-am
40 .if ${PORT_OPTIONS:MSSL}
43 CONFIGURE_ARGS+=--disable-ssl
46 .include <bsd.port.pre.mk>
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
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
59 .if exists(${LOCALBASE}/news/bin/innconfval)
60 CONFIGURE_ARGS+=--with-inn-path=${LOCALBASE}/news/bin
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 \
69 EX_CONFIGS= cf.server.sample curses.cf.sample filter.pl.sample main.cf.sample \
70 master.ignore.sample master.score.sample newsrc.sample
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
78 .if ${PORT_OPTIONS:MEXAMPLES}
79 ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
80 .for i in ${EX_CONFIGS}
81 ${INSTALL_DATA} ${WRKSRC}/sample_config/${i} ${STAGEDIR}${EXAMPLESDIR}
84 .if ${PORT_OPTIONS:MDOCS}
85 ${MKDIR} ${STAGEDIR}${DOCSDIR}
87 ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
90 ${MAKE} -C ${WRKSRC}/src install DESTDIR=${STAGEDIR}
91 ${MAKE} -C ${WRKSRC}/docs install-man DESTDIR=${STAGEDIR}
94 .include <bsd.port.post.mk>