From a6d6f1378ca709a262cb4b3209f7992c7b5940c0 Mon Sep 17 00:00:00 2001 From: ingvar Date: Tue, 29 May 2007 11:27:56 +0000 Subject: [PATCH] more intelligent sed magic in the redhat specfile git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1478 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/redhat/varnish.spec | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/varnish-cache/redhat/varnish.spec b/varnish-cache/redhat/varnish.spec index 5cb3aef3..0c759877 100644 --- a/varnish-cache/redhat/varnish.spec +++ b/varnish-cache/redhat/varnish.spec @@ -1,7 +1,7 @@ Summary: Varnish is a high-performance HTTP accelerator Name: varnish Version: 1.0.svn -Release: 20070528%{?dist} +Release: 20070529%{?dist} License: BSD-like Group: System Environment/Daemons URL: http://www.varnish-cache.org/ @@ -60,18 +60,19 @@ Varnish is a high-performance HTTP accelerator. # We have to remove rpath - not allowed in Fedora # (This problem only visible on 64 bit arches) -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g; + s|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool %{__make} %{?_smp_mflags} sed -e ' s/8080/80/g ' etc/default.vcl > redhat/default.vcl -%if "%dist" >= "el4" - sed -i 's,daemon --pidfile \${PIDFILE},daemon,g' redhat/varnish.initrc - sed -i 's,status -p \$PIDFILE,status,g' redhat/varnish.initrc - sed -i 's,killproc -p \$PIDFILE,killproc,g' redhat/varnish.initrc +%if "%dist" == "el4" + sed -i 's,daemon --pidfile \${\?PIDFILE}\?,daemon,g; + s,status -p \$PIDFILE,status,g; + s,killproc -p \$PIDFILE,killproc,g' \ + redhat/varnish.initrc redhat/varnishlog.initrc %endif %install -- 2.39.5