]> git.pld-linux.org Git - packages/liblastfm.git/blob - liblastfm.spec
isolate fingerprint deps
[packages/liblastfm.git] / liblastfm.spec
1 # NOTE:
2 # - qt5 build fails to find files if rpm BUILD dir is symlink
3 #
4 # Conditional build:
5 %bcond_without  qt4             # Qt4
6 %bcond_without  qt5             # Qt5
7 %bcond_without  fingerprint             # build/include liblastfm_fingerprint
8
9 Summary:        Library to access Last.fm features
10 Name:           liblastfm
11 Version:        1.0.9
12 Release:        1
13 License:        GPL v3
14 Group:          Libraries
15 Source0:        https://github.com/lastfm/liblastfm/archive/%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5:  8748f423f66f2fbc38c39f9153d01a71
17 URL:            https://github.com/lastfm/liblastfm
18 BuildRequires:  cmake >= 2.8.6
19 BuildRequires:  libstdc++-devel
20 BuildRequires:  pkgconfig
21 BuildRequires:  sed >= 4.0
22 %if %{with fingerprint}
23 BuildRequires:  fftw3-single-devel
24 BuildRequires:  libsamplerate-devel
25 %endif
26 %if %{with qt4}
27 BuildRequires:  QtDBus-devel
28 BuildRequires:  QtGui-devel
29 BuildRequires:  QtNetwork-devel
30 BuildRequires:  QtSql-devel
31 BuildRequires:  QtTest-devel
32 BuildRequires:  QtXml-devel
33 BuildRequires:  qt4-build
34 BuildRequires:  qt4-qmake
35 %endif
36 %if %{with qt5}
37 BuildRequires:  Qt5DBus-devel
38 BuildRequires:  Qt5Gui-devel
39 BuildRequires:  Qt5Network-devel
40 BuildRequires:  Qt5Sql-devel
41 BuildRequires:  Qt5Test-devel
42 BuildRequires:  Qt5Xml-devel
43 BuildRequires:  qt5-build
44 BuildRequires:  qt5-qmake
45 %endif
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 # includedir files "conflict"
49 %define         _duplicate_files_terminate_build   0
50
51 %description
52 liblastfm is a collection of libraries to help you integrate Last.fm
53 services into your rich desktop software. It is officially supported
54 software developed by Last.fm staff.
55
56 %package devel
57 Summary:        Header files for %{name}
58 Summary(pl.UTF-8):      Pliki nagłówkowe %{name}
59 Group:          Development/Libraries
60 Requires:       %{name} = %{version}-%{release}
61
62 %description devel
63 Header files for %{name}.
64
65 %description devel -l pl.UTF-8
66 Pliki nagłówkowe %{name}.
67
68 %package qt5
69 Summary:        Qt5 libraries to integrate Last.fm services
70 Group:          Libraries
71
72 %description qt5
73 Qt5 libraries to integrate Last.fm services.
74
75
76 %package qt5-devel
77 Summary:        Development files for liblastfm-qt5
78 Requires:       %{name}-qt5 = %{version}-%{release}
79
80 %description qt5-devel
81 Development files for liblastfm-qt5.
82
83 %prep
84 %setup -q
85
86 %build
87 %if %{with qt4}
88 install -d build-qt4
89 cd build-qt4
90 %cmake \
91         -DBUILD_WITH_QT4:BOOL=ON \
92         -DBUILD_FINGERPRINT:BOOL=%{?with_fingerprint:ON}%{!?with_fingerprint:OFF} \
93         ..
94 %{__make}
95 cd ..
96 %endif
97
98 %if %{with qt5}
99 install -d build-qt5
100 cd build-qt5
101 %cmake \
102         -DBUILD_WITH_QT4:BOOL=OFF \
103         -DBUILD_FINGERPRINT:BOOL=%{?with_fingerprint:ON}%{!?with_fingerprint:OFF} \
104         ..
105 %{__make}
106 cd ..
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 %if %{with qt4}
128 %files
129 %defattr(644,root,root,755)
130 %doc README.md
131 %attr(755,root,root) %{_libdir}/liblastfm.so.*.*
132 %attr(755,root,root) %ghost %{_libdir}/liblastfm.so.1
133 %if %{with fingerprint}
134 %attr(755,root,root) %{_libdir}/liblastfm_fingerprint.so.*.*
135 %attr(755,root,root) %ghost %{_libdir}/liblastfm_fingerprint.so.1
136 %endif
137
138 %files devel
139 %defattr(644,root,root,755)
140 %attr(755,root,root) %{_libdir}/%{name}.so
141 %if %{with fingerprint}
142 %attr(755,root,root) %{_libdir}/%{name}_fingerprint.so
143 %endif
144 %{_includedir}/lastfm
145 %endif
146
147 %if %{with qt5}
148 %files qt5
149 %defattr(644,root,root,755)
150 %doc README.md
151 %attr(755,root,root) %{_libdir}/liblastfm5.so.*.*.*
152 %attr(755,root,root) %ghost %{_libdir}/liblastfm5.so.1
153 %if %{with fingerprint}
154 %attr(755,root,root) %{_libdir}/liblastfm_fingerprint5.so.*.*.*
155 %attr(755,root,root) %ghost %{_libdir}/liblastfm_fingerprint5.so.1
156 %endif
157
158 %files qt5-devel
159 %defattr(644,root,root,755)
160 %{_libdir}/liblastfm5.so
161 %if %{with fingerprint}
162 %{_libdir}/liblastfm_fingerprint5.so
163 %endif
164 %{_includedir}/lastfm
165 %endif
This page took 0.097454 seconds and 3 git commands to generate.