diff options
author | bms <bms@FreeBSD.org> | 2004-01-03 14:28:36 +0800 |
---|---|---|
committer | bms <bms@FreeBSD.org> | 2004-01-03 14:28:36 +0800 |
commit | 12c2bc5660f2be404a976f6ccd0c7e53e0c50a4c (patch) | |
tree | 8ab416a8111e5b2cf67793d42b0b615999f77e25 /net/nocatsplash | |
parent | fd963a5357d4de41c3f7b7f3197b0931bf6a856b (diff) | |
download | freebsd-ports-gnome-12c2bc5660f2be404a976f6ccd0c7e53e0c50a4c.tar.gz freebsd-ports-gnome-12c2bc5660f2be404a976f6ccd0c7e53e0c50a4c.tar.zst freebsd-ports-gnome-12c2bc5660f2be404a976f6ccd0c7e53e0c50a4c.zip |
Rename NoCatSplash to nocatsplash from rev 1.1.
Add IGNORE line for OSVERSION < 500000 due to security/pf dependency.
Requested by: kris
Diffstat (limited to 'net/nocatsplash')
-rw-r--r-- | net/nocatsplash/Makefile | 46 | ||||
-rw-r--r-- | net/nocatsplash/distinfo | 1 | ||||
-rw-r--r-- | net/nocatsplash/files/patch-src::http.c | 35 | ||||
-rw-r--r-- | net/nocatsplash/files/patch-src::splashd.c | 15 | ||||
-rw-r--r-- | net/nocatsplash/pkg-descr | 9 | ||||
-rw-r--r-- | net/nocatsplash/pkg-install | 36 | ||||
-rw-r--r-- | net/nocatsplash/pkg-plist | 18 |
7 files changed, 160 insertions, 0 deletions
diff --git a/net/nocatsplash/Makefile b/net/nocatsplash/Makefile new file mode 100644 index 000000000000..6fb8583824d1 --- /dev/null +++ b/net/nocatsplash/Makefile @@ -0,0 +1,46 @@ +# New ports collection makefile for: NoCatSplash +# Date created: 19 November 2003 +# Whom: Bruce M Simpson <bms@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= nocatsplash +PORTVERSION= 0.82 +CATEGORIES= net +MASTER_SITES= http://nocat.net/download/NoCatSplash/ +DISTNAME= NoCatSplash-nightly +EXTRACT_SUFX= .tgz + +MAINTAINER= bms@FreeBSD.org +COMMENT= Open 802.11 Splash Screen + +BUILD_DEPENDS= \ + ${LOCALBASE}/sbin/pfctl:${PORTSDIR}/security/pf +RUN_DEPENDS= \ + ${LOCALBASE}/sbin/pfctl:${PORTSDIR}/security/pf + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500000 +IGNORE= Requires 5.x or later for pf(4) firewall support +.endif + +CONFLICTS= nocatauth-server-* + +GNU_CONFIGURE= yes +USE_GMAKE= yes +USE_GNOME= glib12 + +CONFIGURE_ARGS+= --disable-dependency-tracking +CONFIGURE_ARGS+= --disable-glibtest +CONFIGURE_ARGS+= --with-firewall=pfctl +CONFIGURE_ARGS+= --with-ghttpd +.if defined(AUTHMODE) +CONFIGURE_ARGS+= --with-mode=${AUTHMODE} +.endif +.if defined(DOCROOT) +CONFIGURE_ARGS+= --with-docroot=${DOCROOT} +.endif + +.include <bsd.port.post.mk> diff --git a/net/nocatsplash/distinfo b/net/nocatsplash/distinfo new file mode 100644 index 000000000000..e3005a886df1 --- /dev/null +++ b/net/nocatsplash/distinfo @@ -0,0 +1 @@ +MD5 (NoCatSplash-nightly.tgz) = 43516d61ef740616cee961bec6b926fa diff --git a/net/nocatsplash/files/patch-src::http.c b/net/nocatsplash/files/patch-src::http.c new file mode 100644 index 000000000000..fe05e81b9ac9 --- /dev/null +++ b/net/nocatsplash/files/patch-src::http.c @@ -0,0 +1,35 @@ +--- src/http.c.orig Wed Nov 19 16:26:07 2003 ++++ src/http.c Wed Nov 19 16:29:22 2003 +@@ -1,8 +1,10 @@ +-# include <glib.h> +-# include <fcntl.h> +-# include <sys/stat.h> ++# include <sys/param.h> + # include <sys/types.h> ++# include <sys/stat.h> + # include <sys/socket.h> ++# include <netinet/in.h> ++# include <glib.h> ++# include <fcntl.h> + # include <arpa/inet.h> + # include <unistd.h> + # include <errno.h> +@@ -17,9 +19,6 @@ + # define BUF_SIZ 16384 + # endif + +-// not portable, apparently +-# include <sys/sendfile.h> +- + GIOChannel *http_bind_socket( const char *ip, int port, int queue ) { + struct sockaddr_in addr; + int fd, r, n = 1; +@@ -354,7 +353,7 @@ + return -1; + } + +- r = sendfile( out_fd, in_fd, &len, s.st_size ); ++ r = sendfile(in_fd, out_fd, 0, s.st_size, NULL, &len, 0); + if (r == -1) { + g_warning("http_sendfile send: %m"); + return -1; diff --git a/net/nocatsplash/files/patch-src::splashd.c b/net/nocatsplash/files/patch-src::splashd.c new file mode 100644 index 000000000000..a08519c35cff --- /dev/null +++ b/net/nocatsplash/files/patch-src::splashd.c @@ -0,0 +1,15 @@ +--- src/splashd.c.orig Wed Nov 19 16:29:47 2003 ++++ src/splashd.c Wed Nov 19 16:30:28 2003 +@@ -1,7 +1,10 @@ ++# include <sys/param.h> ++# include <sys/types.h> ++# include <sys/socket.h> ++# include <netinet/in.h> ++# include <pthread.h> + # include <glib.h> + # include <stdio.h> +-# include <netinet/in.h> +-# include <sys/socket.h> + # include <signal.h> + # include <string.h> + # include <time.h> diff --git a/net/nocatsplash/pkg-descr b/net/nocatsplash/pkg-descr new file mode 100644 index 000000000000..eb7bbd50b5d1 --- /dev/null +++ b/net/nocatsplash/pkg-descr @@ -0,0 +1,9 @@ +NoCatSplash is a Open Public Network Gateway Daemon. It performs as a +[captive/open/active] portal. When run on a gateway/router on a network, +all web requests are redirected until the client either logs in or clicks +"I Accept" to an AUP. The gateway daemon then changes the firewall rules +on the gateway to pass traffic for that client (based on IP address and +MAC address). + +Bruce +bms@FreeBSD.org diff --git a/net/nocatsplash/pkg-install b/net/nocatsplash/pkg-install new file mode 100644 index 000000000000..638abfcf5c50 --- /dev/null +++ b/net/nocatsplash/pkg-install @@ -0,0 +1,36 @@ +#!/bin/sh + +PATH=/bin:/usr/sbin + +if [ -z "${WRAP_USER}" ]; then + WRAP_USER=nocat +fi + +case $2 in + PRE-INSTALL) + UID=181 + GID=${UID} + if [ ! -d "${NOCAT_DIR}" ]; then + mkdir -p ${NOCAT_DIR} + fi + if pw user show "${WRAP_USER}" 2>/dev/null; then + echo "You already have a user \"${WRAP_USER}\", so I will use it." + if pw usermod ${WRAP_USER} -d ${NOCAT_DIR} + then + echo "Changed home directory of \"${WRAP_USER}\" to \"${NOCAT_DIR}\"" + else + "${NOCAT_DIR}\" failed..." + exit 1 + fi + else + if pw useradd ${WRAP_USER} -u ${UID} \ + -d ${NOCAT_DIR} -s /sbin/nologin -c "NoCat Daemon" + then + echo "Added user \"${WRAP_USER}\"." + else + echo "Adding user \"${WRAP_USER}\" failed..." + exit 1 + fi + fi + ;; +esac diff --git a/net/nocatsplash/pkg-plist b/net/nocatsplash/pkg-plist new file mode 100644 index 000000000000..95f4b35a4a4a --- /dev/null +++ b/net/nocatsplash/pkg-plist @@ -0,0 +1,18 @@ +share/nocat/htdocs/test.html +share/nocat/htdocs/status.html +share/nocat/htdocs/splash.html +share/nocat/htdocs/images/update.gif +share/nocat/htdocs/images/skip.gif +share/nocat/htdocs/images/reset.gif +share/nocat/htdocs/images/register.gif +share/nocat/htdocs/images/logout.gif +share/nocat/htdocs/images/login.gif +share/nocat/htdocs/images/continue.gif +share/nocat/htdocs/images/auth_logo.gif +@dirrm share/nocat/htdocs/images +@dirrm share/nocat/htdocs +@dirrm share/nocat +sbin/splashd +sbin/ghttpd +@dirrm libexec/nocat +etc/nocat.conf |