@pmatilai Thanks for your info!

After changing the spec file to use `%if` like this, `%release_string` macro 
value was set.

```
diff --git a/foo.spec b/foo.spec
index 47a0596..b19233b 100644
--- a/foo.spec
+++ b/foo.spec
@@ -1,5 +1,7 @@
 %global release 2
-%{!?release_string:%define release_string %{release}%{?dist}}
+%if ! 0%{?release_string}
+%define release_string %{release}%{?dist}
+%endif
```

```
+ find /root/rpmbuild/ -type f
/root/rpmbuild/SRPMS/foo-2.7.0-2.el7.src.rpm
/root/rpmbuild/RPMS/x86_64/foo-2.7.0-2.el7.x86_64.rpm
/root/rpmbuild/BUILD/foo
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1013#issuecomment-576610823
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to