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: pkgconfig
18 BuildRequires: qjson-devel
20 BuildRequires: QtNetwork-devel
21 BuildRequires: qt4-build
24 BuildRequires: Qt5Network-devel
26 BuildRequires: rpmbuild(macros) >= 1.605
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 # includedir files "conflict"
30 %define _duplicate_files_terminate_build 0
32 # Unresolved symbol __stack_chk_fail in libechonest.so.2.1.0
34 %define skip_post_check_so libechonest.so.%{version}
38 libechonest is a collection of Qt4 classes designed to make a
39 developer's life easy when trying to use the APIs provided by The Echo
43 Summary: Development files for %{name}
44 Group: Development/Libraries
45 Requires: %{name} = %{version}-%{release}
48 The %{name}-devel package contains libraries and header files for
49 developing applications that use %{name}.
51 %package -n libechonest-qt5
52 Summary: libechonest Qt5 bindings
55 %description -n libechonest-qt5
56 libechonest is a collection of Qt5 classes designed to make a
57 developer's life easy when trying to use the APIs provided by The Echo
60 %package -n libechonest-qt5-devel
61 Summary: Development files for libechonest-qt5
62 Group: Development/Libraries
63 Requires: libechonest-qt5 = %{version}-%{release}
65 %description -n libechonest-qt5-devel
66 Development files for libechonest-qt5.
75 -DBUILD_WITH_QT4:BOOL=ON \
76 -DECHONEST_BUILD_TESTS:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \
81 export PKG_CONFIG_PATH=$(pwd)
82 test "$(pkg-config --modversion libechonest)" = "%{version}"
83 %{__make} test ARGS="--timeout 300 --output-on-failure"
92 -DBUILD_WITH_QT4:BOOL=OFF \
93 -DECHONEST_BUILD_TESTS:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \
98 export PKG_CONFIG_PATH=$(pwd)
99 test "$(pkg-config --modversion libechonest5)" = "%{version}"
100 %{__make} test ARGS="--timeout 300 --output-on-failure"
105 rm -rf $RPM_BUILD_ROOT
107 %{__make} -C build-qt4 install/fast \
108 DESTDIR=$RPM_BUILD_ROOT
112 %{__make} -C build-qt5 install/fast \
113 DESTDIR=$RPM_BUILD_ROOT
117 rm -rf $RPM_BUILD_ROOT
119 %post -p /sbin/ldconfig
120 %postun -p /sbin/ldconfig
122 %post -n libechonest-qt5 -p /sbin/ldconfig
123 %postun -n libechonest-qt5 -p /sbin/ldconfig
127 %defattr(644,root,root,755)
128 %doc AUTHORS README TODO
129 %attr(755,root,root) %{_libdir}/libechonest.so.*.*.*
130 # yes, SONAME is "libechonest.so.2.3"
131 %ghost %{_libdir}/libechonest.so.2.3
134 %defattr(644,root,root,755)
135 %{_includedir}/echonest
136 %{_libdir}/libechonest.so
137 %{_pkgconfigdir}/libechonest.pc
141 %files -n libechonest-qt5
142 %doc AUTHORS README TODO
143 %attr(755,root,root) %{_libdir}/libechonest5.so.*.*.*
144 # yes, SONAME is "libechonest5.so.2.3"
145 %ghost %{_libdir}/libechonest5.so.2.3
147 %files -n libechonest-qt5-devel
148 %{_includedir}/echonest
149 %{_libdir}/libechonest5.so
150 %{_pkgconfigdir}/libechonest5.pc