diff -Naur isdn4k-utils.orig/pppdcapiplugin/Makefile isdn4k-utils/pppdcapiplugin/Makefile --- isdn4k-utils.orig/pppdcapiplugin/Makefile Wed Jun 11 23:06:50 2003 +++ isdn4k-utils/pppdcapiplugin/Makefile Wed Jun 11 23:08:26 2003 @@ -8,86 +8,15 @@ # as published by the Free Software Foundation; either version # 2 of the License, or (at your option) any later version. -export TOPDIR=$(shell pwd) -export CAPIINC=$(TOPDIR)/../capi20 -export CAPILIB=$(TOPDIR)/../capi20 -export INSTALL=$(TOPDIR)/install-sh -c -export INSTALLDATA=$(TOPDIR)/install-sh -c -o root -m 600 -export MKDIR=$(TOPDIR)/mkinstalldirs +TOPDIR=$(shell pwd) +CAPIINC=$(TOPDIR)/../capi20 +CAPILIB=$(TOPDIR)/../capi20 +INSTALL=$(TOPDIR)/install-sh -c +INSTALLDATA=$(TOPDIR)/install-sh -c -o root -m 600 +MKDIR=$(TOPDIR)/mkinstalldirs +MANDIR=/usr/share/man + +#PPPVERSION=$(shell /usr/sbin/pppd --version 2>&1 | sed -e "s/pppd\ version\ //") +PLUGINDIR=$(DESTDIR)/usr/lib/pppd/$(PPPVERSION) +include $(TOPDIR)/Rules.make -PPPSRCDIRS=/src/isdn/pppd - -ifeq ($(PPPVERSIONS),) -PPPVERSIONS = 2.3.11 2.4.0 2.4.1 2.4.1b1 2.4.1b2 2.4.2b3 -endif - -PEERDIR=${DESTDIR}/etc/ppp/peers/isdn -DRDSLDIR=${DESTDIR}/etc/drdsl -PEERS= arcor otelo talkline avm avm-ml leased -DRDSLFILES = adsl.conf - -ALL = capiplugin.so userpass.so - -all: pversion - @for i in $(PPPVERSIONS) ; do \ - echo $(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \ - $(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \ - done - -distclean: clean - -clean: - @for i in $(PPPVERSIONS) ; do \ - echo $(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \ - $(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \ - done - $(RM) comperr pversion - -install-peers: - $(MKDIR) $(PEERDIR) - @for i in $(PEERS); do \ - echo $(INSTALLDATA) peers/$$i $(PEERDIR); \ - $(INSTALLDATA) peers/$$i $(PEERDIR); \ - done - -install-drdsl: - $(MKDIR) $(DRDSLDIR) - @for i in $(DRDSLFILES); do \ - if [ -f $(DRDSLDIR)/$$i ] ; then \ - echo $(DRDSLDIR)/$$i already exists ; \ - else \ - echo $(INSTALLDATA) examples/$$i $(DRDSLDIR); \ - $(INSTALLDATA) examples/$$i $(DRDSLDIR); \ - fi \ - done - -install-man: - for i in ${DESTDIR}/usr/share/man ${DESTDIR}/usr/man; do \ - if [ -d $$i/man8 ] ; then \ - echo $(INSTALLDATA) capiplugin.8 $$i/man8; \ - $(INSTALLDATA) capiplugin.8 $$i/man8; \ - fi ; \ - done - -install: pversion - @for i in $(PPPVERSIONS) ; do \ - echo $(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \ - $(MAKE) -C ppp-$$i PPPVERSION=$$i $@ ; \ - done - $(MAKE) install-peers - $(MAKE) install-drdsl - $(MAKE) install-man - -srcsetup: - @for v in $(PPPVERSIONS) ; do \ - $(MKDIR) ppp-$$v/pppd ; \ - echo $(INSTALL) Makefile.template ppp-$$v/Makefile ; \ - $(INSTALL) Makefile.template ppp-$$v/Makefile ; \ - for h in pppd.h patchlevel.h ; do \ - echo $(INSTALL) $(PPPSRCDIRS)/ppp-$$v/pppd/$$h ppp-$$v/pppd ; \ - $(INSTALL) $(PPPSRCDIRS)/ppp-$$v/pppd/$$h ppp-$$v/pppd ; \ - done \ - done - -config: - @echo nothing to configure diff -Naur isdn4k-utils.orig/pppdcapiplugin/Rules.make isdn4k-utils/pppdcapiplugin/Rules.make --- isdn4k-utils.orig/pppdcapiplugin/Rules.make Wed Jun 11 23:06:50 2003 +++ isdn4k-utils/pppdcapiplugin/Rules.make Wed Jun 11 23:07:21 2003 @@ -11,20 +11,37 @@ vpath %.c $(TOPDIR) CC = gcc -INC = -I$(TOPDIR) -I$(CAPIINC) -Ipppd +INC = -I$(TOPDIR) -I$(CAPIINC) DEFS = -DPPPVER=$(shell $(TOPDIR)/pversion $(PPPVERSION)) -CFLAGS = -O2 -Wall -fPIC $(DEFS) $(INC) -L$(CAPILIB) +CFLAGS = -O2 LDFLAGS = -shared -L$(CAPILIB) ALL = capiplugin.so userpass.so -all: $(ALL) +all: def $(ALL) +pversion: pversion.c + $(CC) $(CFLAGS) pversion.c -o pversion + +def: pversion + echo \#define PPPVER $(shell $(TOPDIR)/pversion $(PPPVERSION)) >> p.h + echo \#endif >> p.h + + +capiplugin.o: capiplugin.c + $(CC) $(CFLAGS) -Wall -fPIC $(DEFS) $(INC) -L$(CAPILIB) -o capiplugin.o -c capiplugin.c + +capiconn.o: capiconn.c + $(CC) $(CFLAGS) -Wall -fPIC $(DEFS) $(INC) -L$(CAPILIB) -o capiconn.o -c capiconn.c + capiplugin.so: capiplugin.o capiconn.o $(CC) -o $@ $(LDFLAGS) capiplugin.o capiconn.o -lcapi20dyn +userpass.o: userpass.c + $(CC) $(CFLAGS) -Wall -fPIC $(DEFS) $(INC) -L$(CAPILIB) -o userpass.o -c userpass.c + userpass.so: userpass.o - $(CC) -o $@ $(LDFLAGS) $(CFLAGS) -nostdlib userpass.o + $(CC) -o $@ $(LDFLAGS) $(CFLAGS) -Wall -fPIC $(DEFS) $(INC) -L$(CAPILIB) -nostdlib userpass.o distclean: clean @@ -33,10 +50,12 @@ install: $(ALL) $(MKDIR) $(PLUGINDIR) + $(MKDIR) $(DESTDIR)/$(MANDIR)/man8 @for i in $(ALL); do \ echo $(INSTALL) $$i $(PLUGINDIR); \ $(INSTALL) $$i $(PLUGINDIR); \ done + $(INSTALL) capiplugin.8 $(DESTDIR)/$(MANDIR)/man8 config: @echo nothing to configure diff -Naur isdn4k-utils.orig/pppdcapiplugin/capiconn.h isdn4k-utils/pppdcapiplugin/capiconn.h --- isdn4k-utils.orig/pppdcapiplugin/capiconn.h Wed Jun 11 23:06:50 2003 +++ isdn4k-utils/pppdcapiplugin/capiconn.h Wed Jun 11 23:07:21 2003 @@ -25,7 +25,7 @@ #ifndef __CAPICONN_H__ #define __CAPICONN_H__ - +#include "p.h" #include #include diff -Naur isdn4k-utils.orig/pppdcapiplugin/capiplugin.c isdn4k-utils/pppdcapiplugin/capiplugin.c --- isdn4k-utils.orig/pppdcapiplugin/capiplugin.c Wed Jun 11 23:06:50 2003 +++ isdn4k-utils/pppdcapiplugin/capiplugin.c Wed Jun 11 23:07:21 2003 @@ -17,7 +17,7 @@ #include #include #include -#include "pppd.h" +#include #include "capiconn.h" #include #include @@ -34,7 +34,7 @@ /* -------------------------------------------------------------------- */ -#include "patchlevel.h" +#include #ifdef VERSION char pppd_version[] = VERSION; #endif diff -Naur isdn4k-utils.orig/pppdcapiplugin/p.h isdn4k-utils/pppdcapiplugin/p.h --- isdn4k-utils.orig/pppdcapiplugin/p.h Thu Jan 1 01:00:00 1970 +++ isdn4k-utils/pppdcapiplugin/p.h Wed Jun 11 23:07:21 2003 @@ -0,0 +1,2 @@ +#ifndef __P +#define __P diff -Naur isdn4k-utils.orig/pppdcapiplugin/userpass.c isdn4k-utils/pppdcapiplugin/userpass.c --- isdn4k-utils.orig/pppdcapiplugin/userpass.c Wed Jun 11 23:06:50 2003 +++ isdn4k-utils/pppdcapiplugin/userpass.c Wed Jun 11 23:07:21 2003 @@ -30,9 +30,9 @@ * * */ -#include "pppd.h" +#include -#include "patchlevel.h" +#include #ifdef VERSION char pppd_version[] = VERSION; #endif