Need some macro voodoo advice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am trying to automatically change the Release name based on the
options that were used when building the rpm. For example, if no build
options were present then use:

Release: 1.%{svnrev}%{?dist}

If the --with jb option was used then use:
%{?_with_jb:Release: 1.%{svnrev}_JB%{?dist}}

If the --with siptcp option was used then use:
%{?_with_siptcp:Release: 1.%{svnrev}_SIPTCP%{?dist}}

And here surfaces the first problem. With both lines in the spec file,
trying to build the RPM I get this error message: 
error: Duplicate Release entries in package: (main package)

If the --with jb --with siptcp options were used then use...
... and that's where I can't figure out how to stick two options in the
example above (assuming the duplicate error above is solvable). I tried
this but it did not work:

%{?_with_jb || ?_with_siptcp:Release 1.%{svnrev}_JB_SIPTCP%{dist}}

Anyone have an idea if this is possible and what the proper syntax is?

Thanks and regards,
Patrick

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux