1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00

- Update to 1.3.3

- Revamp packaging (me)

PR:		ports/71604
Submitted by:	Fredrik Lindberg
Approved by:	maintainer timeout
This commit is contained in:
Volker Stolz 2005-04-14 09:26:15 +00:00
parent 6a554c8669
commit 339de32364
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=133308
17 changed files with 295 additions and 137 deletions

View File

@ -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>

View File

@ -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

View File

@ -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}

View File

@ -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:

View File

@ -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");
}

View File

@ -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[])
{

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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);

View File

@ -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.

View File

@ -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)

View File

@ -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.

View File

@ -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"

View File

@ -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

View File

@ -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.
*********************************************************

View File

@ -1,3 +0,0 @@
sbin/qadsl
etc/qadsl.conf.sample
etc/rc.d/qadsl.sh