APXS = @APXS@
INCLUDES = -I@KRB5_INC@ -I@AFS_INC@ -I@APACHE_INC@
-LIB = -L@KRB5_LIBS@ -lkrb5 -lk5crypto -L@AFS_LIBS@ -L@APACHE_LIBS@ \
- -lprot -lauth -lresolv -lubik -lrxkad -lrx -lsys -llwp -ldes \
- -lcom_err -L@AFS_LIBS@ -lafsutil
+LIB = -L@KRB5_LIBS@ -L@AFS_LIBS@ -L@APACHE_LIBS@ -lkrb5 -lk5crypto \
+ -lprot -lauth -lresolv -lubik -lrxkad -lsys -lrx -llwp -ldes \
+ -lcom_err -lafsutil
APXSCC = `${APXS} -q CC` \
@WAKLOG_DEBUG@ \
-UMBC_20070614
+UMBC_20070616
AM_INIT_AUTOMAKE(mod_waklog_so,1.0)
AC_PROG_CC
AC_PROG_INSTALL
-AC_PATH_PROGS(APXS, apxs)
AC_ARG_WITH([afs-libs],
[AC_HELP_STRING([--with-afs-libs],[path to afs libraries])],
-libapache-mod-waklog (0.0-umbc-20070316-1) unstable; urgency=low
+libapache-mod-waklog (0.99) unstable; urgency=low
- * Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
+ * Initial release
-- Adam Megacz <megacz@cs.berkeley.edu> Thu, 22 Mar 2007 21:05:30 -0700
Section: web
Priority: optional
Maintainer: Adam Megacz <megacz@cs.berkeley.edu>
-Build-Depends: apache-dev, libkrb5-dev, autoconf, automake
+Build-Depends: apache-dev, apache2-prefork-dev, libkrb5-dev, autoconf, automake
Standards-Version: 3.6.1
Package: libapache-mod-waklog
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, apache-common, krb5-config, libapache-mod-auth-kerb
Description: AFS Authentication for Apache
+
+Package: libapache2-mod-waklog
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, apache2-mpm-prefork, krb5-config, libapache2-mod-auth-kerb
+Description: AFS Authentication for Apache2
+
#!/usr/bin/make -f
# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-
-
CFLAGS = -Wall -g
-
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
-configure: configure-stamp
-configure-stamp:
+build-apache13:
dh_testdir
- # Add here commands to configure the package.
chmod +x regen.sh
./regen.sh
- ./configure --with-afs-libs=/usr/lib/afs --with-afs-headers=/usr/include/afs
- touch configure-stamp
-
-
-build: build-stamp
-
-build-stamp: configure-stamp
- dh_testdir
-
- # Add here commands to compile the package.
+ make clean
+ ./configure \
+ --with-afs-libs=/usr/lib/afs \
+ --with-afs-headers=/usr/include/afs \
+ --with-apxs=/usr/bin/apxs
$(MAKE)
- #docbook-to-man debian/libapache-mod-waklog.sgml > libapache-mod-waklog.1
- touch $@
-
-clean:
+build-apache20:
dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
-
- # Add here commands to clean up after the build process.
- -$(MAKE) clean
-
- dh_clean --exclude ./_darcs/current/Makefile.orig --exclude ./Makefile.orig
+ chmod +x regen.sh
+ ./regen.sh
+ make clean
+ ./configure \
+ --with-afs-libs=/usr/lib/afs \
+ --with-afs-headers=/usr/include/afs \
+ --with-apache-headers=/usr/include/apache2 \
+ --with-apxs=/usr/bin/apxs2
+ $(MAKE)
+ mv .libs/mod_waklog.so .; true
-install: build
+apache13: build-apache13
dh_testdir
dh_testroot
dh_clean -k --exclude ./_darcs/current/Makefile.orig --exclude ./Makefile.orig
dh_installdirs
-
- # Add here commands to install the package into debian/libapache-mod-waklog.
mkdir -p debian/libapache-mod-waklog/usr/lib/apache/1.3/
mkdir -p debian/libapache-mod-waklog/etc/apache/conf.d/
cp mod_waklog.so debian/libapache-mod-waklog/usr/lib/apache/1.3/
cp debian/waklog.load debian/libapache-mod-waklog/etc/apache/conf.d/waklog.conf
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
+apache20: build-apache20
+ dh_testdir
+ dh_testroot
+ dh_clean -k --exclude ./_darcs/current/Makefile.orig --exclude ./Makefile.orig
+ dh_installdirs
+ mkdir -p debian/libapache2-mod-waklog/usr/lib/apache2/modules/
+ mkdir -p debian/libapache2-mod-waklog/etc/apache2/mods-available
+ cp mod_waklog.so debian/libapache2-mod-waklog/usr/lib/apache2/modules/
+ cp debian/waklog.load debian/libapache2-mod-waklog/etc/apache2/mods-available
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -rf build-stamp .libs
+ -$(MAKE) clean
+ dh_clean --exclude ./_darcs/current/Makefile.orig --exclude ./Makefile.orig
+
+binary-indep:
-# Build architecture-dependent files here.
-binary-arch: build install
+binary-arch: apache13 apache20
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
-# dh_install
-# dh_installmenu
-# dh_installdebconf
-# dh_installlogrotate
-# dh_installemacsen
-# dh_installpam
-# dh_installmime
-# dh_python
-# dh_installinit
-# dh_installcron
-# dh_installinfo
dh_installman
dh_link
- dh_strip
+ #dh_strip
dh_compress
dh_fixperms
-# dh_perl
-# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
#define MAXNAMELEN 1024
#endif
-#ifdef STANDARD20_MODULE_STUFF
+/********************* APACHE1 ******************************************************************************/
+#ifndef STANDARD20_MODULE_STUFF
+#include "ap_config.h"
+#if defined(sun)
+#include <sys/ioccom.h>
+#endif /* sun */
+#include <http_conf_globals.h>
+#define MK_POOL pool
+#define MK_TABLE_GET ap_table_get
+#define MK_TABLE_SET ap_table_set
+#define command(name, func, var, type, usage) \
+ { name, func, \
+ NULL , \
+ RSRC_CONF | ACCESS_CONF , type, usage }
+#define command(name, func, var, type, usage) \
+ { name, func, \
+ (void*)XtOffsetOf(waklog_commands, var), \
+ OR_AUTHCFG | RSRC_CONF, type, usage }
+
+/********************* APACHE2 ******************************************************************************/
+#else
#include <apr_strings.h>
#include <apr_base64.h>
-#include <apr_compat.h>
-#include <apu_compat.h>
+//#include <ap_compat.h>
+#define ap_pcalloc apr_pcalloc
+#define ap_pdupstr apr_pdupstr
+#define ap_pstrdup apr_pstrdup
module AP_MODULE_DECLARE_DATA waklog_module;
#define ap_user_name unixd_config.user_name
#define command(name, func, var, type, usage) \
AP_INIT_ ## type (name, (void*) func, \
- (void*)APR_OFFSETOF(waklog_commands, var), \
- OR_AUTHCFG | RSRC_CONF, usage)
-typedef struct {
+ NULL, \
+ RSRC_CONF | ACCESS_CONF, usage)
+typedef struct
+{
int dummy;
}
child_info;
const char *userdata_key = "waklog_init";
-#else
-#include "ap_config.h"
-
-#define MK_POOL pool
-#define MK_TABLE_GET ap_table_get
-#define MK_TABLE_SET ap_table_set
-
-
-
+#endif /* STANDARD20_MODULE_STUFF */
+/**************************************************************************************************/
#include <krb5.h>
-
-#if defined(sun)
-#include <sys/ioccom.h>
-#endif /* sun */
-
#include <stropts.h>
#include <afs/venus.h>
#include <afs/auth.h>
int renewcount = 0;
module waklog_module;
-#define MK_POOL pool
-#define MK_TABLE_GET ap_table_get
-#define command(name, func, var, type, usage) \
- { name, func, \
- (void*)XtOffsetOf(waklog_commands, var), \
- OR_AUTHCFG | RSRC_CONF, type, usage }
-#endif /* STANDARD20_MODULE_STUFF */
+
#define getModConfig(P, X) P = (waklog_config *) ap_get_module_config( (X)->module_config, &waklog_module );
memmove( &child.token, &token, sizeof( struct ktc_token ) );
/* we'll need to unlog when this connection is done. */
+#ifndef STANDARD20_MODULE_STUFF
ap_register_cleanup( r->pool, (void *)r, token_cleanup, ap_null_cleanup );
+#else
+ /* FIXME!!!! */
+#endif
}
cleanup: