- Convert to new LIB_DEPENDS format

- Make use of AP_FAST_BUILD
- Support STAGEDIR
  * Make PORTDOCS and PORTEXAMPLES unconditional to stage
- Add OPTIONS_DEFINE for DOCS and EXAMPLES
- Unmute INSTALL_DATA
- Fix typo in x-generate-tarball target
- Replace tab with a single space after WWW: in pkg-descr
- Make use of @sample in pkg-plist
This commit is contained in:
TAKATSU Tomonari 2014-05-18 10:22:44 +00:00
parent 1f0c49340a
commit bd65f8a894
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=354408
3 changed files with 16 additions and 26 deletions

View File

@ -10,9 +10,10 @@ MASTER_SITE_SUBDIR= tota/${PORTNAME}
MAINTAINER= tota@FreeBSD.org
COMMENT= Amazon Auth Proxy for Product Advertising API
LIB_DEPENDS= apreq2:${PORTSDIR}/www/libapreq2
LIB_DEPENDS= libapreq2.so:${PORTSDIR}/www/libapreq2
USE_APACHE= 22
AP_FAST_BUILD= yes
CONFFILE= httpd-amazon-proxy.conf
CONFDIR= ${PREFIX}/${APACHEETCDIR}/Includes
@ -20,36 +21,27 @@ CONFDIR= ${PREFIX}/${APACHEETCDIR}/Includes
PORTDOCS= README
PORTEXAMPLES= rpaproxy.yaml
NO_STAGE= yes
OPTIONS_DEFINE= DOCS EXAMPLES
post-patch:
@${REINPLACE_CMD} -e 's|modules|${APACHEMODDIR}|' ${WRKSRC}/${CONFFILE}.sample
do-build:
@${APXS} -c ${BUILD_WRKSRC}/${PORTNAME}.c
do-install:
@${APXS} -i ${INSTALL_WRKSRC}/${PORTNAME}.la
${INSTALL_DATA} ${WRKSRC}/${CONFFILE}.sample ${CONFDIR}
@if [ ! -f ${CONFDIR}/${CONFFILE} ]; then \
${CP} -p ${CONFDIR}/${CONFFILE}.sample ${CONFDIR}/${CONFFILE}; \
fi
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${DOCSDIR}
.endif
.if !defined(NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/${PORTEXAMPLES} ${EXAMPLESDIR}
.endif
post-install:
@${MKDIR} ${STAGEDIR}${CONFDIR}
${INSTALL_DATA} ${WRKSRC}/${CONFFILE}.sample ${STAGEDIR}${CONFDIR}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${STAGEDIR}${DOCSDIR}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/${PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR}
x-generate-tarball:
${SETENV} ${FETCH_ENV} ${FETCH_BINARY} -m -o ${PORTNAME}.tar.gz \
https://github.com/machu/mod_amazon_proxy/tarball/master
target=`${TAR} -tvf ${PORTNAME}.tar.gz | head -n 1`; \
dir=`${ECHO} $${target} | ${AWK} '{print $$9}' | ${SED} -e 's|/$$||'`; \
year=`${ECHO} $${target} | ${AWK} '{print $$8}`; \
month=`${ECHO} $${target} | ${AWK} '{print $$6}`; \
day=`${ECHO} $${target} | ${AWK} '{print $$7}`; \
year=`${ECHO} $${target} | ${AWK} '{print $$8}'`; \
month=`${ECHO} $${target} | ${AWK} '{print $$6}'`; \
day=`${ECHO} $${target} | ${AWK} '{print $$7}'`; \
date=`date -j -f "%B %d %Y" "$${month} $${day} $${year}" +"%Y%m%d"`; \
${TAR} -zxf ${PORTNAME}.tar.gz; \
${RM} ${PORTNAME}.tar.gz; \

View File

@ -1,4 +1,4 @@
Authentication Proxy Server of Amazon Product Advertising API for
Apache module.
WWW: https://github.com/machu/mod_amazon_proxy
WWW: https://github.com/machu/mod_amazon_proxy

View File

@ -1,4 +1,2 @@
%%APACHEMODDIR%%/mod_amazon_proxy.so
@unexec if cmp -s %D/%%APACHEETCDIR%%/Includes/httpd-amazon-proxy.conf.sample %D/%%APACHEETCDIR%%/Includes/httpd-amazon-proxy.conf; then rm -f %D/%%APACHEETCDIR%%/Includes/httpd-amazon-proxy.conf; fi
%%APACHEETCDIR%%/Includes/httpd-amazon-proxy.conf.sample
@exec [ -f %B/%%APACHEETCDIR%%/Includes/httpd-amazon-proxy.conf ] || cp %B/%f %B/%%APACHEETCDIR%%/Includes/httpd-amazon-proxy.conf
@sample %%APACHEETCDIR%%/Includes/httpd-amazon-proxy.conf.sample