aboutsummaryrefslogtreecommitdiffstats
path: root/net/qadsl
diff options
context:
space:
mode:
authorvs <vs@FreeBSD.org>2005-04-14 17:26:15 +0800
committervs <vs@FreeBSD.org>2005-04-14 17:26:15 +0800
commit21251c421cd2e2ebbab1309c8b52e7bc46c07976 (patch)
treeda91f014db150d05cbfa86cf965284ba27ba32ff /net/qadsl
parent1e77b6b8849cc3e32b466681c0b08e208e896096 (diff)
downloadfreebsd-ports-gnome-21251c421cd2e2ebbab1309c8b52e7bc46c07976.tar.gz
freebsd-ports-gnome-21251c421cd2e2ebbab1309c8b52e7bc46c07976.tar.zst
freebsd-ports-gnome-21251c421cd2e2ebbab1309c8b52e7bc46c07976.zip
- Update to 1.3.3
- Revamp packaging (me) PR: ports/71604 Submitted by: Fredrik Lindberg Approved by: maintainer timeout
Diffstat (limited to 'net/qadsl')
-rw-r--r--net/qadsl/Makefile27
-rw-r--r--net/qadsl/distinfo4
-rw-r--r--net/qadsl/files/patch-Makefile51
-rw-r--r--net/qadsl/files/patch-etc::Makefile.in21
-rw-r--r--net/qadsl/files/patch-func.c17
-rw-r--r--net/qadsl/files/patch-main.c19
-rw-r--r--net/qadsl/files/patch-man::qadsl.836
-rw-r--r--net/qadsl/files/patch-man::qadsl.conf.519
-rw-r--r--net/qadsl/files/patch-qadsl.sh26
-rw-r--r--net/qadsl/files/patch-src::http.c53
-rw-r--r--net/qadsl/files/patch-src::lock.c44
-rw-r--r--net/qadsl/files/patch-src::log.c38
-rw-r--r--net/qadsl/files/pkg-message.in19
-rw-r--r--net/qadsl/files/qadsl.sh.in37
-rw-r--r--net/qadsl/pkg-descr11
-rw-r--r--net/qadsl/pkg-message7
-rw-r--r--net/qadsl/pkg-plist3
17 files changed, 295 insertions, 137 deletions
diff --git a/net/qadsl/Makefile b/net/qadsl/Makefile
index c1097e64f378..af66e4ad70dd 100644
--- a/net/qadsl/Makefile
+++ b/net/qadsl/Makefile
@@ -6,18 +6,33 @@
#
PORTNAME= qadsl
-PORTVERSION= 1.2
+PORTVERSION= 1.3.3
CATEGORIES= net
-MASTER_SITES= http://kuba.unix.se/code/qadsl/
-DISTNAME= qadsl-final-${PORTVERSION}
+MASTER_SITES= http://savannah.gnu.org/download/alive/
+DISTNAME= qadsl-${PORTVERSION}
MAINTAINER= arlu@telia.com
-COMMENT= Auto login/Keep-alive for Telia AB ADSL and COMHEM Cable internet
+COMMENT= Auto login/Keep-alive for Telia AB ADSL, COMHEM Cable and Tiscali Internet
+
+USE_RC_SUBR= qadsl.sh
+SUB_FILES= pkg-message
+PKGMESSAGE= ${WRKDIR}/pkg-message
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= \
+ --with-global-cfg=${PREFIX}/etc/qadsl.conf \
+ --with-pidfile=/var/run/qadsl.pid
MAN8= qadsl.8
-MANCOMPRESSED= yes
+MAN5= qadsl.conf.5
+INFO= qadsl
+PLIST_FILES= sbin/qadsl etc/qadsl.conf.sample
+
+post-extract:
+ @${CAT} ${WRKSRC}/etc/qadsl.conf > ${WRKSRC}/etc/qadsl.conf.sample
post-install:
- @${SED} -e 's,%%PREFIX%%,${PREFIX},g' ${PKGMESSAGE}
+ ${INSTALL_SCRIPT} ${WRKDIR}/qadsl.sh ${PREFIX}/etc/rc.d/qadsl.sh
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/net/qadsl/distinfo b/net/qadsl/distinfo
index 5a4d544e5144..26db2c3b2ea7 100644
--- a/net/qadsl/distinfo
+++ b/net/qadsl/distinfo
@@ -1,2 +1,2 @@
-MD5 (qadsl-final-1.2.tar.gz) = 42e25b2a6016ff6d5ffa4f9707ac4614
-SIZE (qadsl-final-1.2.tar.gz) = 12208
+MD5 (qadsl-1.3.3.tar.gz) = 68657b0c0c35ee700bdf353508a5cb1d
+SIZE (qadsl-1.3.3.tar.gz) = 275860
diff --git a/net/qadsl/files/patch-Makefile b/net/qadsl/files/patch-Makefile
deleted file mode 100644
index 385e5084a37d..000000000000
--- a/net/qadsl/files/patch-Makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-*** Makefile.orig Thu Dec 13 21:31:26 2001
---- Makefile Thu Dec 13 22:20:45 2001
-***************
-*** 5,28 ****
- MACRO=__OpenBSD__
- OBJS=main.o netfunc.o conf.o func.o
- SRC=main.c netfunc.c conf.c func.c
-! CPATH=/etc/
-! INSTALL=/usr/local/sbin/
-! MANPATH=/usr/local/man/man8/
-
- all:${PROG}
-
- ${PROG}:
-! ${CC} -c ${SRC}
-! ${CC} -o ${PROG} ${OBJS}
-!
-! bsd:
-! ${CC} -D${MACRO} -c ${SRC}
- ${CC} -o ${PROG} ${OBJS}
-
- clean:
- rm -fr ${PROG} ${OBJS}
-
- install:
-! cp ${PROG} ${INSTALL}
-! cp ${CONF} ${CPATH}
- cp qadsl.8.gz ${MANPATH}
---- 5,26 ----
- MACRO=__OpenBSD__
- OBJS=main.o netfunc.o conf.o func.o
- SRC=main.c netfunc.c conf.c func.c
-! CPATH=${PREFIX}/etc/
-! INSTALL=${PREFIX}/sbin/
-! RC=${PREFIX}/etc/rc.d/
-! MANPATH=${PREFIX}/man/man8/
-
- all:${PROG}
-
- ${PROG}:
-! ${CC} -D${MACRO} -DCONF=\"${CPATH}/${CONF}\" -c ${SRC}
- ${CC} -o ${PROG} ${OBJS}
-
- clean:
- rm -fr ${PROG} ${OBJS}
-
- install:
-! install ${PROG} ${INSTALL}
-! cp ${CONF} ${CPATH}/${CONF}.sample
- cp qadsl.8.gz ${MANPATH}
-+ cp qadsl.sh ${RC}
diff --git a/net/qadsl/files/patch-etc::Makefile.in b/net/qadsl/files/patch-etc::Makefile.in
new file mode 100644
index 000000000000..e7759548c1b7
--- /dev/null
+++ b/net/qadsl/files/patch-etc::Makefile.in
@@ -0,0 +1,21 @@
+*** etc.orig/Makefile.in Sat Sep 11 19:01:40 2004
+--- etc/Makefile.in Sat Sep 11 19:01:59 2004
+***************
+*** 134,141 ****
+ sharedstatedir = @sharedstatedir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+! sysconf_DATA = qadsl.conf
+! EXTRA_DIST = qadsl.conf
+ all: all-am
+
+ .SUFFIXES:
+--- 134,141 ----
+ sharedstatedir = @sharedstatedir@
+ sysconfdir = @sysconfdir@
+ target_alias = @target_alias@
+! sysconf_DATA = qadsl.conf.sample
+! EXTRA_DIST = qadsl.conf.sample
+ all: all-am
+
+ .SUFFIXES:
diff --git a/net/qadsl/files/patch-func.c b/net/qadsl/files/patch-func.c
deleted file mode 100644
index 4600c7b04d59..000000000000
--- a/net/qadsl/files/patch-func.c
+++ /dev/null
@@ -1,17 +0,0 @@
-*** func.c.orig Thu Dec 13 21:45:53 2001
---- func.c Thu Dec 13 21:47:55 2001
-***************
-*** 48,53 ****
-
- void usage(char *argv) {
- printf("Usage: %s [ -h ] [ -c file ] [ -l ] [ -o ]\n", argv);
-! printf("\t-h\t\tPrint this message\n\t-c file\t\tUse settings from file instead of /etc/qadsl.conf\n\t"
- "-l\t\tWill try to login\n\t-o\t\tWill try to logout\n");
- }
---- 48,53 ----
-
- void usage(char *argv) {
- printf("Usage: %s [ -h ] [ -c file ] [ -l ] [ -o ]\n", argv);
-! printf("\t-h\t\tPrint this message\n\t-c file\t\tUse settings from file instead of " CONF "\n\t"
- "-l\t\tWill try to login\n\t-o\t\tWill try to logout\n");
- }
diff --git a/net/qadsl/files/patch-main.c b/net/qadsl/files/patch-main.c
deleted file mode 100644
index f4d65e192b0c..000000000000
--- a/net/qadsl/files/patch-main.c
+++ /dev/null
@@ -1,19 +0,0 @@
-*** main.c.orig Thu Dec 13 21:41:36 2001
---- main.c Thu Dec 13 21:47:38 2001
-***************
-*** 32,38 ****
- char send_msg[MAXDATASIZE], get_msg[MAXDATASIZE];
- char user[MAXLEN], pass[MAXLEN], serv[MAXLEN], deamon_s[MAXLEN], deamon_t[MAXLEN], deamon_d[MAXLEN];
-
-! char *conf="/etc/qadsl.conf";
-
- int main(int argc, char *argv[])
- {
---- 32,38 ----
- char send_msg[MAXDATASIZE], get_msg[MAXDATASIZE];
- char user[MAXLEN], pass[MAXLEN], serv[MAXLEN], deamon_s[MAXLEN], deamon_t[MAXLEN], deamon_d[MAXLEN];
-
-! char *conf= CONF;
-
- int main(int argc, char *argv[])
- {
diff --git a/net/qadsl/files/patch-man::qadsl.8 b/net/qadsl/files/patch-man::qadsl.8
new file mode 100644
index 000000000000..6b9a278099c6
--- /dev/null
+++ b/net/qadsl/files/patch-man::qadsl.8
@@ -0,0 +1,36 @@
+*** man/qadsl.8.orig Mon Jun 28 23:24:05 2004
+--- man/qadsl.8 Sat Sep 11 17:38:11 2004
+***************
+*** 59,65 ****
+ Use settings from
+ .I file
+ insted of default
+! .I /etc/qadsl.conf
+ or
+ .I $HOME/.qadslrc
+
+--- 59,65 ----
+ Use settings from
+ .I file
+ insted of default
+! .I /usr/local/etc/qadsl.conf
+ or
+ .I $HOME/.qadslrc
+
+***************
+*** 112,118 ****
+
+ .SH FILES
+ .TP
+! .I /etc/qadsl.conf
+ Usually the location of a system wide qadsl configuration file.
+ .TP
+ .I $HOME/.qadslrc
+--- 112,118 ----
+
+ .SH FILES
+ .TP
+! .I /usr/local/etc/qadsl.conf
+ Usually the location of a system wide qadsl configuration file.
+ .TP
+ .I $HOME/.qadslrc
diff --git a/net/qadsl/files/patch-man::qadsl.conf.5 b/net/qadsl/files/patch-man::qadsl.conf.5
new file mode 100644
index 000000000000..4703815bb0d5
--- /dev/null
+++ b/net/qadsl/files/patch-man::qadsl.conf.5
@@ -0,0 +1,19 @@
+*** man/qadsl.conf.5.orig Mon Jun 28 23:24:55 2004
+--- man/qadsl.conf.5 Sat Sep 11 17:38:16 2004
+***************
+*** 29,35 ****
+ .SH NAME
+ qadsl.conf \- qadsl configuration file
+ .SH DESCRIPTION
+! \fBqadsl.conf\fP is usually found in /etc/qadsl.conf and contains
+ username, password and login server information for your Internet
+ connection.
+
+--- 29,35 ----
+ .SH NAME
+ qadsl.conf \- qadsl configuration file
+ .SH DESCRIPTION
+! \fBqadsl.conf\fP is usually found in /usr/local/etc/qadsl.conf and contains
+ username, password and login server information for your Internet
+ connection.
+
diff --git a/net/qadsl/files/patch-qadsl.sh b/net/qadsl/files/patch-qadsl.sh
deleted file mode 100644
index 333c7e7e3887..000000000000
--- a/net/qadsl/files/patch-qadsl.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-*** /dev/null Thu Dec 13 22:20:21 2001
---- qadsl.sh Wed Dec 12 21:05:26 2001
-***************
-*** 0 ****
---- 1,21 ----
-+ #!/bin/sh
-+
-+ if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
-+ echo "$0: Cannot determine the PREFIX" >&2
-+ exit 1
-+ fi
-+
-+ case "$1" in
-+ start)
-+ [ -x ${PREFIX}/sbin/qadsl ] && ( ${PREFIX}/sbin/qadsl -l & )
-+ sleep 2
-+ ;;
-+ stop)
-+ killall qadsl && echo -n ' qadsl'
-+ ;;
-+ *)
-+ echo "Usage: `basename $0` {start|stop}" >&2
-+ ;;
-+ esac
-+
-+ exit 0
diff --git a/net/qadsl/files/patch-src::http.c b/net/qadsl/files/patch-src::http.c
new file mode 100644
index 000000000000..bd995479330a
--- /dev/null
+++ b/net/qadsl/files/patch-src::http.c
@@ -0,0 +1,53 @@
+*** src/http.c.orig Tue Jun 29 23:59:57 2004
+--- src/http.c Sat Sep 11 22:19:22 2004
+***************
+*** 27,33 ****
+ #include "config.h"
+ #endif
+
+! #include <alloca.h>
+ #include <netdb.h>
+ #include <netinet/in.h>
+ #include <stdio.h>
+--- 27,33 ----
+ #include "config.h"
+ #endif
+
+! #include <sys/types.h>
+ #include <netdb.h>
+ #include <netinet/in.h>
+ #include <stdio.h>
+***************
+*** 278,284 ****
+ + strlen (config->password_key) + strlen (config->password)
+ + strlen (config->login_string_footer) + strlen ("Plus approximately 10%");
+
+! temp = (char *) alloca (length);
+ if (!temp)
+ {
+ close (config->sockfd);
+--- 278,284 ----
+ + strlen (config->password_key) + strlen (config->password)
+ + strlen (config->login_string_footer) + strlen ("Plus approximately 10%");
+
+! temp = (char *) malloc(length);
+ if (!temp)
+ {
+ close (config->sockfd);
+***************
+*** 299,305 ****
+
+ DEBUG ("Login string: %s", temp);
+
+! login_string = (char *) alloca (length);
+ if (!login_string)
+ {
+ close (config->sockfd);
+--- 299,305 ----
+
+ DEBUG ("Login string: %s", temp);
+
+! login_string = (char *) malloc(length);
+ if (!login_string)
+ {
+ close (config->sockfd);
diff --git a/net/qadsl/files/patch-src::lock.c b/net/qadsl/files/patch-src::lock.c
new file mode 100644
index 000000000000..bf00326fbb4e
--- /dev/null
+++ b/net/qadsl/files/patch-src::lock.c
@@ -0,0 +1,44 @@
+*** src/lock.c.orig Sat Mar 13 23:39:41 2004
+--- src/lock.c Sat Sep 11 22:05:09 2004
+***************
+*** 153,159 ****
+ */
+
+ pid_t
+! lock_read (char **file)
+ {
+ int fd, fallback;
+ FILE *fp;
+--- 153,159 ----
+ */
+
+ pid_t
+! lock_read (char *file)
+ {
+ int fd, fallback;
+ FILE *fp;
+***************
+*** 165,175 ****
+ fallback = 0;
+ do
+ {
+! fd = open(*file, O_RDONLY);
+ if (-1 == fd)
+ {
+! *file = fallback_pid_files [fallback++];
+! if (NULL == *file)
+ {
+ /* This makes us depend on procps and coreutils in GNU/Linux
+ * but only coreutils in GNU/Hurd.
+--- 165,175 ----
+ fallback = 0;
+ do
+ {
+! fd = open(file, O_RDONLY);
+ if (-1 == fd)
+ {
+! file = fallback_pid_files [fallback++];
+! if (NULL == file)
+ {
+ /* This makes us depend on procps and coreutils in GNU/Linux
+ * but only coreutils in GNU/Hurd.
diff --git a/net/qadsl/files/patch-src::log.c b/net/qadsl/files/patch-src::log.c
new file mode 100644
index 000000000000..face4f2bb455
--- /dev/null
+++ b/net/qadsl/files/patch-src::log.c
@@ -0,0 +1,38 @@
+*** src/log.c.orig Thu Jun 10 21:11:46 2004
+--- src/log.c Sat Sep 11 17:42:44 2004
+***************
+*** 21,28 ****
+ #include "config.h"
+ #endif
+
+- #include <alloca.h>
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <string.h>
+ #include <syslog.h>
+--- 21,28 ----
+ #include "config.h"
+ #endif
+
+ #include <stdio.h>
++ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <string.h>
+ #include <syslog.h>
+***************
+*** 100,106 ****
+ char *str;
+ va_list ap;
+
+! str = alloca (MAXDATASIZE); /* XXX - What is this, a hardcoded value?! */
+ va_start (ap, fmt);
+ len = vsnprintf (str, MAXDATASIZE, fmt, ap);
+ if (len >= 0)
+--- 100,106 ----
+ char *str;
+ va_list ap;
+
+! str = malloc(MAXDATASIZE); /* XXX - What is this, a hardcoded value?! */
+ va_start (ap, fmt);
+ len = vsnprintf (str, MAXDATASIZE, fmt, ap);
+ if (len >= 0)
diff --git a/net/qadsl/files/pkg-message.in b/net/qadsl/files/pkg-message.in
new file mode 100644
index 000000000000..9c97c544847f
--- /dev/null
+++ b/net/qadsl/files/pkg-message.in
@@ -0,0 +1,19 @@
+
+*********************************************************
+
+A sample configuration file has been copied to
+%%PREFIX%%/etc/qadsl.conf.sample.
+qadsl (GNU Alive) will NOT work
+without a valid %%PREFIX%%/etc/qadsl.conf.
+
+*********************************************************
+
+===> COMPATIBILITY NOTE:
+ Configuration file from qadsl 1.2 and below
+ are not compatible with qadsl 1.3.3 or after.
+ Make sure to edit your configuration properly.
+
+===> BE CAREFULL HOW TO BOOT on 1.3.3 or after:
+ To run qadsl from startup, add qadsl_enable="YES"
+ in your /etc/rc.conf.
+
diff --git a/net/qadsl/files/qadsl.sh.in b/net/qadsl/files/qadsl.sh.in
new file mode 100644
index 000000000000..09489d00dc89
--- /dev/null
+++ b/net/qadsl/files/qadsl.sh.in
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# PROVIDE: qadsl
+# REQUIRE: NETWORK
+# BEFORE: DAEMON SERVERS LOGIN
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable qadsl:
+#
+#qadsl_enable="YES"
+#
+# Configuration flags can be set with qadsl_flags=""
+#
+# See qadsl(8) for flags.
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+
+# Default flags
+qadsl_enable=${qadsl_enable-"NO"}
+qadsl_flags=${qadsl_flags-"-l"}
+qadsl_pidfile=${qadsl_pidfile-"/var/run/qadsl.pid"}
+
+. %%RC_SUBR%%
+
+name="qadsl"
+rcvar=`set_rcvar`
+command=%%PREFIX%%/sbin/qadsl
+load_rc_config $name
+
+pidfile=${qadsl_pidfile}
+required_files=%%PREFIX%%/etc/qadsl.conf
+
+qadsl_flags="${qadsl_flags} -p ${qadsl_pidfile}"
+
+run_rc_command "$1"
diff --git a/net/qadsl/pkg-descr b/net/qadsl/pkg-descr
index 23252e15ea2b..934b0a0f041c 100644
--- a/net/qadsl/pkg-descr
+++ b/net/qadsl/pkg-descr
@@ -1,10 +1,9 @@
-This is a port of qadsl, a small utility to login on the Telia AB ADSL
-service. It also works fine with COMHEM Cable internet. It has
-features like keep-alive daemon, login/logout functions. The
-keep-alive daemon can be configured to either login or to ping your
-login-server after a chosen delay in minutes.
+qadsl (GNU Alive) is a small utility to login on the Telia AB ADSL service.
+It also works fine with COMHEM Cable internet and Tiscali Internet services.
+It features a keep-alive daemon with login/logout functions. The daemon
+periodically connects to the ISP to ensure you are not logged out.
-WWW: http://kuba.unix.se/
+WWW: http://savannah.gnu.org/projects/alive
-- Arne Lundberg
arlu@telia.com
diff --git a/net/qadsl/pkg-message b/net/qadsl/pkg-message
deleted file mode 100644
index a05cf8258a28..000000000000
--- a/net/qadsl/pkg-message
+++ /dev/null
@@ -1,7 +0,0 @@
-*********************************************************
-
-A sample configuration file has been copied to
-%%PREFIX%%/etc/qadsl.conf.sample. Qadsl will not work without
-%%PREFIX%%/etc/qadsl.conf.
-
-*********************************************************
diff --git a/net/qadsl/pkg-plist b/net/qadsl/pkg-plist
deleted file mode 100644
index d7f928c5805d..000000000000
--- a/net/qadsl/pkg-plist
+++ /dev/null
@@ -1,3 +0,0 @@
-sbin/qadsl
-etc/qadsl.conf.sample
-etc/rc.d/qadsl.sh