X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from smtp181.dfw.emailsrvr.com (smtp181.dfw.emailsrvr.com [67.192.241.181]) by lists.alpinelinux.org (Postfix) with ESMTP id 07B9A1EB588 for ; Fri, 7 Jan 2011 18:09:05 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp18.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 99AFD2680CB; Fri, 7 Jan 2011 13:09:04 -0500 (EST) X-Virus-Scanned: OK Received: by smtp18.relay.dfw1a.emailsrvr.com (Authenticated sender: mcs-AT-darkregion.net) with ESMTPSA id F0ECD2680BD; Fri, 7 Jan 2011 13:09:03 -0500 (EST) From: Matt Smith To: alpine-devel@lists.alpinelinux.org Cc: Matt Smith Subject: [alpine-devel] [PATCH] new aport: testing/apache-mod-backtrace Date: Fri, 7 Jan 2011 12:09:45 -0600 Message-Id: <1294423785-14162-1-git-send-email-mcs@darkregion.net> X-Mailer: git-send-email 1.7.3.3 X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: A module which uses system functions to format a backtrace to show what code did the dirty deed. http://people.apache.org/~trawick/exception_hook.html --- testing/apache-mod-backtrace/APKBUILD | 32 ++++++++++++++++++++ testing/apache-mod-backtrace/Makefile.in | 35 ++++++++++++++++++++++ testing/apache-mod-backtrace/configure.in | 46 +++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 0 deletions(-) create mode 100644 testing/apache-mod-backtrace/APKBUILD create mode 100644 testing/apache-mod-backtrace/Makefile.in create mode 100644 testing/apache-mod-backtrace/configure.in diff --git a/testing/apache-mod-backtrace/APKBUILD b/testing/apache-mod-backtrace/APKBUILD new file mode 100644 index 0000000..4e4cf80 --- /dev/null +++ b/testing/apache-mod-backtrace/APKBUILD @@ -0,0 +1,32 @@ +# Contributor: Matt Smith +# Maintainer: Matt Smith +pkgname=apache-mod-backtrace +pkgver=0 +pkgrel=0 +pkgdesc="A module which uses system functions to format a backtrace to show what code did the dirty deed." +url="http://people.apache.org/~trawick/exception_hook.html" +arch="all" +license="Apache2.0" +depends="apache2" +makedepends="apache2-dev apr-dev libexecinfo autoconf" +install= +subpackages= +source="http://people.apache.org/~trawick/mod_backtrace.c + configure.in + Makefile.in" + +build() { + cd "$srcdir" + autoconf + ./configure + make DESTDIR="$pkgdir" || return 1 +} + +package() { + cd "$srcdir" + install -D -m755 "$srcdir"/.libs/mod_backtrace.so "$pkgdir"/usr/lib/apache2/mod_backtrace.so +} + +md5sums="cd5361da31b3c1401e29ccb6e5220f6b mod_backtrace.c +623409fd18dea63d6da509f2818491ef configure.in +8034836d7eae8094443702302a0dc6ab Makefile.in" diff --git a/testing/apache-mod-backtrace/Makefile.in b/testing/apache-mod-backtrace/Makefile.in new file mode 100644 index 0000000..0f55fcc --- /dev/null +++ b/testing/apache-mod-backtrace/Makefile.in @@ -0,0 +1,35 @@ +# +# Makefile for mod_backtrace +# +# Based off of Makefile for mod_auth_ntlm_winbind by +# Matt Smith , 2011/01/04 +# + +# Programs + +APXS = @APXS@ +APXS_FLAGS = @APXS_FLAGS@ +SODIR = @SODIR@ +APXSLIBDIR=$(DESTDIR)/$(shell $(APXS) -q LIBEXECDIR) + +# Build the dso +MOD_BACKTRACE_SRC = mod_backtrace.c + +$(SODIR)mod_backtrace.so: $(MOD_BACKTRACE_SRC) + $(APXS) $(APXS_FLAGS) -Wc,-Wall -c -lexecinfo $(MOD_BACKTRACE_SRC) + +install: $(SODIR)mod_backtrace.so + $(APXS) $(APXS_FLAGS) -S LIBEXECDIR=$(APXSLIBDIR) -n backtrace -i $(SODIR)mod_backtrace.so + +# Clean targets +clean: + @rm -f *~ $(MOD_BACKTRACE_SRC:.c=.{la,lo,o,slo}) + @rm -rf $(SODIR) + +realclean: clean + @rm -f config.log + +distclean: realclean + @rm -f config.h Makefile \ + config.status config.cache + @rm -rf autom4te.cache diff --git a/testing/apache-mod-backtrace/configure.in b/testing/apache-mod-backtrace/configure.in new file mode 100644 index 0000000..60de602 --- /dev/null +++ b/testing/apache-mod-backtrace/configure.in @@ -0,0 +1,46 @@ +# Process this file with autoconf to produce a configure script. + +AC_INIT(mod_backtrace.c) + +# Basic stuff + +AC_PROG_CC +AC_PROG_CPP +AC_STDC_HEADERS + +# We use axps to compile source files, which may be in /usr/sbin +AC_ARG_WITH(apxs, +[ --with-apxs=PATH Specify path to apxs], +[ APXS="$withval" ], +[ AC_PATH_PROGS([APXS], [apxs2 apxs],, [$PATH:/usr/sbin]) ]) + +AC_ARG_WITH(apache, +[ --with-apache=PATH Specify path to apache executable], +[ HTTPD="$withval" ], +[ AC_PATH_PROG([HTTPD], [httpd], [/usr/sbin/httpd], [$PATH:/usr/sbin]) ]) + +APACHE_VER=`${HTTPD} -v | grep version` +if echo "$APACHE_VER" | grep -q "/2\." +then + APXS_FLAGS=-DAPACHE2 + SODIR=.libs/ + echo "Building for Apache 2." +else + echo "Building for Apache 1." +fi + +# Check for some headers + +AC_CHECK_HEADERS(stdlib.h unistd.h sys/socket.h sys/time.h grp.h) +AC_CHECK_HEADERS(nss_common.h nss.h) + +# Determine size of basic types + +AC_CHECK_SIZEOF(int,cross) +AC_CHECK_SIZEOF(long,cross) +AC_CHECK_SIZEOF(short,cross) + +# Create Makefile +AC_SUBST(APXS_FLAGS) +AC_SUBST(SODIR) +AC_OUTPUT(Makefile) -- 1.7.3.3 --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---