Hello, Am Donnerstag, 29. November 2018, 15:31:58 CET schrieb Mikhail Kasimov:
чт, 29 нояб. 2018 г. в 14:08, Neal Gompa <ngompa13@gmail.com>:
On Thu, Nov 29, 2018 Michael Schroeder <mls@suse.de> wrote:
Can't you do something simple like (untested):
%{?!_licensedir:%define license %%doc}
This works for everyone but SLE 12 and SLE 12.1 (and corresponding Leap derivative releases).
The reason it doesn't work is because %_licensedir is defined and filesystem didn't own the directory. So the %license macro would work, but OBS would reject the package anyway. That was fixed in SLE 12.2. ... fprobe-1.1-23.1.i586.rpm: directories not owned by a package: - /usr/share/licenses).
The same is to the second package. Me surprised... Ideas?
You could add %dir /usr/share/licenses to %files. Even if you add version checks for the (IIRC) two distributions where this directory isn't owned by aaa_base, the spec will still look much cleaner than the big chain of version checks in your initial proposal ;-)
"Can't you do something simple like (untested): %{?!_licensedir:%define license %%doc}" <-- I'm very сareful on "simplifications" instead of giving explicit constructions. In what exact location of spec file such construction should be put?
AFAIK at or near the beginning, so that %license is defined when it gets used ;-) Regards, Christian Boltz -- höflich Erklärung auf einem Niveau, das nicht vorsätzlich das Gegenüber als Volltrottel hinstellt. [Lars Marowsky-Brée] -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org