[rs-commit] r228 - in /mod_timestamp/trunk: ChangeLog aclocal.m4 configure configure.ac mod_timestamp.spec.in

rs-commit at redwax.eu rs-commit at redwax.eu
Sat Jan 4 20:24:12 CET 2020


Author: minfrin at redwax.eu
Date: Sat Jan  4 20:24:11 2020
New Revision: 228

Log:
RPM spec file: build natively on Redhat, SUSE and Mageia.

Modified:
    mod_timestamp/trunk/ChangeLog
    mod_timestamp/trunk/aclocal.m4
    mod_timestamp/trunk/configure
    mod_timestamp/trunk/configure.ac
    mod_timestamp/trunk/mod_timestamp.spec.in

Modified: mod_timestamp/trunk/ChangeLog
==============================================================================
--- mod_timestamp/trunk/ChangeLog	(original)
+++ mod_timestamp/trunk/ChangeLog	Sat Jan  4 20:24:11 2020
@@ -1,3 +1,8 @@
+
+Changes with v0.2.2
+
+ *) RPM spec file: build natively on Redhat, SUSE and Mageia.
+    [Graham Leggett]
 
 Changes with v0.2.1
 

Modified: mod_timestamp/trunk/aclocal.m4
==============================================================================
--- mod_timestamp/trunk/aclocal.m4	(original)
+++ mod_timestamp/trunk/aclocal.m4	Sat Jan  4 20:24:11 2020
@@ -21,7 +21,7 @@
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
 # pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
-# serial 12 (pkg-config-0.29.2)
+# serial 11 (pkg-config-0.29.1)
 
 dnl Copyright © 2004 Scott James Remnant <scott at netsplit.com>.
 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists at gmail.com>
@@ -63,7 +63,7 @@
 dnl See the "Since" comment for each macro you use to see what version
 dnl of the macros you require.
 m4_defun([PKG_PREREQ],
-[m4_define([PKG_MACROS_VERSION], [0.29.2])
+[m4_define([PKG_MACROS_VERSION], [0.29.1])
 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
     [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
 ])dnl PKG_PREREQ
@@ -164,7 +164,7 @@
 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
 pkg_failed=no
-AC_MSG_CHECKING([for $2])
+AC_MSG_CHECKING([for $1])
 
 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
@@ -174,11 +174,11 @@
 See the pkg-config man page for more details.])
 
 if test $pkg_failed = yes; then
-        AC_MSG_RESULT([no])
+   	AC_MSG_RESULT([no])
         _PKG_SHORT_ERRORS_SUPPORTED
         if test $_pkg_short_errors_supported = yes; then
 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
-        else
+        else 
 	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
@@ -195,7 +195,7 @@
 _PKG_TEXT])[]dnl
         ])
 elif test $pkg_failed = untried; then
-        AC_MSG_RESULT([no])
+     	AC_MSG_RESULT([no])
 	m4_default([$4], [AC_MSG_FAILURE(
 [The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
@@ -295,6 +295,74 @@
 
 AS_VAR_IF([$1], [""], [$5], [$4])dnl
 ])dnl PKG_CHECK_VAR
+
+dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES,
+dnl   [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
+dnl   [DESCRIPTION], [DEFAULT])
+dnl ------------------------------------------
+dnl
+dnl Prepare a "--with-" configure option using the lowercase
+dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and
+dnl PKG_CHECK_MODULES in a single macro.
+AC_DEFUN([PKG_WITH_MODULES],
+[
+m4_pushdef([with_arg], m4_tolower([$1]))
+
+m4_pushdef([description],
+           [m4_default([$5], [build with ]with_arg[ support])])
+
+m4_pushdef([def_arg], [m4_default([$6], [auto])])
+m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes])
+m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no])
+
+m4_case(def_arg,
+            [yes],[m4_pushdef([with_without], [--without-]with_arg)],
+            [m4_pushdef([with_without],[--with-]with_arg)])
+
+AC_ARG_WITH(with_arg,
+     AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),,
+    [AS_TR_SH([with_]with_arg)=def_arg])
+
+AS_CASE([$AS_TR_SH([with_]with_arg)],
+            [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)],
+            [auto],[PKG_CHECK_MODULES([$1],[$2],
+                                        [m4_n([def_action_if_found]) $3],
+                                        [m4_n([def_action_if_not_found]) $4])])
+
+m4_popdef([with_arg])
+m4_popdef([description])
+m4_popdef([def_arg])
+
+])dnl PKG_WITH_MODULES
+
+dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
+dnl   [DESCRIPTION], [DEFAULT])
+dnl -----------------------------------------------
+dnl
+dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES
+dnl check._[VARIABLE-PREFIX] is exported as make variable.
+AC_DEFUN([PKG_HAVE_WITH_MODULES],
+[
+PKG_WITH_MODULES([$1],[$2],,,[$3],[$4])
+
+AM_CONDITIONAL([HAVE_][$1],
+               [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"])
+])dnl PKG_HAVE_WITH_MODULES
+
+dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES,
+dnl   [DESCRIPTION], [DEFAULT])
+dnl ------------------------------------------------------
+dnl
+dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after
+dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make
+dnl and preprocessor variable.
+AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES],
+[
+PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4])
+
+AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
+        [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
+])dnl PKG_HAVE_DEFINE_WITH_MODULES
 
 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
 #

