mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-03 06:04:53 +00:00
0837d85946
- automatically adjust files via SUB_FILES instead of invoking sed - support NOPORTDOCS & NOPORTDATA - use DOCSDIR & DATADIR instead of using ${PREFIX}/share/listmanager PR: ports/142734 Submitted by: Sevan Janiyan <venture37@geeklan.co.uk> Approved by: maintainer timeout (gshapiro ; 233 days)
40 lines
930 B
Bash
40 lines
930 B
Bash
#!/bin/sh
|
|
|
|
CHMOD=/bin/chmod
|
|
CP=/bin/cp
|
|
MKDIR="/bin/mkdir -p"
|
|
TOUCH=/usr/bin/touch
|
|
|
|
LISTMGR_HOME=%%LISTMANAGER_HOME%%
|
|
PREFIX=%%PREFIX%%
|
|
|
|
SUBDIRS="archives backup db files lists responses storage tmp"
|
|
|
|
if [ ! -d ${LISTMGR_HOME} ]; then
|
|
${MKDIR} ${LISTMGR_HOME}
|
|
${CHMOD} 0751 ${LISTMGR_HOME}
|
|
fi
|
|
|
|
for dir in ${SUBDIRS}; do
|
|
if [ ! -d ${LISTMGR_HOME}/${dir} ]; then
|
|
${MKDIR} ${LISTMGR_HOME}/${dir}
|
|
${CHMOD} 0750 ${LISTMGR_HOME}/${dir}
|
|
fi
|
|
done
|
|
${CHMOD} 0751 ${LISTMGR_HOME}/lists
|
|
|
|
if [ ! -e ${LISTMGR_HOME}/ignore ]; then
|
|
${TOUCH} ${LISTMGR_HOME}/ignore
|
|
${CHMOD} 0640 ${LISTMGR_HOME}/ignore
|
|
fi
|
|
|
|
if [ ! -e ${LISTMGR_HOME}/responses/ack ]; then
|
|
${CP} ${PREFIX}/share/listmanager/ack ${LISTMGR_HOME}/responses/ack
|
|
${CHMOD} 0640 ${LISTMGR_HOME}/responses/ack
|
|
fi
|
|
|
|
if [ ! -e ${PREFIX}/etc/listmanager.cf ]; then
|
|
${CP} ${PREFIX}/etc/listmanager.cf.sample ${PREFIX}/etc/listmanager.cf
|
|
${CHMOD} 0644 ${PREFIX}/etc/listmanager.cf
|
|
fi
|