rpms/tig/F-7 Allow-CFLAGS-to-be-overridden-while-preserving-VERSI.patch, NONE, 1.1 tig.spec, 1.1, 1.2

James Bowes (jbowes) fedora-extras-commits at redhat.com
Sat Jun 2 17:33:50 UTC 2007


Author: jbowes

Update of /cvs/pkgs/rpms/tig/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21214

Modified Files:
	tig.spec 
Added Files:
	Allow-CFLAGS-to-be-overridden-while-preserving-VERSI.patch 
Log Message:
Ensure version is set in the binary

Allow-CFLAGS-to-be-overridden-while-preserving-VERSI.patch:

--- NEW FILE Allow-CFLAGS-to-be-overridden-while-preserving-VERSI.patch ---
>From 461c48ddedf63b588da5dbad11565391612fbfd8 Mon Sep 17 00:00:00 2001
From: James Bowes <jbowes at dangerouslyinc.com>
Date: Sat, 2 Jun 2007 12:52:48 -0400
Subject: [PATCH] Allow CFLAGS to be overridden while preserving VERSION

If someone defined their own CFLAGS, they would have to include a -DVERSION=
as well (or else get unknown-version as the version).

Signed-off-by: James Bowes <jbowes at dangerouslyinc.com>
---
 Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 61fc86b..91cb097 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ endif
 RPM_VERSION = $(subst -,.,$(VERSION))
 
 LDLIBS	= -lcurses
-CFLAGS	= -Wall -O2 '-DVERSION="$(VERSION)"'
+CFLAGS	= -Wall -O2
 DFLAGS	= -g -DDEBUG -Werror
 PROGS	= tig
 MANDOC	= tig.1 tigrc.5
@@ -28,6 +28,8 @@ HTMLDOC = tig.1.html tigrc.5.html manual.html README.html
 ALLDOC	= $(MANDOC) $(HTMLDOC) manual.html-chunked manual.pdf
 TARNAME	= tig-$(RPM_VERSION)
 
+override CFLAGS += '-DVERSION="$(VERSION)"'
+
 all: $(PROGS)
 all-debug: $(PROGS)
 all-debug: CFLAGS += $(DFLAGS)
-- 
1.5.2.888.g96a5e



Index: tig.spec
===================================================================
RCS file: /cvs/pkgs/rpms/tig/F-7/tig.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- tig.spec	2 Jun 2007 16:22:21 -0000	1.1
+++ tig.spec	2 Jun 2007 17:33:16 -0000	1.2
@@ -1,6 +1,6 @@
 Name:           tig
 Version:        0.7
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Text-mode interface for the git revision control system
 
 Group:          Development/Tools
@@ -8,6 +8,7 @@
 URL:            http://jonas.nitro.dk/tig
 Source0:        http://jonas.nitro.dk/tig/releases/%{name}-%{version}.tar.gz
 Patch0:         Supply-explicit-permission-bits-to-install.patch
+Patch1:         Allow-CFLAGS-to-be-overridden-while-preserving-VERSI.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  ncurses-devel
@@ -29,6 +30,7 @@
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 
 %build
@@ -59,6 +61,9 @@
 
 
 %changelog
+* Sat Jun 02 2007 James Bowes <jbowes at redhat.com> - 0.7-4
+- Ensure that the version string is set in the binary.
+
 * Fri Jun 01 2007 James Bowes <jbowes at redhat.com> - 0.7-3
 - Incorporate differences from jcollie's tig spec.
 




More information about the fedora-extras-commits mailing list