]> git.pld-linux.org Git - SPECS.git/blob - libechonest.spec
SPECS updated Sun 1 Aug 20:13:02 CEST 2021
[SPECS.git] / libechonest.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # run tests (need active Internet connection)
4 %bcond_without  qt4     # Qt4 library
5 %bcond_without  qt5     # Qt5 library
6
7 Summary:        C++/Qt4 wrapper for the Echo Nest API
8 Summary(pl.UTF-8):      Obudowanie C++/Qt4 dla API Echo Nest
9 Name:           libechonest
10 Version:        2.3.1
11 Release:        1
12 License:        GPL v2+
13 Group:          Libraries
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
20 %if %{with qt4}
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
27 %endif
28 %if %{with qt5}
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
34 %endif
35 BuildRequires:  rpmbuild(macros) >= 1.605
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 # Unresolved symbol __stack_chk_fail in libechonest.so.2.1.0
39 %ifarch i486
40 %define skip_post_check_so      libechonest.so.%{version}
41 %endif
42
43 %description
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
46 Nest.
47
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.
51
52 %package devel
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
59
60 %description devel
61 This package contains the header files for developing applications
62 that use libechonest library.
63
64 %description devel -l pl.UTF-8
65 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
66 wykorzystujących bibliotekę libechonest.
67
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
71 Group:          Libraries
72
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
76 Nest.
77
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.
81
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}
89
90 %description -n libechonest-qt5-devel
91 This package contains the header files for developing applications
92 that use libechonest5 library.
93
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.
97
98 %prep
99 %setup -q
100
101 %build
102 %if %{with qt4}
103 install -d build-qt4
104 cd build-qt4
105 %cmake \
106         -DBUILD_WITH_QT4:BOOL=ON \
107         -DECHONEST_BUILD_TESTS:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \
108         ..
109 %{__make}
110
111 %if %{with tests}
112 export PKG_CONFIG_PATH=$(pwd)
113 test "$(pkg-config --modversion libechonest)" = "%{version}"
114 %{__make} test ARGS="--timeout 300 --output-on-failure"
115 %endif
116
117 cd ..
118 %endif
119
120 %if %{with qt5}
121 install -d build-qt5
122 cd build-qt5
123 %cmake \
124         -DBUILD_WITH_QT4:BOOL=OFF \
125         -DECHONEST_BUILD_TESTS:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \
126         ..
127 %{__make}
128
129 %if %{with tests}
130 export PKG_CONFIG_PATH=$(pwd)
131 test "$(pkg-config --modversion libechonest5)" = "%{version}"
132 %{__make} test ARGS="--timeout 300 --output-on-failure"
133 %endif
134 %endif
135
136 %install
137 rm -rf $RPM_BUILD_ROOT
138 %if %{with qt4}
139 %{__make} -C build-qt4 install/fast \
140         DESTDIR=$RPM_BUILD_ROOT
141 %endif
142
143 %if %{with qt5}
144 %{__make} -C build-qt5 install/fast \
145         DESTDIR=$RPM_BUILD_ROOT
146 %endif
147
148 %clean
149 rm -rf $RPM_BUILD_ROOT
150
151 %post   -p /sbin/ldconfig
152 %postun -p /sbin/ldconfig
153
154 %post   -n libechonest-qt5 -p /sbin/ldconfig
155 %postun -n libechonest-qt5 -p /sbin/ldconfig
156
157 %if %{with qt4}
158 %files
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
164
165 %files devel
166 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_libdir}/libechonest.so
168 %{_includedir}/echonest
169 %{_pkgconfigdir}/libechonest.pc
170 %endif
171
172 %if %{with qt5}
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
179
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
185 %endif
This page took 1.162633 seconds and 3 git commands to generate.