public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: jbowes <jbowes@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/tig] v2.6.1: Ensure that the version number is set in the binary
Date: Mon, 15 Jun 2026 07:22:38 GMT	[thread overview]
Message-ID: <178150815810.1.4375872800220949313.rpms-tig-079518104aa0@fedoraproject.org> (raw)

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.
 

                 reply	other threads:[~2026-06-15  7:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178150815810.1.4375872800220949313.rpms-tig-079518104aa0@fedoraproject.org \
    --to=jbowes@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox