mirror of
https://git.FreeBSD.org/ports.git
synced 2025-02-02 11:09:29 +00:00
- Respect DOCSDIR for additional documents
- Install files into PREFIX/lib/PORTNAME - Handle configuration files according to Porter's Handbook - Improve rc.d script - BRANDELF where necessary Suggessted by: acm Submitted by: Alexander Logvinov <ports@logvinov.com> (maintainer)
This commit is contained in:
parent
98c4d86901
commit
2c113acf30
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=179994
@ -6,6 +6,7 @@
|
||||
|
||||
PORTNAME= ${MTANAME:L}
|
||||
PORTVERSION= 0.5
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= games linux
|
||||
MASTER_SITES= http://files.gonnaplay.com/201/:main \
|
||||
http://www.trancevibez.com/mta/:both \
|
||||
@ -22,23 +23,43 @@ NO_WRKSUBDIR= yes
|
||||
|
||||
USE_RC_SUBR= mtad
|
||||
MTANAME= MTAServer
|
||||
FILES= CHANGELOG LICENSE ${PORTNAME} README banned.lst ${PORTNAME}.conf.dist
|
||||
PLIST_SUB= MTADIR="${PORTNAME}"
|
||||
MTADIR= ${PREFIX}/lib/${PORTNAME}
|
||||
PORTDOCS= CHANGELOG LICENSE README
|
||||
PLIST_SUB= MTADIR=${MTADIR:S,^${PREFIX}/,,} MTADIRE=${PORTNAME}
|
||||
SUB_FILES= pkg-message
|
||||
SUB_LIST= MTADIR="${PREFIX}/${PORTNAME}"
|
||||
SUB_LIST= MTADIR=${MTADIR} MTADIRE=${PORTNAME}
|
||||
.if !defined(NOPORTDOCS)
|
||||
SUB_LIST+= NOTEWORK="Read ${DOCSDIR}/README for details"
|
||||
.else
|
||||
SUB_LIST+= NOTEWORK=""
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
post-extract:
|
||||
@${MV} ${WRKSRC}/${MTANAME} ${WRKSRC}/${PORTNAME}
|
||||
@${CHMOD} 600 ${WRKSRC}/${PORTNAME}.conf
|
||||
|
||||
post-patch:
|
||||
@${MV} ${WRKSRC}/${MTANAME} ${WRKSRC}/${PORTNAME}
|
||||
@${MV} ${WRKSRC}/${PORTNAME}.conf ${WRKSRC}/${PORTNAME}.conf.dist
|
||||
@${CHMOD} 600 ${WRKSRC}/${PORTNAME}.conf.dist
|
||||
@${REINPLACE_CMD} "s|banned.lst|${PREFIX}/etc/${PORTNAME}/banned.lst|" ${WRKSRC}/${PORTNAME}.conf
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${PREFIX}/${PORTNAME}
|
||||
.for i in ${FILES}
|
||||
@${CP} -p ${WRKSRC}/${i} ${PREFIX}/${PORTNAME}/${i}
|
||||
${MKDIR} ${MTADIR}
|
||||
${BRANDELF} -t Linux ${WRKSRC}/${PORTNAME}
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${MTADIR}
|
||||
${MKDIR} ${PREFIX}/etc/${PORTNAME}
|
||||
.if !exists(${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf)
|
||||
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}
|
||||
.endif
|
||||
${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf.dist
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
.for i in ${PORTDOCS}
|
||||
${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -19,10 +19,12 @@ load_rc_config $name
|
||||
|
||||
: ${mtad_enable="NO"}
|
||||
: ${mtad_chdir="%%MTADIR%%"}
|
||||
: ${mtad_config="%%PREFIX%%/etc/%%MTADIRE%%/mtaserver.conf"}
|
||||
: ${mtad_logfile="/var/log/mtaserver.log"}
|
||||
|
||||
command="%%MTADIR%%/mtaserver"
|
||||
command_args="-b 2>&1 > /dev/null &"
|
||||
required_files="%%MTADIR%%/mtaserver.conf"
|
||||
command_args="-b -c ${mtad_config} -l ${mtad_logfile} 2>&1 > /dev/null &"
|
||||
required_files=${mtad_config}
|
||||
start_precmd="mtad_prestart"
|
||||
stop_precmd="mtad_prestop"
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
***********************************************************************
|
||||
# cp %%MTADIR%%/mtaserver.conf.dist \
|
||||
%%MTADIR%%/mtaserver.conf
|
||||
|
||||
Read %%MTADIR%%/README for details
|
||||
Edit %%PREFIX%%/etc/%%MTADIRE%%/mtaserver.conf before using
|
||||
%%NOTEWORK%%
|
||||
***********************************************************************
|
||||
|
@ -1,8 +1,6 @@
|
||||
@unexec if cmp -s %D/%%MTADIR%%/mtaserver.conf %D/%%MTADIR%%/mtaserver.conf.dist; then rm -f %D/%%MTADIR%%/mtaserver.conf; fi
|
||||
%%MTADIR%%/CHANGELOG
|
||||
%%MTADIR%%/LICENSE
|
||||
@unexec if cmp -s %D/etc/%%MTADIRE%%/mtaserver.conf %D/etc/%%MTADIRE%%/mtaserver.conf.dist; then rm -f %D/etc/%%MTADIRE%%/mtaserver.conf; fi
|
||||
%%MTADIR%%/mtaserver
|
||||
%%MTADIR%%/README
|
||||
%%MTADIR%%/banned.lst
|
||||
%%MTADIR%%/mtaserver.conf.dist
|
||||
etc/%%MTADIRE%%/mtaserver.conf.dist
|
||||
@exec [ -f %B/mtaserver.conf ] || cp %B/%f %B/mtaserver.conf
|
||||
@dirrmtry %%MTADIR%%
|
||||
@dirrmtry etc/%%MTADIRE%%
|
||||
|
Loading…
x
Reference in New Issue
Block a user