[znc] Add patch so znc's version doesn't get messed up with prereleases

Nick Bebout nb at fedoraproject.org
Thu Mar 3 23:12:44 UTC 2011


commit bfb86d836c714140774e161949900e77059b031c
Author: Nick Bebout <nb at fedoraproject.org>
Date:   Thu Mar 3 17:12:20 2011 -0600

    Add patch so znc's version doesn't get messed up with prereleases

 znc-release.patch |   11 +++++++++++
 znc.spec          |    2 ++
 2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/znc-release.patch b/znc-release.patch
new file mode 100644
index 0000000..bcd9147
--- /dev/null
+++ b/znc-release.patch
@@ -0,0 +1,11 @@
+--- znc-0.098-beta-original/znc.cpp	2011-03-02 07:45:07.000000000 -0600
++++ znc-0.098-beta/znc.cpp	2011-03-03 16:48:07.752119484 -0600
+@@ -96,7 +96,7 @@
+ 	}
+ 
+ 	char szBuf[128];
+-	snprintf(szBuf, sizeof(szBuf), "ZNC %1.3f"VERSION_EXTRA" - http://znc.in", VERSION);
++	snprintf(szBuf, sizeof(szBuf), "ZNC %1.3f - http://znc.in", VERSION);
+ 	// If snprintf overflows (which I doubt), we want to be on the safe side
+ 	szBuf[sizeof(szBuf) - 1] = '\0';
+ 
diff --git a/znc.spec b/znc.spec
index e17cb0f..31cfd49 100644
--- a/znc.spec
+++ b/znc.spec
@@ -10,6 +10,7 @@ URL:            http://znc.in
 #Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
 #Source0:        znc-0.097.tar.xz
 Source0:        http://people.znc.in/~psychon/znc/releases/znc-0.098-beta.tar.gz
+Patch0:         znc-release.patch
 # git clone https://github.com/znc/znc.git
 # cd znc
 # git archive --prefix=znc/ HEAD | xz > ../znc-0.097.tar.xz
@@ -74,6 +75,7 @@ python module for ZNC
 %prep
 #%setup -q
 %setup -q -n %{name}-%{version}-beta
+%patch0 -p1
 %__perl -pi.add_release -e 's|(?<="ZNC \%1\.3f)|-%{release}|' znc.cpp
 chmod -x modules/q.cpp
 


More information about the scm-commits mailing list