3 %bcond_with tests # build with tests. tests need active internet connection
4 %bcond_without qt4 # Qt4
5 %bcond_without qt5 # Qt5
7 Summary: C++ wrapper for the Echo Nest API
13 Source0: http://files.lfranchi.com/%{name}-%{version}.tar.bz2
14 # Source0-md5: d8c60545b056145dc66882971a0acf9c
15 URL: https://projects.kde.org/projects/playground/libs/libechonest
17 BuildRequires: libstdc++-devel
18 BuildRequires: pkgconfig
20 BuildRequires: QtCore-devel
21 BuildRequires: QtNetwork-devel
22 BuildRequires: qjson-devel
23 BuildRequires: qt4-build
24 BuildRequires: qt4-qmake
27 BuildRequires: Qt5Network-devel
28 BuildRequires: Qt5Xml-devel
29 BuildRequires: qt5-build
30 BuildRequires: qt5-qmake
32 BuildRequires: rpmbuild(macros) >= 1.605
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 # Unresolved symbol __stack_chk_fail in libechonest.so.2.1.0
37 %define skip_post_check_so libechonest.so.%{version}
41 libechonest is a collection of Qt4 classes designed to make a
42 developer's life easy when trying to use the APIs provided by The Echo
46 Summary: Development files for %{name}
47 Group: Development/Libraries
48 Requires: %{name} = %{version}-%{release}
51 The %{name}-devel package contains libraries and header files for
52 developing applications that use %{name}.
54 %package -n libechonest-qt5
55 Summary: libechonest Qt5 bindings
58 %description -n libechonest-qt5
59 libechonest is a collection of Qt5 classes designed to make a
60 developer's life easy when trying to use the APIs provided by The Echo
63 %package -n libechonest-qt5-devel
64 Summary: Development files for libechonest-qt5
65 Group: Development/Libraries
66 Requires: libechonest-qt5 = %{version}-%{release}
68 %description -n libechonest-qt5-devel
69 Development files for libechonest-qt5.
79 -DBUILD_WITH_QT4:BOOL=ON \
80 -DECHONEST_BUILD_TESTS:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \
85 export PKG_CONFIG_PATH=$(pwd)
86 test "$(pkg-config --modversion libechonest)" = "%{version}"
87 %{__make} test ARGS="--timeout 300 --output-on-failure"
97 -DBUILD_WITH_QT4:BOOL=OFF \
98 -DECHONEST_BUILD_TESTS:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \
103 export PKG_CONFIG_PATH=$(pwd)
104 test "$(pkg-config --modversion libechonest5)" = "%{version}"
105 %{__make} test ARGS="--timeout 300 --output-on-failure"
110 rm -rf $RPM_BUILD_ROOT
112 %{__make} -C build-qt4 install/fast \
113 DESTDIR=$RPM_BUILD_ROOT
117 %{__make} -C build-qt5 install/fast \
118 DESTDIR=$RPM_BUILD_ROOT
122 rm -rf $RPM_BUILD_ROOT
124 %post -p /sbin/ldconfig
125 %postun -p /sbin/ldconfig
127 %post -n libechonest-qt5 -p /sbin/ldconfig
128 %postun -n libechonest-qt5 -p /sbin/ldconfig
132 %defattr(644,root,root,755)
133 %doc AUTHORS README TODO
134 %attr(755,root,root) %{_libdir}/libechonest.so.*.*.*
135 # yes, SONAME is "libechonest.so.2.3"
136 %ghost %{_libdir}/libechonest.so.2.3
139 %defattr(644,root,root,755)
140 %{_includedir}/echonest
141 %{_libdir}/libechonest.so
142 %{_pkgconfigdir}/libechonest.pc
146 %files -n libechonest-qt5
147 %defattr(644,root,root,755)
148 %doc AUTHORS README TODO
149 %attr(755,root,root) %{_libdir}/libechonest5.so.*.*.*
150 # yes, SONAME is "libechonest5.so.2.3"
151 %ghost %{_libdir}/libechonest5.so.2.3
153 %files -n libechonest-qt5-devel
154 %defattr(644,root,root,755)
155 %{_includedir}/echonest5
156 %{_libdir}/libechonest5.so
157 %{_pkgconfigdir}/libechonest5.pc