On 05/08/2013 12:05 PM, Clayton Keller wrote:
Forgot to make sure this went to the list.
On 05/08/2013 11:21 AM, Willy Tarreau wrote:
Hello Clayton,
On Wed, May 08, 2013 at 11:13:04AM -0500, Clayton Keller wrote:
Is this along the lines of what you had in mind:
%define full_version 1.5-dev18
%define version %(echo %{full_version} | awk -F "-" '{print $1}')
%define release %(echo %{full_version} | awk -F "-" '{print $2}')
<snip>
Version: %{version}
Release: %{release}
Yes I didn't know this was possible. Seems a little bit dirty but is
handy. You can even use "cut -d- -f1" / "cut -d- -f2".
I like the cut variation. I'll attach a patch file this time rather than
muddy up the post with the full diff again with it using the cut command
instead.
Here is my current diff containing this and the previous discussed
changes in comparison to the existing haproxy.spec in examples/:
(...)
I'm seeing one issue here :
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
+BuildRoot: %{_tmppath}/%{name}-%{version}.root
I think you wanted to use ".../%{name}-%{version}-%{release}-root"
instead.
Yes, I saw that too. I sent a follow-up email shortly after with the
adjusted/correct diff. This patch includes that as well as the cut
command change.
I hope this has been helpful.
I guess keep in mind that once 1.5 drops the -devXX naming convention
and were to fall back in the more standard 1.5.x the use of this is not
as necessary and the Version could again be the entire release number
with the Release being more RPM build related.
Clay