1 |
%define major 4 |
2 |
%define libname %mklibname ifp %{major} |
3 |
%define develname %mklibname -d ifp |
4 |
|
5 |
Summary: iRiver driver library |
6 |
Name: libifp |
7 |
Version: 1.0.0.2 |
8 |
Release: %mkrel 18 |
9 |
License: GPLv2+ |
10 |
Group: System/Libraries |
11 |
Source0: %{name}-%{version}.tar.gz |
12 |
Source1: libifp.hotplug |
13 |
Source2: 10-libifp.rules |
14 |
Patch0: libifp-1.0.0.2-human-readable.patch |
15 |
Patch1: libifp-1.0.0.2-warn-not-error.patch |
16 |
Patch100: libifp-1.0.0.2-fix-broken-configure.in.diff |
17 |
Patch101: libifp-1.0.0.2-fix-broken-configure-again.diff |
18 |
|
19 |
BuildRequires: pkgconfig(libusb) |
20 |
URL: https://ifp-driver.sourceforge.net/ |
21 |
|
22 |
%description |
23 |
An interface for IRiver's flash-based portable music players |
24 |
|
25 |
%package -n %{libname} |
26 |
Summary: iRiver driver library |
27 |
Group: System/Libraries |
28 |
|
29 |
%description -n %{libname} |
30 |
Libraries for iRiver driver |
31 |
|
32 |
%package -n %{develname} |
33 |
Summary: iRiver driver library development files |
34 |
Group: Development/C |
35 |
Provides: %{name}-devel = %{version}-%{release} |
36 |
Requires: %{libname} = %{version} |
37 |
Obsoletes: %mklibname -d ifp 4 |
38 |
|
39 |
%description -n %{develname} |
40 |
This package includes the header files and shared libraries |
41 |
necessary for developing programs which will access iRiver using |
42 |
the %{name} library. |
43 |
|
44 |
If you are going to develop programs which will access iRiver devices, |
45 |
you should install this package. |
46 |
|
47 |
%prep |
48 |
%setup -q |
49 |
%autopatch -p1 |
50 |
|
51 |
%build |
52 |
# fix build on aarch64 |
53 |
autoreconf -vfi |
54 |
|
55 |
%configure \ |
56 |
--with-libusb \ |
57 |
--disable-static |
58 |
%make_build |
59 |
|
60 |
%install |
61 |
%make_install |
62 |
|
63 |
rm -f %{buildroot}%{_libdir}/*.la |
64 |
|
65 |
install -D -m 0755 %{SOURCE1} %buildroot/sbin/libifp-hotplug |
66 |
install -D -m 0644 %{SOURCE2} %buildroot%{_udevrulesdir}/10-libifp.rules |
67 |
|
68 |
%files |
69 |
%doc README ChangeLog TODO |
70 |
%{_bindir}/ifpline |
71 |
/sbin/* |
72 |
%{_udevrulesdir}/*.rules |
73 |
|
74 |
%files -n %{libname} |
75 |
%{_libdir}/libifp.so.%{major}{,.*} |
76 |
|
77 |
%files -n %{develname} |
78 |
%{_libdir}/libifp.so |
79 |
%{_includedir}/ifp.h |
80 |
%{_mandir}/man3/ifp.h.3* |