[opensuse-packaging] skrooge build: kde version specific directories
Hello mates, i'm trying to update skrooge atm. But i have a curious problem and don't know how to package this. Skrooge builds a module for grantlee. The output is: %{_libdir}/grantlee/0.1/grantlee_skroogefilters.so (For 11.4, 12.1) %{_libdir}/grantlee/0.2/grantlee_skroogefilters.so (For 12.1 Uns., Fac) I'm guessing that i have to define which one matches with a special KDE Version. Anything like: %if 0%{?_kde4_version} => 4.8.0 %{_libdir}/grantlee/0.2/grantlee_skroogefilters.so %else %{_libdir}/grantlee/0.1/grantlee_skroogefilters.so %endif But do we have that macro? Or how can i do this job? cu Sascha -- Sincerly yours Sascha Manns - open-slx GmbH Community Agent / Documentation Specialist Web (business): http://www.open-slx.com Web (private): http://saigkill.homelinux.net -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Quoting Sascha Manns
Hello mates,
i'm trying to update skrooge atm. But i have a curious problem and don't know how to package this.
Skrooge builds a module for grantlee.
The output is: %{_libdir}/grantlee/0.1/grantlee_skroogefilters.so (For 11.4, 12.1) %{_libdir}/grantlee/0.2/grantlee_skroogefilters.so (For 12.1 Uns., Fac)
I'm guessing that i have to define which one matches with a special KDE Version.
Anything like: %if 0%{?_kde4_version} => 4.8.0 %{_libdir}/grantlee/0.2/grantlee_skroogefilters.so %else %{_libdir}/grantlee/0.1/grantlee_skroogefilters.so %endif
Very likely you can do something like (not exact code: you'll have to look it up): %define _grantleedir %(pkg-config --variable filterlocation grantlee) (Assuming that grantlee is the package that you create a plugin to. The 'easiest' is to verify the build system and understanding how it creates the choice where to install the filter to. Or, if you actually do not care that much, just use %{_libdir}/grantlee/*/grantlee_skroogefilters.so Dominique -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi Dominique, Am Donnerstag, 15. März 2012, 10:50:02 schrieb Dominique Leuenberger a.k.a DimStar:
Or, if you actually do not care that much, just use %{_libdir}/grantlee/*/grantlee_skroogefilters.so Hihi, that one works. Sometimes i'm thinking too complicated :-) Thanks. -- Sincerly yours Sascha Manns - open-slx GmbH Community Agent / Documentation Specialist Web (business): http://www.open-slx.com Web (private): http://saigkill.homelinux.net -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello, On Thu, 15 Mar 2012, Sascha Manns wrote:
Anything like: %if 0%{?_kde4_version} => 4.8.0 [..] But do we have that macro? Or how can i do this job?
An answer to this, not your actual question: ==== /etc/rpm/macros.kde4 ==== %_kde_platform_version 4.6.0 %_kde_pimlibs_version 4.6.0 %_kde_akonadi_version 1.4.95 ==== amongst a bunch of other macros. A different way would be to call kde4-config --version or kde4-config --kde-version, which also has a lot of other options (for which there might be no predefined macros in /etc/rpm/macros.kde4. To get one such output into a rpm-macro use: %define kde4_foo %(kde4-config --foo [| sed ... ]) e.g.: ==== for a .spec file ==== %define _kde4_sounddir %(kde4-config --path sound | tr : '\\n' | \ sed -n '/^\\/home\\//d;{p;q;}') ==== To test such stuff you can use 'rpm --eval' or put it in '~/.rpmmacros' without the %define, but with %: ==== for ~/.rpmmacros or /etc/rpm/macros.* ==== %_kde_sounddir %(kde4-config --path sound | tr : '\\n' | \ sed -n '/^\\/home\\//d;{p;q;}') ==== and in --eval you don't need to double the '\': $ rpm --eval "%(kde4-config --path sound | tr : '\n' | \ sed -n '/^\/home\//d;{p;q;}')" /usr/share/sounds BTW: that sed does a 'grep -v '^/home/' | head -n 1' ;) That "scheme" for running stuff to define a macro in a .spec can be quite useful ;) HTH, and apropos \\// ... Live long and prosper, -dnh --
The three "R"s of Microsoft support: Retry, Reboot, Reinstall You forgot one: Repeat -- Mark Atwood, Lars Balker Rasmussen -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (3)
-
David Haller
-
Dominique Leuenberger a.k.a DimStar
-
Sascha Manns