]> git.pld-linux.org Git - packages/libechonest.git/blob - libechonest.spec
update BR, minor other packaging fixes
[packages/libechonest.git] / libechonest.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build with tests. tests need active internet connection
4 %bcond_without  qt4                     # Qt4
5 %bcond_without  qt5                     # Qt5
6
7 Summary:        C++ wrapper for the Echo Nest API
8 Name:           libechonest
9 Version:        2.3.1
10 Release:        1
11 License:        GPL v2+
12 Group:          Libraries
13 Source0:        http://files.lfranchi.com/%{name}-%{version}.tar.bz2
14 # Source0-md5:  d8c60545b056145dc66882971a0acf9c
15 URL:            https://projects.kde.org/projects/playground/libs/libechonest
16 BuildRequires:  cmake
17 BuildRequires:  libstdc++-devel
18 BuildRequires:  pkgconfig
19 %if %{with qt4}
20 BuildRequires:  QtCore-devel
21 BuildRequires:  QtNetwork-devel
22 BuildRequires:  qjson-devel
23 BuildRequires:  qt4-build
24 BuildRequires:  qt4-qmake
25 %endif
26 %if %{with qt5}
27 BuildRequires:  Qt5Network-devel
28 BuildRequires:  Qt5Xml-devel
29 BuildRequires:  qt5-build
30 BuildRequires:  qt5-qmake
31 %endif
32 BuildRequires:  rpmbuild(macros) >= 1.605
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 # Unresolved symbol __stack_chk_fail in libechonest.so.2.1.0
36 %ifarch i486
37 %define skip_post_check_so      libechonest.so.%{version}
38 %endif
39
40 %description
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
43 Nest.
44
45 %package devel
46 Summary:        Development files for %{name}
47 Group:          Development/Libraries
48 Requires:       %{name} = %{version}-%{release}
49
50 %description devel
51 The %{name}-devel package contains libraries and header files for
52 developing applications that use %{name}.
53
54 %package -n libechonest-qt5
55 Summary:        libechonest Qt5 bindings
56 Group:          Libraries
57
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
61 Nest.
62
63 %package -n libechonest-qt5-devel
64 Summary:        Development files for libechonest-qt5
65 Group:          Development/Libraries
66 Requires:       libechonest-qt5 = %{version}-%{release}
67
68 %description -n libechonest-qt5-devel
69 Development files for libechonest-qt5.
70
71 %prep
72 %setup -q
73
74 %build
75 %if %{with qt4}
76 install -d build-qt4
77 cd build-qt4
78 %cmake \
79         -DBUILD_WITH_QT4:BOOL=ON \
80         -DECHONEST_BUILD_TESTS:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \
81         ..
82 %{__make}
83
84 %if %{with tests}
85 export PKG_CONFIG_PATH=$(pwd)
86 test "$(pkg-config --modversion libechonest)" = "%{version}"
87 %{__make} test ARGS="--timeout 300 --output-on-failure"
88 %endif
89
90 cd ..
91 %endif
92
93 %if %{with qt5}
94 install -d build-qt5
95 cd build-qt5
96 %cmake \
97         -DBUILD_WITH_QT4:BOOL=OFF \
98         -DECHONEST_BUILD_TESTS:BOOL=%{?with_tests:ON}%{!?with_tests:OFF} \
99         ..
100 %{__make}
101
102 %if %{with tests}
103 export PKG_CONFIG_PATH=$(pwd)
104 test "$(pkg-config --modversion libechonest5)" = "%{version}"
105 %{__make} test ARGS="--timeout 300 --output-on-failure"
106 %endif
107 %endif
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111 %if %{with qt4}
112 %{__make} -C build-qt4 install/fast \
113         DESTDIR=$RPM_BUILD_ROOT
114 %endif
115
116 %if %{with qt5}
117 %{__make} -C build-qt5 install/fast \
118         DESTDIR=$RPM_BUILD_ROOT
119 %endif
120
121 %clean
122 rm -rf $RPM_BUILD_ROOT
123
124 %post   -p /sbin/ldconfig
125 %postun -p /sbin/ldconfig
126
127 %post   -n libechonest-qt5 -p /sbin/ldconfig
128 %postun -n libechonest-qt5 -p /sbin/ldconfig
129
130 %if %{with qt4}
131 %files
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
137
138 %files devel
139 %defattr(644,root,root,755)
140 %{_includedir}/echonest
141 %{_libdir}/libechonest.so
142 %{_pkgconfigdir}/libechonest.pc
143 %endif
144
145 %if %{with qt5}
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
152
153 %files -n libechonest-qt5-devel
154 %defattr(644,root,root,755)
155 %{_includedir}/echonest5
156 %{_libdir}/libechonest5.so
157 %{_pkgconfigdir}/libechonest5.pc
158 %endif
This page took 0.081201 seconds and 4 git commands to generate.