aboutsummaryrefslogtreecommitdiff
path: root/www/mod_amazon_proxy
diff options
context:
space:
mode:
authorTAKATSU Tomonari <tota@FreeBSD.org>2011-09-24 05:23:57 +0000
committerTAKATSU Tomonari <tota@FreeBSD.org>2011-09-24 05:23:57 +0000
commita5258bc007b08d73c9923b746971d5c2abf33fed (patch)
tree2a2f4de302df3894bc099aa1c63f897542c3c68a /www/mod_amazon_proxy
parent291b1e2fc3be77216ef33524f11a3338f18e72e9 (diff)
downloadports-a5258bc007b08d73c9923b746971d5c2abf33fed.tar.gz
ports-a5258bc007b08d73c9923b746971d5c2abf33fed.zip
- Add a new port: www/mod_amazon_proxy
Authentication Proxy Server of Amazon Product Advertising API for Apache module. WWW: https://github.com/machu/mod_amazon_proxy
Notes
Notes: svn path=/head/; revision=282294
Diffstat (limited to 'www/mod_amazon_proxy')
-rw-r--r--www/mod_amazon_proxy/Makefile65
-rw-r--r--www/mod_amazon_proxy/distinfo2
-rw-r--r--www/mod_amazon_proxy/pkg-descr4
-rw-r--r--www/mod_amazon_proxy/pkg-plist4
4 files changed, 75 insertions, 0 deletions
diff --git a/www/mod_amazon_proxy/Makefile b/www/mod_amazon_proxy/Makefile
new file mode 100644
index 000000000000..acfc273760c5
--- /dev/null
+++ b/www/mod_amazon_proxy/Makefile
@@ -0,0 +1,65 @@
+# New ports collection makefile for: mod_amazon_proxy
+# Date created: 2011-09-24
+# Whom: TAKATSU Tomonari <tota@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= mod_amazon_proxy
+PORTVERSION= 20100913
+CATEGORIES= www
+MASTER_SITES= LOCAL
+MASTER_SITE_SUBDIR= tota/${PORTNAME}
+
+MAINTAINER= tota@FreeBSD.org
+COMMENT= Amazon Auth Proxy for Product Advertising API
+
+LIB_DEPENDS= apreq2:${PORTSDIR}/www/libapreq2
+
+USE_APACHE= 22+
+
+CONFFILE= httpd-amazon-proxy.conf
+CONFDIR= ${PREFIX}/${APACHEETCDIR}/Includes
+
+PORTDOCS= README
+PORTEXAMPLES= rpaproxy.yaml
+
+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
+
+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}`; \
+ date=`date -j -f "%B %d %Y" "$${month} $${day} $${year}" +"%Y%m%d"`; \
+ ${TAR} -zxf ${PORTNAME}.tar.gz; \
+ ${RM} ${PORTNAME}.tar.gz; \
+ ${RM} $${dir}/Makefile; \
+ ${RM} $${dir}/modules.mk; \
+ ${MV} $${dir} ${PORTNAME}-$${date}; \
+ ${TAR} -zcf ${PORTNAME}-$${date}.tar.gz ${PORTNAME}-$${date}; \
+ ${RM} -r ${PORTNAME}-$${date}
+
+.include <bsd.port.mk>
diff --git a/www/mod_amazon_proxy/distinfo b/www/mod_amazon_proxy/distinfo
new file mode 100644
index 000000000000..14d2f5b73eeb
--- /dev/null
+++ b/www/mod_amazon_proxy/distinfo
@@ -0,0 +1,2 @@
+SHA256 (mod_amazon_proxy-20100913.tar.gz) = a6fd29b12b8e3c6faccad90fbdc4252fbfb142f5f93e39a6fcc2e0607bca9b32
+SIZE (mod_amazon_proxy-20100913.tar.gz) = 3106
diff --git a/www/mod_amazon_proxy/pkg-descr b/www/mod_amazon_proxy/pkg-descr
new file mode 100644
index 000000000000..870387603492
--- /dev/null
+++ b/www/mod_amazon_proxy/pkg-descr
@@ -0,0 +1,4 @@
+Authentication Proxy Server of Amazon Product Advertising API for
+Apache module.
+
+WWW: https://github.com/machu/mod_amazon_proxy
diff --git a/www/mod_amazon_proxy/pkg-plist b/www/mod_amazon_proxy/pkg-plist
new file mode 100644
index 000000000000..5c1bad985fba
--- /dev/null
+++ b/www/mod_amazon_proxy/pkg-plist
@@ -0,0 +1,4 @@
+%%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