Modified: mod_timestamp/trunk/configure
==============================================================================
--- mod_timestamp/trunk/configure	(original)
+++ mod_timestamp/trunk/configure	Sat Jan  4 20:24:11 2020
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for mod_timestamp 0.2.1.
+# Generated by GNU Autoconf 2.69 for mod_timestamp 0.2.2.
 #
 # Report bugs to <dev-rs at redwax.eu>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='mod_timestamp'
 PACKAGE_TARNAME='mod_timestamp'
-PACKAGE_VERSION='0.2.1'
-PACKAGE_STRING='mod_timestamp 0.2.1'
+PACKAGE_VERSION='0.2.2'
+PACKAGE_STRING='mod_timestamp 0.2.2'
 PACKAGE_BUGREPORT='dev-rs at redwax.eu'
 PACKAGE_URL=''
 
@@ -1288,7 +1288,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures mod_timestamp 0.2.1 to adapt to many kinds of systems.
+\`configure' configures mod_timestamp 0.2.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1354,7 +1354,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of mod_timestamp 0.2.1:";;
+     short | recursive ) echo "Configuration of mod_timestamp 0.2.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1464,7 +1464,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-mod_timestamp configure 0.2.1
+mod_timestamp configure 0.2.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1887,7 +1887,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by mod_timestamp $as_me 0.2.1, which was
+It was created by mod_timestamp $as_me 0.2.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2750,7 +2750,7 @@
 
 # Define the identity of the package.
  PACKAGE='mod_timestamp'
- VERSION='0.2.1'
+ VERSION='0.2.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4224,8 +4224,8 @@
 fi
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr-1 >= 1.4" >&5
-$as_echo_n "checking for apr-1 >= 1.4... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr" >&5
+$as_echo_n "checking for apr... " >&6; }
 
 if test -n "$apr_CFLAGS"; then
     pkg_cv_apr_CFLAGS="$apr_CFLAGS"
@@ -4265,7 +4265,7 @@
 
 
 if test $pkg_failed = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -4292,7 +4292,7 @@
 and apr_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -4315,8 +4315,8 @@
 fi
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr-util-1 >= 1.4" >&5
-$as_echo_n "checking for apr-util-1 >= 1.4... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for apu" >&5
+$as_echo_n "checking for apu... " >&6; }
 
 if test -n "$apu_CFLAGS"; then
     pkg_cv_apu_CFLAGS="$apu_CFLAGS"
@@ -4356,7 +4356,7 @@
 
 
 if test $pkg_failed = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -4383,7 +4383,7 @@
 and apu_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -4406,8 +4406,8 @@
 fi
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl >= 0.9.8" >&5
-$as_echo_n "checking for openssl >= 0.9.8... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl" >&5
+$as_echo_n "checking for openssl... " >&6; }
 
 if test -n "$openssl_CFLAGS"; then
     pkg_cv_openssl_CFLAGS="$openssl_CFLAGS"
@@ -4447,7 +4447,7 @@
 
 
 if test $pkg_failed = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -4474,7 +4474,7 @@
 and openssl_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -4495,10 +4495,7 @@
 $as_echo "yes" >&6; }
 
 fi
-
-CFLAGS="$CFLAGS $openssl_CFLAGS $apr_CFLAGS $apu_CFLAGS"
-CPPFLAGS="$CPPFLAGS $openssl_CPPFLAGS $apr_CPPFLAGS $apu_CPPFLAGS"
-LDFLAGS="$LDFLAGS $openssl_LIBS $apr_LIBS $apu_LIBS"
+LIBS="$LIBS $openssl_LIBS $apr_LIBS $apu_LIBS"
 
 # Checks for header files.
 
@@ -5505,7 +5502,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by mod_timestamp $as_me 0.2.1, which was
+This file was extended by mod_timestamp $as_me 0.2.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5562,7 +5559,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-mod_timestamp config.status 0.2.1
+mod_timestamp config.status 0.2.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: mod_timestamp/trunk/configure.ac
==============================================================================
--- mod_timestamp/trunk/configure.ac	(original)
+++ mod_timestamp/trunk/configure.ac	Sat Jan  4 20:24:11 2020
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT(mod_timestamp, 0.2.1, dev-rs at redwax.eu)
+AC_INIT(mod_timestamp, 0.2.2, dev-rs at redwax.eu)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AC_CONFIG_FILES([Makefile mod_timestamp.spec])
 AC_CONFIG_SRCDIR([mod_timestamp.c])
@@ -51,10 +51,7 @@
 PKG_CHECK_MODULES(apr, apr-1 >= 1.4)
 PKG_CHECK_MODULES(apu, apr-util-1 >= 1.4)
 PKG_CHECK_MODULES(openssl, openssl >= 0.9.8)
-
-CFLAGS="$CFLAGS $openssl_CFLAGS $apr_CFLAGS $apu_CFLAGS"
-CPPFLAGS="$CPPFLAGS $openssl_CPPFLAGS $apr_CPPFLAGS $apu_CPPFLAGS"
-LDFLAGS="$LDFLAGS $openssl_LIBS $apr_LIBS $apu_LIBS"
+LIBS="$LIBS $openssl_LIBS $apr_LIBS $apu_LIBS"
 
 # Checks for header files.
 AC_CHECK_HEADERS([mod_ca.h])

Modified: mod_timestamp/trunk/mod_timestamp.spec.in
==============================================================================
--- mod_timestamp/trunk/mod_timestamp.spec.in	(original)
+++ mod_timestamp/trunk/mod_timestamp.spec.in	Sat Jan  4 20:24:11 2020
@@ -1,28 +1,21 @@
-# RPM Spec file for mod_timestamp
+# RPM Spec file for @PACKAGE_NAME@
 
-%define name      mod_timestamp
-%define summary   Apache mod_timestamp module
-%define license   ASL 2.0
-%define version   @PACKAGE_VERSION@
-%define release   1
-%define group     Web/Applications
-%define source    %{name}-%{version}.tar.bz2
-%define packager  Graham Leggett
-%define buildroot %{_builddir}/%{name}-root
-%define modroot   %{_libdir}/httpd/modules
+Name:      @PACKAGE_NAME@
+Version:   @PACKAGE_VERSION@
+Release:   1%{?dist}
+Summary:   Redwax Apache RFC3161 Timestamp module
+License:   ASL 2.0
+Group:     System Environment/Daemons
+Source:    https://archive.redwax.eu/dist/rs/%{name}/%{name}-%{version}/%{name}-%{version}.tar.bz2
+Url:       https://redwax.eu/rs/
+BuildRequires: gcc, pkgconfig(apr-1), pkgconfig(apr-util-1), pkgconfig(openssl), mod_ca-devel
+Requires:  mod_ca
 
-Name:      %{name}
-Version:   %{version}
-Release:   %{release}
-Packager:  %{packager}
-Summary:   %{summary}
-License:  %{license}
-Group:     %{group}
-Source:   %{source}
-Prefix:    %{_prefix}
-Buildroot: %{buildroot}
-Requires: httpd
-BuildRequires: httpd-devel, mod_ca-devel
+%if 0%{?is_opensuse}
+%define moduledir %{_libdir}/apache2
+%else
+%define moduledir %{_libdir}/httpd/modules
+%endif
 
 %description
 The Apache mod_timestamp module provides an RFC3161 time stamp authority responder
@@ -31,15 +24,13 @@
 %prep
 %setup -q
 %build
-%configure --with-apxs=/usr/bin/apxs
-make
+%configure
+%make_build
 
 %install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
+%make_install
 
-%clean
-rm -rf $RPM_BUILD_ROOT
 %files
-%{modroot}/mod_timestamp.so
+%{moduledir}/%{name}.so
 
+



More information about the rs-commit mailing list