debianize apache2 module as well
authormegacz <megacz@0d961d1b-a432-0410-8fea-cc29f225fe07>
Sun, 17 Jun 2007 02:34:34 +0000 (02:34 +0000)
committermegacz <megacz@0d961d1b-a432-0410-8fea-cc29f225fe07>
Sun, 17 Jun 2007 02:34:34 +0000 (02:34 +0000)
git-svn-id: https://modwaklog.svn.sourceforge.net/svnroot/modwaklog/trunk/modwaklog@46 0d961d1b-a432-0410-8fea-cc29f225fe07

Makefile.am
VERSION
configure.in
debian/changelog
debian/control
debian/rules
mod_waklog.c

index bc9c755..677ef73 100644 (file)
@@ -2,9 +2,9 @@ all: mod_waklog.so
 
 APXS = @APXS@
 INCLUDES = -I@KRB5_INC@ -I@AFS_INC@ -I@APACHE_INC@
 
 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@ \
 
 APXSCC = `${APXS} -q CC` \
          @WAKLOG_DEBUG@ \
diff --git a/VERSION b/VERSION
index 375cb05..6cf3ae2 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-UMBC_20070614
+UMBC_20070616
index b467136..f84f77c 100644 (file)
@@ -2,7 +2,6 @@ AC_INIT(mod_waklog.c)
 AM_INIT_AUTOMAKE(mod_waklog_so,1.0)
 AC_PROG_CC
 AC_PROG_INSTALL
 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])],
 
 AC_ARG_WITH([afs-libs],
             [AC_HELP_STRING([--with-afs-libs],[path to afs libraries])],
index 234d16b..6ff77e9 100644 (file)
@@ -1,6 +1,6 @@
-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
 
 
  -- Adam Megacz <megacz@cs.berkeley.edu>  Thu, 22 Mar 2007 21:05:30 -0700
 
index 7db3389..71c258a 100644 (file)
@@ -2,10 +2,16 @@ Source: libapache-mod-waklog
 Section: web
 Priority: optional
 Maintainer: Adam Megacz <megacz@cs.berkeley.edu>
 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
 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
+
index 1dd408c..afec231 100644 (file)
@@ -1,97 +1,77 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 #!/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
 
 CFLAGS = -Wall -g
-
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
 else
        CFLAGS += -O2
 endif
 
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
 else
        CFLAGS += -O2
 endif
 
-configure: configure-stamp
-configure-stamp:
+build-apache13:
        dh_testdir
        dh_testdir
-       # Add here commands to configure the package.
        chmod +x regen.sh
        ./regen.sh
        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)
        $(MAKE)
-       #docbook-to-man debian/libapache-mod-waklog.sgml > libapache-mod-waklog.1
 
 
-       touch $@
-
-clean:
+build-apache20:
        dh_testdir
        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
        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
 
        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_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_installman
        dh_link
-       dh_strip
+       #dh_strip
        dh_compress
        dh_fixperms
        dh_compress
        dh_fixperms
-#      dh_perl
-#      dh_makeshlibs
        dh_installdeb
        dh_shlibdeps
        dh_gencontrol
        dh_installdeb
        dh_shlibdeps
        dh_gencontrol
index 0910ec6..0271956 100644 (file)
 #define MAXNAMELEN 1024
 #endif
 
 #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_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;
 
 
 module AP_MODULE_DECLARE_DATA waklog_module;
 
@@ -42,30 +64,19 @@ extern unixd_config_rec unixd_config;
 #define ap_user_name      unixd_config.user_name
 #define command(name, func, var, type, usage)           \
   AP_INIT_ ## type (name, (void*) func,                 \
 #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"; 
        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>
 
 #include <krb5.h>
-
-#if defined(sun)
-#include <sys/ioccom.h>
-#endif /* sun */
-
 #include <stropts.h>
 #include <afs/venus.h>
 #include <afs/auth.h>
 #include <stropts.h>
 #include <afs/venus.h>
 #include <afs/auth.h>
@@ -158,13 +169,7 @@ struct renew_ent renewtable[SHARED_TABLE_SIZE];
 int renewcount = 0;
 
 module waklog_module;
 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 );
 
 
 #define getModConfig(P, X) P = (waklog_config *) ap_get_module_config( (X)->module_config, &waklog_module );
 
@@ -615,7 +620,11 @@ waklog_aklog( request_rec *r )
        memmove( &child.token, &token, sizeof( struct ktc_token ) );
 
        /* we'll need to unlog when this connection is done. */
        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 );
        ap_register_cleanup( r->pool, (void *)r, token_cleanup, ap_null_cleanup );
+#else
+        /* FIXME!!!! */
+#endif
     }
 
 cleanup:
     }
 
 cleanup: