[opensuse-buildservice] package name substitution
Hello, I tried to describe the mechanism to automatically rename packages in the Requires/BuildRequires part of a spec file for different distros in http://en.opensuse.org/Build_Service/cross_distribution_package_how_to#Handl... Since I am still new to the topic it would be nice if somebody could check whether my description is correct. Thank you, Michael -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Michael Behrisch schrieb:
packages in the Requires/BuildRequires part of a spec file for different distros in http://en.opensuse.org/Build_Service/cross_distribution_package_how_to#Handl...
I used similar mechanism for sles and rhel packages and it worked for me. I haven' t checked your syntax, but it should be okay. A slightly different topic, do you know how to change the name of the resulting rpm in the spec file. The rpm macro defines the rpm name like this: %_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm But I want to add the distribution name to the rpm file name, like %{DISTRIBUTION} and the result should be: myfile-1-1.sles10.x86_64.rpm Any idea? Ulf -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Ulf Lange napsal(a):
A slightly different topic, do you know how to change the name of the resulting rpm in the spec file. The rpm macro defines the rpm name like this: %_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
But I want to add the distribution name to the rpm file name, like %{DISTRIBUTION} and the result should be: myfile-1-1.sles10.x86_64.rpm
Why don't you simply set the release to "1.0.sles10"? Michal -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Why don't you simply set the release to "1.0.sles10"?
Within my package I' ve just one spec file for all build repositories, the named has to be generated dynamically. But I get an idea, right now. This should work for my spec file: %if 0%{?sles_version} == 9 %define distver sles9 %endif %if 0%{?sles_version} == 10 %define distver sles10 %endif %if 0%{?rhel_version} == 406 %define distver rhel4 %endif %if 0%{?rhel_version} == 501 %define distver rhel5 %endif Release: 1.%{distver} I don' t know if a distribution rpm macro for all linux flavours exist. Maybe we should add this as a hint to the wiki. Ulf -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (3)
-
Michael Behrisch
-
Michal Marek
-
Ulf Lange