And here's the patch that does everything I want to do to the
specfile... Sorry about the noise.

It might also be nice to rename haproxy-small.spec to
haproxy.spec-small, then haproxy can be built directly from the tar.gz
by: 

        rpmbuild -ta haproxy-1.3.16.tar.gz

When there are two .spec-files, rpmbuild will concatinate both, and fail.


  -jf
From 3a75bc297d5c196a2f006309f1670ce957a65d42 Mon Sep 17 00:00:00 2001
From: Jan-Frode Myklebust <[email protected]>
Date: Thu, 26 Mar 2009 15:36:58 +0100
Subject: [PATCH]        - Update specfile to build for v2.6 kernel.
        - Fix date in changelog.
        - Stop using deprecated "REGEX=pcre", and start using "USE_PCRE=1" 
instead.
        - Disable RPM-processing of perl dependencies, since haproxy
          shouldn't depend on perl, and it's only the examples/check script
          that's using perl.

---
 examples/haproxy.spec |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/examples/haproxy.spec b/examples/haproxy.spec
index 85d7b9a..54b6a85 100644
--- a/examples/haproxy.spec
+++ b/examples/haproxy.spec
@@ -29,8 +29,11 @@ risking the system's stability.
 %prep
 %setup -q
 
+# We don't want any perl dependecies in this RPM:
+%define __perl_requires /bin/true
+
 %build
-%{__make} REGEX="pcre" "COPTS.pcre=-DUSE_PCRE $(pcre-config --cflags)" 
DEBUG="" TARGET=linux24e
+%{__make} USE_PCRE=1 "COPTS.pcre=-DUSE_PCRE $(pcre-config --cflags)" DEBUG="" 
TARGET=linux26
 #%{__make} REGEX=pcre DEBUG="" LIBS.pcre="-L\$(PCREDIR)/lib -Wl,-Bstatic 
-lpcreposix -lpcre -Wl,-Bdynamic"
 
 
@@ -71,7 +74,7 @@ fi
 %attr(0755,root,root) %config %{_sysconfdir}/rc.d/init.d/%{name}
 
 %changelog
-* Sun Mar 22 2008 Willy Tarreau <[email protected]>
+* Sun Mar 22 2009 Willy Tarreau <[email protected]>
 - updated to 1.3.16
 
 * Sat Apr 19 2008 Willy Tarreau <[email protected]>
-- 
1.5.5.6

Attachment: pgpbpUYjRRFX1.pgp
Description: PGP signature

Reply via email to