3 %bcond_with tests # run tests (need active Internet connection)
4 %bcond_without qt4 # Qt4 library
5 %bcond_without qt5 # Qt5 library
7 Summary: C++/Qt4 wrapper for the Echo Nest API
8 Summary(pl.UTF-8): Obudowanie C++/Qt4 dla API Echo Nest
14 Source0: http://files.lfranchi.com/%{name}-%{version}.tar.bz2
15 # Source0-md5: d8c60545b056145dc66882971a0acf9c
16 URL: https://projects.kde.org/projects/playground/libs/libechonest
17 BuildRequires: cmake >= 2.6
18 BuildRequires: libstdc++-devel
19 BuildRequires: pkgconfig
21 BuildRequires: QtCore-devel >= 4
22 BuildRequires: QtNetwork-devel >= 4
23 %{?with_tests:BuildRequires: QtXml-devel >= 4}
24 BuildRequires: qjson-devel
25 BuildRequires: qt4-build >= 4
26 BuildRequires: qt4-qmake >= 4
29 BuildRequires: Qt5Core-devel >= 5
30 BuildRequires: Qt5Network-devel >= 5
31 %{?with_tests:BuildRequires: Qt5Xml-devel >= 5}
32 BuildRequires: qt5-build >= 5
33 BuildRequires: qt5-qmake >= 5
35 BuildRequires: rpmbuild(macros) >= 1.605
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 # Unresolved symbol __stack_chk_fail in libechonest.so.2.1.0
40 %define skip_post_check_so libechonest.so.%{version}
44 libechonest is a collection of Qt4 classes designed to make a
45 developer's life easy when trying to use the APIs provided by The Echo
48 %description -l pl.UTF-8
49 libechonest to zbiór klas Qt4 zaprojektuwany, aby ułatwić życie
50 programiście przy używaniu API udostępnianych przez The Echo Nest.
53 Summary: Development files for libechonest library
54 Summary(pl.UTF-8): Pliki programistyczne biblioteki libechonest
55 Group: Development/Libraries
56 Requires: %{name} = %{version}-%{release}
57 Requires: QtCore-devel >= 4
58 Requires: QtNetwork-devel >= 4
61 This package contains the header files for developing applications
62 that use libechonest library.
64 %description devel -l pl.UTF-8
65 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
66 wykorzystujących bibliotekę libechonest.
68 %package -n libechonest-qt5
69 Summary: C++/Qt5 wrapper for the Echo Nest API
70 Summary(pl.UTF-8): Obudowanie C++/Qt5 dla API Echo Nest
73 %description -n libechonest-qt5
74 libechonest is a collection of Qt5 classes designed to make a
75 developer's life easy when trying to use the APIs provided by The Echo
78 %description -n libechonest-qt5 -l pl.UTF-8
79 libechonest to zbiór klas Qt5 zaprojektuwany, aby ułatwić życie
80 programiście przy używaniu API udostępnianych przez The Echo Nest.
82 %package -n libechonest-qt5-devel
83 Summary: Development files for libechonest5 library
84 Summary(pl.UTF-8): Pliki programistyczne biblioteki libechonest5
85 Group: Development/Libraries
86 Requires: Qt5Core-devel >= 5
87 Requires: Qt5Network-devel >= 5
88 Requires: libechonest-qt5 = %{version}-%{release}
90 %description -n libechonest-qt5-devel
91 This package contains the header files for developing applications
92 that use libechonest5 library.
94 %description -n libechonest-qt5-devel -l pl.UTF-8
95 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
96 wykorzystujących bibliotekę libechonest5.
106 -DBUILD_WITH_QT4:BOOL=ON \
107 -DECHONEST_BUILD_TESTS:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \
112 export PKG_CONFIG_PATH=$(pwd)
113 test "$(pkg-config --modversion libechonest)" = "%{version}"
114 %{__make} test ARGS="--timeout 300 --output-on-failure"
124 -DBUILD_WITH_QT4:BOOL=OFF \
125 -DECHONEST_BUILD_TESTS:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \
130 export PKG_CONFIG_PATH=$(pwd)
131 test "$(pkg-config --modversion libechonest5)" = "%{version}"
132 %{__make} test ARGS="--timeout 300 --output-on-failure"
137 rm -rf $RPM_BUILD_ROOT
139 %{__make} -C build-qt4 install/fast \
140 DESTDIR=$RPM_BUILD_ROOT
144 %{__make} -C build-qt5 install/fast \
145 DESTDIR=$RPM_BUILD_ROOT
149 rm -rf $RPM_BUILD_ROOT
151 %post -p /sbin/ldconfig
152 %postun -p /sbin/ldconfig
154 %post -n libechonest-qt5 -p /sbin/ldconfig
155 %postun -n libechonest-qt5 -p /sbin/ldconfig
159 %defattr(644,root,root,755)
160 %doc AUTHORS README TODO
161 %attr(755,root,root) %{_libdir}/libechonest.so.*.*.*
162 # yes, SONAME is "libechonest.so.2.3"
163 %attr(755,root,root) %ghost %{_libdir}/libechonest.so.2.3
166 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_libdir}/libechonest.so
168 %{_includedir}/echonest
169 %{_pkgconfigdir}/libechonest.pc
173 %files -n libechonest-qt5
174 %defattr(644,root,root,755)
175 %doc AUTHORS README TODO
176 %attr(755,root,root) %{_libdir}/libechonest5.so.*.*.*
177 # yes, SONAME is "libechonest5.so.2.3"
178 %attr(755,root,root) %ghost %{_libdir}/libechonest5.so.2.3
180 %files -n libechonest-qt5-devel
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_libdir}/libechonest5.so
183 %{_includedir}/echonest5
184 %{_pkgconfigdir}/libechonest5.pc