2010-09-26 13:45:13 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.9 2010/09/26 17:45:13 sebastia Exp $
|
2006-10-18 10:58:30 -04:00
|
|
|
|
2007-06-21 06:58:37 -04:00
|
|
|
COMMENT= bandwidth limiter for Apache
|
2006-10-18 10:58:30 -04:00
|
|
|
|
2007-06-21 06:58:37 -04:00
|
|
|
V= 2.1
|
2010-09-26 13:45:13 -04:00
|
|
|
REVISION= 3
|
2007-06-21 06:58:37 -04:00
|
|
|
DISTFILES= mod_bandwidth.c cleanlink.pl:0
|
2007-06-01 03:36:32 -04:00
|
|
|
DISTNAME= mod_bandwidth-${V}
|
2006-10-18 10:58:30 -04:00
|
|
|
CATEGORIES= www
|
2007-06-21 06:58:37 -04:00
|
|
|
MASTER_SITES= ftp://ftp.cohprog.com/pub/apache/module/1.3.0/ \
|
2007-10-27 19:44:41 -04:00
|
|
|
http://www.bsdfrog.org/OpenBSD/distfiles/mod_bandwidth/1.3.0/
|
2007-06-21 06:58:37 -04:00
|
|
|
MASTER_SITES0= ftp://ftp.cohprog.com/pub/apache/module/ \
|
2007-10-27 19:44:41 -04:00
|
|
|
http://www.bsdfrog.org/OpenBSD/distfiles/mod_bandwidth/
|
2006-10-18 10:58:30 -04:00
|
|
|
|
|
|
|
HOMEPAGE= http://www.cohprog.com/mod_bandwidth.html
|
|
|
|
|
|
|
|
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
|
|
|
|
|
2007-06-21 06:58:37 -04:00
|
|
|
MODULES+= apache-module
|
|
|
|
|
2006-10-18 10:58:30 -04:00
|
|
|
# Apache Group licence
|
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
|
|
|
|
|
|
|
SUBST_VARS= PKGNAME HOMEPAGE
|
2007-06-01 03:36:32 -04:00
|
|
|
DIST_SUBDIR= ${DISTNAME:S/-${V}//}
|
2006-10-18 10:58:30 -04:00
|
|
|
NO_REGRESS= Yes
|
|
|
|
|
2007-06-21 06:58:37 -04:00
|
|
|
MODAPACHE_NAME= bandwidth
|
|
|
|
|
2006-10-18 10:58:30 -04:00
|
|
|
do-extract:
|
2007-06-21 06:58:37 -04:00
|
|
|
@mkdir ${WRKSRC}
|
|
|
|
.for i in ${DISTFILES:S/:0//}
|
|
|
|
@cp ${DISTDIR}/${DIST_SUBDIR}/${i} ${WRKSRC}
|
2006-10-18 10:58:30 -04:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
do-build:
|
|
|
|
cd ${WRKSRC} && /usr/sbin/apxs -Wc,"${CFLAGS}" -c mod_bandwidth.c \
|
|
|
|
-o ${WRKBUILD}/mod_bandwidth.so
|
2007-06-21 06:58:37 -04:00
|
|
|
@perl -pi -e "s,\/usr\/local\/bin\/perl,\/usr\/bin\/perl,g" ${WRKSRC}/cleanlink.pl
|
|
|
|
@perl -pi -e "s,\/tmp\/apachebw,\/var\/www\/tmp\/apachebw,g" ${WRKSRC}/cleanlink.pl
|
|
|
|
@${MODAPACHE_CREATE_ENABLE_SCRIPT}
|
2006-10-18 10:58:30 -04:00
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mod_bandwidth
|
|
|
|
${INSTALL_SCRIPT} ${WRKBUILD}/cleanlink.pl ${PREFIX}/sbin
|
2007-06-21 06:58:37 -04:00
|
|
|
@head -378 ${WRKSRC}/mod_bandwidth.c \
|
2006-10-18 10:58:30 -04:00
|
|
|
> ${PREFIX}/share/doc/mod_bandwidth/README.mod_bandwidth
|
2007-06-21 06:58:37 -04:00
|
|
|
${MODAPACHE_INSTALL}
|
2006-10-18 10:58:30 -04:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|