1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-06 06:30:19 +00:00

Clean up the port

- Remove unnecessary variables such as USE_REINPLACE
- Define ETCDIR and use it throughout the port
- Use OPT_VARIABLE instead of if statements with PORT_OPTIONS:MOPT
- Sort variables and targets
- Sort pkg-plist and remove unnecessary @dir uses
- Define DOCS and EXAMPLES options for completeness
- Instal manuals under share/man

Approved by:	portmgr blanket
This commit is contained in:
Mateusz Piotrowski 2020-10-28 10:13:07 +00:00
parent 3161a5584f
commit 490caa9fde
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=553530
2 changed files with 52 additions and 66 deletions

View File

@ -2,6 +2,7 @@
PORTNAME= rntrack PORTNAME= rntrack
PORTVERSION= 2.1.10 PORTVERSION= 2.1.10
PORTREVISION= 1
CATEGORIES= news mail CATEGORIES= news mail
MASTER_SITES= SF MASTER_SITES= SF
MASTER_SITE_SUBDIR= ftrack-as/RNtrack/${PORTVERSION} MASTER_SITE_SUBDIR= ftrack-as/RNtrack/${PORTVERSION}
@ -13,63 +14,53 @@ COMMENT= FTN Messages tracker
LICENSE= GPLv2 LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING LICENSE_FILE= ${WRKSRC}/COPYING
USES= tar:bzip2 USES= tar:bzip2
MAKEFILE= ${WRKSRC}/MakeFiles/FreeBSD/Makefile
MAKE_ENV= CONFIG=${ETCDIR}/rntrack.cfg
ALL_TARGET= ${PORTNAME}
ETCDIR= ${PREFIX}/etc/fido
WRKSRC= ${WRKDIR}/${DISTNAME}
NO_WRKSUBDIR= yes NO_WRKSUBDIR= yes
USE_REINPLACE= yes _DOCS= FAQ_en FAQ_ru report.err report.err.ru
ALL_TARGET= ${PORTNAME}
MAKEFILE= ${WRKSRC}/MakeFiles/FreeBSD/Makefile
MAKE_ENV= CONFIG=${PREFIX}/etc/fido/rntrack/rntrack.cfg
DOCS= FAQ_en FAQ_ru report.err report.err.ru OPTIONS_DEFINE= DOCS EXAMPLES LOG_PID SCRIPTS SYSLOG_FORMAT
OPTIONS_DEFINE= LOG_PID SCRIPTS SYSLOG_FORMAT LOG_PID_DESC= Enable PID logging
SCRIPTS_DESC= Enable Perl scripts support
SCRIPTS_DESC= Enable Perl scripts support
LOG_PID_DESC= Enable pid logging
SYSLOG_FORMAT_DESC= Use syslog-like log style SYSLOG_FORMAT_DESC= Use syslog-like log style
.include <bsd.port.options.mk> LOG_PID_MAKE_ARGS= ENABLE_LOG_PID=1
SCRIPTS_USES= perl5
.if ${PORT_OPTIONS:MSYSLOG_FORMAT} SCRIPTS_MAKE_ARGS= ENABLE_SCRIPTS=1
MAKE_ARGS+= ENABLE_SYSLOG_LOG_FORMAT=1 SYSLOG_FORMAT_MAKE_ARGS= ENABLE_SYSLOG_LOG_FORMAT=1
.endif
.if ${PORT_OPTIONS:MLOG_PID}
MAKE_ARGS+= ENABLE_LOG_PID=1
.endif
.if ${PORT_OPTIONS:MSCRIPTS}
USES+= perl5
MAKE_ARGS+= ENABLE_SCRIPTS=1
.endif
pre-configure:
${CP} ${WRKSRC}/MakeFiles/FreeBSD/Makefile ${WRKSRC}
pre-patch: pre-patch:
${REINPLACE_CMD} -e "s@\.\./\.\./@@g" ${WRKSRC}/MakeFiles/FreeBSD/Makefile ${REINPLACE_CMD} -e "s@\.\./\.\./@@g" ${WRKSRC}/MakeFiles/FreeBSD/Makefile
pre-configure:
${CP} ${WRKSRC}/MakeFiles/FreeBSD/Makefile ${WRKSRC}
do-install: do-install:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${MKDIR} ${STAGEDIR}${PREFIX}/etc/fido/rntrack ${MKDIR} ${STAGEDIR}${ETCDIR}
${INSTALL_PROGRAM} ${WRKSRC}/rntrack ${STAGEDIR}${PREFIX}/sbin ${INSTALL_PROGRAM} ${WRKSRC}/rntrack ${STAGEDIR}${PREFIX}/sbin
${MKDIR} ${STAGEDIR}${PREFIX}/etc/fido/rntrack/tpl ${MKDIR} ${STAGEDIR}${ETCDIR}/tpl
${INSTALL_DATA} ${WRKSRC}/samples/node.cfg ${STAGEDIR}${PREFIX}/etc/fido/rntrack/rntrack.cfg-dist ${INSTALL_DATA} ${WRKSRC}/samples/node.cfg ${STAGEDIR}${ETCDIR}/rntrack.cfg-dist
${INSTALL_DATA} ${WRKSRC}/samples/test.pl ${STAGEDIR}${PREFIX}/etc/fido/rntrack ${INSTALL_DATA} ${WRKSRC}/samples/test.pl ${STAGEDIR}${ETCDIR}
${INSTALL_DATA} ${WRKSRC}/samples/tpl/* ${STAGEDIR}${PREFIX}/etc/fido/rntrack/tpl ${INSTALL_DATA} ${WRKSRC}/samples/tpl/* ${STAGEDIR}${ETCDIR}/tpl
${INSTALL_DATA} ${WRKSRC}/doc/rntrack.1 ${STAGEDIR}${PREFIX}/man/man1 ${INSTALL_DATA} ${WRKSRC}/doc/rntrack.1 ${STAGEDIR}${PREFIX}/share/man/man1
${MKDIR} ${STAGEDIR}${PREFIX}/etc/fido/rntrack/tbl ${MKDIR} ${STAGEDIR}${ETCDIR}/tbl
.for f in alt2koi.tbl koi2alt.tbl .for f in alt2koi.tbl koi2alt.tbl
${INSTALL_DATA} ${WRKSRC}/samples/${f} ${STAGEDIR}${PREFIX}/etc/fido/rntrack/tbl ${INSTALL_DATA} ${WRKSRC}/samples/${f} ${STAGEDIR}${ETCDIR}/tbl
.endfor .endfor
.for f in bignode.zip bignode2.zip node1042.zip node1157.zip node.cfg node2.cfg node3.cfg perl-test.cfg point.cfg point2.cfg traflog.tpl .for f in bignode.zip bignode2.zip node1042.zip node1157.zip node.cfg node2.cfg node3.cfg perl-test.cfg point.cfg point2.cfg traflog.tpl
${INSTALL_DATA} ${WRKSRC}/samples/${f} ${STAGEDIR}${EXAMPLESDIR} ${INSTALL_DATA} ${WRKSRC}/samples/${f} ${STAGEDIR}${EXAMPLESDIR}
.endfor .endfor
${MKDIR} ${STAGEDIR}${DOCSDIR} ${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in ${DOCS} .for f in ${_DOCS}
${INSTALL_DATA} ${WRKSRC}/doc/${f} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/doc/${f} ${STAGEDIR}${DOCSDIR}
.endfor .endfor
.include <bsd.port.mk> .include <bsd.port.mk>

View File

@ -1,30 +1,25 @@
@dir %%DOCSDIR%% %%ETCDIR%%/rntrack.cfg-dist
@dir %%EXAMPLESDIR%% %%ETCDIR%%/tbl/alt2koi.tbl
@dir etc/fido/rntrack/tbl %%ETCDIR%%/tbl/koi2alt.tbl
@dir etc/fido/rntrack/tpl %%ETCDIR%%/test.pl
@dir etc/fido/rntrack %%ETCDIR%%/tpl/audit.tpl
etc/fido/rntrack/rntrack.cfg-dist %%ETCDIR%%/tpl/badfrom.tpl
etc/fido/rntrack/tpl/audit.tpl %%ETCDIR%%/tpl/badto.tpl
etc/fido/rntrack/tpl/badfrom.tpl %%ETCDIR%%/tpl/loop.tpl
etc/fido/rntrack/tpl/badto.tpl share/man/man1/rntrack.1.gz
etc/fido/rntrack/tpl/loop.tpl
%%DOCSDIR%%/FAQ_en
%%DOCSDIR%%/FAQ_ru
%%DOCSDIR%%/report.err
%%DOCSDIR%%/report.err.ru
%%EXAMPLESDIR%%/bignode.zip
%%EXAMPLESDIR%%/bignode2.zip
%%EXAMPLESDIR%%/node1042.zip
%%EXAMPLESDIR%%/node1157.zip
%%EXAMPLESDIR%%/node.cfg
%%EXAMPLESDIR%%/node2.cfg
%%EXAMPLESDIR%%/node3.cfg
%%EXAMPLESDIR%%/perl-test.cfg
%%EXAMPLESDIR%%/point.cfg
%%EXAMPLESDIR%%/point2.cfg
%%EXAMPLESDIR%%/traflog.tpl
etc/fido/rntrack/test.pl
etc/fido/rntrack/tbl/alt2koi.tbl
etc/fido/rntrack/tbl/koi2alt.tbl
sbin/rntrack sbin/rntrack
man/man1/rntrack.1.gz %%PORTDOCS%%%%DOCSDIR%%/FAQ_en
%%PORTDOCS%%%%DOCSDIR%%/FAQ_ru
%%PORTDOCS%%%%DOCSDIR%%/report.err
%%PORTDOCS%%%%DOCSDIR%%/report.err.ru
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bignode.zip
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bignode2.zip
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/node.cfg
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/node1042.zip
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/node1157.zip
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/node2.cfg
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/node3.cfg
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/perl-test.cfg
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/point.cfg
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/point2.cfg
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/traflog.tpl