freebsd-ports/finance/sql-ledger/Makefile
Muhammad Moinur Rahman 57eb3deeef finance/sql-ledger: Update version 3.2.5=>3.2.6
- Fix script installation as executable [1]

PR:		220545 [1]
Submitted by:	frankenbox@live.com [1]
Relnotes:	http://www.sql-ledger.org/cgi-bin/nav.pl?page=misc/whatsnew.html&title=What%27s%20New
2018-01-08 21:25:33 +00:00

66 lines
2.1 KiB
Makefile

# Created by: lth@FreeBSD.org
# $FreeBSD$
PORTNAME= sql-ledger
PORTVERSION= 3.2.6
CATEGORIES= finance perl5
MASTER_SITES= http://www.sql-ledger.com/source/
MAINTAINER= bofh@FreeBSD.org
COMMENT= Double entry accounting system
LICENSE= GPLv2
BUILD_DEPENDS= p5-DBD-Pg>=0:databases/p5-DBD-Pg
RUN_DEPENDS:= ${BUILD_DEPENDS}
NO_BUILD= yes
WRKSRC= ${WRKDIR}/${PORTNAME}
SUB_FILES= pkg-message sql-ledger-httpd.conf
USES= perl5 pgsql shebangfix
SHEBANG_FILES= *.pl locale/*/*.pl bin/*/*.pl
NO_ARCH= yes
USE_APACHE_RUN= 22+
ROOT_DIRS= SL bin css doc images js locale spool sql templates users
ROOT_FILES= VERSION favicon.ico index.html menu.ini
ROOT_SCRIPTS= admin.pl am.pl ap.pl ar.pl bp.pl ca.pl cp.pl ct.pl gl.pl hr.pl \
ic.pl im.pl ir.pl is.pl jc.pl login.pl menu.pl oe.pl pe.pl ps.pl \
rc.pl rd.pl rp.pl setup.pl sm.pl vr.pl
.include <bsd.port.pre.mk>
do-install:
.if ${APACHE_VERSION:M24}
@${REINPLACE_CMD} -e '/Order/d' \
-e 's/Deny from All/Require all denied/g' \
-e 's/Allow from All/Require all granted/g' \
${WRKDIR}/sql-ledger-httpd.conf
.endif
${INSTALL_DATA} ${WRKDIR}/sql-ledger-httpd.conf ${STAGEDIR}${PREFIX}/etc/
@${MKDIR} ${STAGEDIR}/${WWWDIR}
.for dir in ${ROOT_DIRS}
@${MKDIR} ${STAGEDIR}/${WWWDIR}/${dir}
@cd ${WRKSRC}/${dir} && ${COPYTREE_SHARE} . ${STAGEDIR}/${WWWDIR}/${dir}
.endfor
.for f in ${ROOT_FILES}
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}/${WWWDIR}
.endfor
.for f in ${ROOT_SCRIPTS}
${INSTALL_SCRIPT} ${WRKSRC}/${f} ${STAGEDIR}/${WWWDIR}
.endfor
post-install:
@${ECHO_CMD} "@owner ${WWWOWN}" >> ${TMPPLIST}
@${ECHO_CMD} "@group ${WWWGRP}" >> ${TMPPLIST}
@${FIND} -s ${STAGEDIR}${WWWDIR} -not -type d | ${SORT} | \
${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}
@${FIND} -s ${STAGEDIR}${WWWDIR} -type d | \
${SED} -e 's#^${STAGEDIR}#@dir #' >> ${TMPPLIST}
${INSTALL_DATA} ${WRKSRC}/sql-ledger.conf.default \
${STAGEDIR}/${WWWDIR}/sql-ledger.conf.sample
@${ECHO} @sample ${WWWDIR}/sql-ledger.conf.sample >> ${TMPPLIST}
@${ECHO_CMD} "etc/sql-ledger-httpd.conf" >> ${TMPPLIST}
@${ECHO_CMD} "@group" >> ${TMPPLIST}
@${ECHO_CMD} "@owner" >> ${TMPPLIST}
.include <bsd.port.post.mk>