- switch to modern version of module; use setproctitle library auto/th/apache-mod_proctitle-0.4-1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 13 Mar 2013 16:32:48 +0000 (17:32 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 13 Mar 2013 16:33:22 +0000 (17:33 +0100)
apache-mod_proctitle.spec
setproctitle.patch [new file with mode: 0644]

index 71a4ba9..7f85239 100644 (file)
@@ -2,14 +2,18 @@
 %define        apxs            /usr/sbin/apxs
 Summary:       Apache module: set process name to currently serverd virtual host
 Name:          apache-mod_%{mod_name}
-Version:       0.1
-Release:       0.20080707.2
+Version:       0.4
+Release:       1
 License:       Apache v2.0
 Group:         Networking/Daemons/HTTP
-Source0:       mod_proctitle.c
+Source0:       https://github.com/stass/mod_proctitle/archive/0.4.tar.gz
+# Source0-md5: 83043432da02f0ebf6de4badbe404dcd
+Patch0:                setproctitle.patch
+URL:           https://github.com/stass/mod_proctitle
 BuildRequires: %{apxs}
 BuildRequires: apache-devel >= 2.0
 BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: setproctitle-devel
 Requires:      apache(modules-api) = %apache_modules_api
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -21,19 +25,31 @@ mod_proctitle is an experimental module for Apache httpd 2.x which
 changes process name to currently served virtual host.
 
 %prep
-%setup -q -c -T
-install %{SOURCE0} .
+%setup -q -n mod_%{mod_name}-%{version}
+%patch0 -p1
 
 %build
-%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.la
+%{__libtoolize}
+%{__aclocal}
+%{__autoheader}
+%{__autoconf}
+%{__automake}
+
+CPPFLAGS="%{rpmcppflags} -D__unused='__attribute__ ((__unused__))'" \
+%configure
+%{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
-install -p .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+install -d $RPM_BUILD_ROOT%{_sysconfdir}
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
 
 cat > $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf << 'EOF'
 LoadModule %{mod_name}_module modules/mod_%{mod_name}.so
+ProctitileEnable On
+# ProctitleUriSep ::
 EOF
 
 %clean
@@ -50,4 +66,4 @@ fi
 %files
 %defattr(644,root,root,755)
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
-%attr(755,root,root) %{_pkglibdir}/*.so
+%attr(755,root,root) %{_pkglibdir}/mod_proctitle.so
diff --git a/setproctitle.patch b/setproctitle.patch
new file mode 100644 (file)
index 0000000..4dd7c8f
--- /dev/null
@@ -0,0 +1,25 @@
+diff -urN mod_proctitle-0.4.org/src/Makefile.am mod_proctitle-0.4/src/Makefile.am
+--- mod_proctitle-0.4.org/src/Makefile.am      2011-08-24 10:53:02.000000000 +0200
++++ mod_proctitle-0.4/src/Makefile.am  2013-03-13 17:25:00.638504741 +0100
+@@ -5,7 +5,7 @@
+ libdir= @APACHE_MODULEDIR@
+ mod_proctitle_la_LDFLAGS=-module -avoid-version
+-LIBS=@APR_LDFLAGS@ @APU_LDFLAGS@ @APR_LIBS@ @APU_LIBS@
++LIBS=@APR_LDFLAGS@ @APU_LDFLAGS@ @APR_LIBS@ @APU_LIBS@ -lsetproctitle
+ AM_CFLAGS=@APR_INCLUDES@ @APU_INCLUDES@ -I@APACHE_INCLUDEDIR@
+ mod_proctitle_la_SOURCES = mod_proctitle.c
+diff -urN mod_proctitle-0.4.org/src/mod_proctitle.c mod_proctitle-0.4/src/mod_proctitle.c
+--- mod_proctitle-0.4.org/src/mod_proctitle.c  2011-08-24 10:53:02.000000000 +0200
++++ mod_proctitle-0.4/src/mod_proctitle.c      2013-03-13 17:24:50.578262647 +0100
+@@ -49,6 +49,9 @@
+ #include <http_core.h>
+ #include <http_request.h>
++#include <setproctitle.h>
++#define __unused __attribute__ ((__unused__))
++
+ #undef PACKAGE_BUGREPORT /* damn apache */
+ #undef PACKAGE_NAME
+ #undef PACKAGE_STRING
This page took 0.172578 seconds and 4 git commands to generate.