aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--www/webfs/Makefile17
-rw-r--r--www/webfs/distinfo4
-rw-r--r--www/webfs/files/patch-ls.c19
-rw-r--r--www/webfs/files/patch-response.c66
-rw-r--r--www/webfs/pkg-plist2
5 files changed, 22 insertions, 86 deletions
diff --git a/www/webfs/Makefile b/www/webfs/Makefile
index 0cda50b8bc0..2bfe67bae27 100644
--- a/www/webfs/Makefile
+++ b/www/webfs/Makefile
@@ -6,15 +6,16 @@
#
PORTNAME= webfs
-PORTVERSION= 1.20
-PORTREVISION= 1
+PORTVERSION= 1.21
+PORTREVISION= 0
CATEGORIES= www ipv6
-MASTER_SITES= http://bytesex.org/misc/
-DISTNAME= ${PORTNAME}_${PORTVERSION}
+MASTER_SITES= http://dl.bytesex.org/releases/webfs/
MAINTAINER= jedgar@FreeBSD.org
COMMENT= A simple http server for static content
+RUN_DEPENDS= ${LOCALBASE}/etc/mime.types:${PORTSDIR}/misc/mime-support
+
WRKSRC= ${WRKDIR}/${DISTNAME:S/_/-/}
USE_REINPLACE= yes
USE_GMAKE= yes
@@ -25,7 +26,7 @@ MAKE_ENV= USE_SSL=no
MAKE_ENV+= LDLIBS="-lssl -lcrypto" USE_DIET=no
MAN1= webfsd.1
-MIMEFILE?= ${PREFIX}/etc/webfsd/mime.types
+MIMEFILE?= ${LOCALBASE}/etc/mime.types
.include <bsd.port.pre.mk>
@@ -42,7 +43,7 @@ pre-everything::
@${ECHO_CMD} "==========================================="
@${ECHO_CMD} ""
-do-configure:
+post-patch:
@${REINPLACE_CMD} -e 's|/etc/mime.types|${MIMEFILE}|' ${WRKSRC}/GNUmakefile
@${REINPLACE_CMD} -e 's|/etc/mime.types|${MIMEFILE}|' ${WRKSRC}/webfsd.man
.if defined(WITHOUT_OPENSSL)
@@ -52,9 +53,5 @@ do-configure:
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/webfsd ${PREFIX}/sbin
@${INSTALL_MAN} ${WRKSRC}/webfsd.man ${PREFIX}/man/man1/webfsd.1
-.if !exists(${PREFIX}/etc/webfsd/mime.types)
- @${MKDIR} ${PREFIX}/etc/webfsd
- @${ECHO_CMD} "# Insert mime types here" > ${PREFIX}/etc/webfsd/mime.types
-.endif
.include <bsd.port.post.mk>
diff --git a/www/webfs/distinfo b/www/webfs/distinfo
index 998bca59725..f9b959b202a 100644
--- a/www/webfs/distinfo
+++ b/www/webfs/distinfo
@@ -1,2 +1,2 @@
-MD5 (webfs_1.20.tar.gz) = 90c54905e4312eb45ad38d010a127208
-SIZE (webfs_1.20.tar.gz) = 50998
+MD5 (webfs-1.21.tar.gz) = 6dc125fe160479404147e7bbfc781dbc
+SIZE(webfs-1.21.tar.gz) = 44249
diff --git a/www/webfs/files/patch-ls.c b/www/webfs/files/patch-ls.c
deleted file mode 100644
index 2f50423700d..00000000000
--- a/www/webfs/files/patch-ls.c
+++ /dev/null
@@ -1,19 +0,0 @@
---- ls.c.orig Thu Oct 18 03:37:27 2001
-+++ ls.c Wed Jan 30 08:29:37 2002
-@@ -317,13 +317,13 @@
- } else if (!S_ISREG(files[i]->s.st_mode)) {
- len += sprintf(buf+len," -- ");
- } else if (files[i]->s.st_size < 1024*9) {
-- len += sprintf(buf+len,"%4ld B ",
-+ len += sprintf(buf+len,"%4lld B ",
- files[i]->s.st_size);
- } else if (files[i]->s.st_size < 1024*1024*9) {
-- len += sprintf(buf+len,"%4ld kB ",
-+ len += sprintf(buf+len,"%4lld kB ",
- files[i]->s.st_size>>10);
- } else {
-- len += sprintf(buf+len,"%4ld MB ",
-+ len += sprintf(buf+len,"%4lld MB ",
- files[i]->s.st_size>>20);
- }
-
diff --git a/www/webfs/files/patch-response.c b/www/webfs/files/patch-response.c
index 64edeb54a5f..1d4cbb383bb 100644
--- a/www/webfs/files/patch-response.c
+++ b/www/webfs/files/patch-response.c
@@ -1,53 +1,13 @@
---- response.c.orig Fri Oct 12 11:48:48 2001
-+++ response.c Wed Jan 30 08:28:59 2002
-@@ -201,12 +201,12 @@
- req->r_hlen[i] = sprintf(req->r_head+i*BR_HEADER,
- "\r\n--" BOUNDARY "\r\n"
- "Content-type: %s\r\n"
-- "Content-range: bytes %ld-%ld/%ld\r\n"
-+ "Content-range: bytes %lld-%lld/%lld\r\n"
- "\r\n",
- now, req->mime,
- req->r_start[i],req->r_end[i]-1,req->bst.st_size);
- if (debug > 1)
-- fprintf(stderr,"%03d: send range: %ld-%ld/%ld (%ld byte)\n",
-+ fprintf(stderr,"%03d: send range: %lld-%lld/%lld (%lld byte)\n",
- req->fd,
- req->r_start[i],req->r_end[i],req->bst.st_size,
- req->r_end[i]-req->r_start[i]);
-@@ -230,14 +230,14 @@
- if (req->ranges == 0) {
- req->lres += sprintf(req->hres+req->lres,
- "Content-Type: %s\r\n"
-- "Content-Length: %ld\r\n",
-+ "Content-Length: %lld\r\n",
- req->mime,
- req->body ? req->lbody : req->bst.st_size);
- } else if (req->ranges == 1) {
- req->lres += sprintf(req->hres+req->lres,
- "Content-Type: %s\r\n"
-- "Content-Range: bytes %ld-%ld/%ld\r\n"
-- "Content-Length: %ld\r\n",
-+ "Content-Range: bytes %lld-%lld/%lld\r\n"
-+ "Content-Length: %lld\r\n",
- req->mime,
- req->r_start[0],req->r_end[0]-1,req->bst.st_size,
- req->r_end[0]-req->r_start[0]);
-@@ -253,7 +253,7 @@
- req->lres += sprintf(req->hres+req->lres,
- "Content-Type: multipart/byteranges;"
- " boundary=" BOUNDARY "\r\n"
-- "Content-Length: %ld\r\n",
-+ "Content-Length: %lld\r\n",
- now,len);
- }
- if (mtime != -1) {
-@@ -388,7 +388,7 @@
- return;
- default:
- if (debug > 1)
-- fprintf(stderr,"%03d: %ld/%ld (%ld%%)\r",req->fd,
-+ fprintf(stderr,"%03d: %lld/%lld (%lld%%)\r",req->fd,
- req->written,req->bst.st_size,
- req->written*100/req->bst.st_size);
- req->written += rc;
+--- response.c.orig Thu Jun 10 11:45:50 2004
++++ response.c Sat May 7 14:16:57 2005
+@@ -17,6 +17,10 @@
+
+ #include "httpd.h"
+
++#ifndef PRId64
++# define PRId64 "lld"
++#endif
++
+ /* ---------------------------------------------------------------------- */
+ /* os-specific sendfile() wrapper */
+
diff --git a/www/webfs/pkg-plist b/www/webfs/pkg-plist
index d4b52dd4862..1fbb2242d9c 100644
--- a/www/webfs/pkg-plist
+++ b/www/webfs/pkg-plist
@@ -1,3 +1 @@
-etc/webfsd/mime.types
sbin/webfsd
-@dirrm etc/webfsd