public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/tig] v2.6.1: Ensure that the version number is set in the binary
@ 2026-06-15  7:22 jbowes
  0 siblings, 0 replies; only message in thread
From: jbowes @ 2026-06-15  7:22 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/tig
Branch : v2.6.1
Commit : 079518104aa00d998792b739862190c04c27be55
Author : jbowes <jbowes@fedoraproject.org>
Date   : 2007-06-02T17:11:33+00:00
Stats  : +44/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/tig/c/079518104aa00d998792b739862190c04c27be55?branch=v2.6.1

Log:
Ensure that the version number is set in the binary

---
diff --git a/Allow-CFLAGS-to-be-overridden-while-preserving-VERSI.patch b/Allow-CFLAGS-to-be-overridden-while-preserving-VERSI.patch
new file mode 100644
index 0000000..e7f5816
--- /dev/null
+++ b/Allow-CFLAGS-to-be-overridden-while-preserving-VERSI.patch
@@ -0,0 +1,38 @@
+From 461c48ddedf63b588da5dbad11565391612fbfd8 Mon Sep 17 00:00:00 2001
+From: James Bowes <jbowes@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@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
+

diff --git a/tig.spec b/tig.spec
index 6d8f6ed..656b640 100644
--- a/tig.spec
+++ b/tig.spec
@@ -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 @@ License:        GPL
 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 @@ Using it as a pager, it will display input from stdin and colorize it.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 
 %build
@@ -59,6 +61,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sat Jun 02 2007 James Bowes <jbowes@redhat.com> - 0.7-4
+- Ensure that the version string is set in the binary.
+
 * Fri Jun 01 2007 James Bowes <jbowes@redhat.com> - 0.7-3
 - Incorporate differences from jcollie's tig spec.
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-15  7:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-15  7:22 [rpms/tig] v2.6.1: Ensure that the version number is set in the binary jbowes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox