Please also apply the attached patch to avoid lots of unneccassary
RPM dependencies.


  -jf
From ce1abdcf48be27255647865130702b0305c8c63b Mon Sep 17 00:00:00 2001
From: Jan-Frode Myklebust <janfr...@tanso.net>
Date: Thu, 26 Mar 2009 13:56:43 +0100
Subject: [PATCH] The examples/check perl script generates the following RPM 
dependencies:

        perl(Config::General)
        perl(File::Basename)
        perl(Getopt::Std)
        perl(IO::Socket::PortState)
        perl(LWP::UserAgent)
        perl(Net::Server::PreFork)
        perl(URI)
        perl(strict)
        perl(vars)

which is a bit much for en "examples" script. This excludes examples/check
from RPM dependency processing.
---
 examples/haproxy.spec |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/examples/haproxy.spec b/examples/haproxy.spec
index 8c93869..e6a5176 100644
--- a/examples/haproxy.spec
+++ b/examples/haproxy.spec
@@ -29,6 +29,15 @@ risking the system's stability.
 %prep
 %setup -q
 
+# Exclude examples/check from dependencies, to avoid unneccessary dependencies.
+cat << \EOF > %{name}-req
+#!/bin/sh
+%{__perl_requires} $* |\
+sed -e ā€˜/perl(examples/check)/dā€™
+EOF
+%define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req
+chmod 755 %{__perl_requires}
+
 %build
 %{__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"
-- 
1.5.5.6

Attachment: pgpAaqanfUrsG.pgp
Description: PGP signature

Reply via email to