summaryrefslogtreecommitdiff
path: root/packaging/libmtp.spec
blob: cc4d63c41c43bcc8724527671943255b89fad962 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
%define _unpackaged_files_terminate_build 0

Name:       libmtp
Summary:    Library for media transfer protocol (mtp)
Version:    1.1.11
Release:    1
Group:      Network & Connectivity/Other
License:    LGPL-2.1
Source0:    libmtp-%{version}.tar.gz
Source1001: autogen.sh

ExcludeArch: %ix86 x86_64

Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(libexif)
BuildRequires: libtool-ltdl-devel
BuildRequires: gettext-devel

%description
Libmtp support media transfer protocol, role is initiator
This package contains the library.


%package devel
Summary:    libmtp development package
Requires:   %{name} = %{version}-%{release}

%description devel
This package contains the development files.

%prep
%setup -q -n %{name}-%{version}
cp %{SOURCE1001} .

%build
export CFLAGS+=" -fPIC -DTIZEN_EXT"
export LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed -Wl,--rpath=%{_libdir}"
#chmod 755 ./autogen.sh
%autogen
%configure --prefix=/usr --disable-static
make %{?jobs:-j%jobs}

%install
rm -rf %{buildroot}
%make_install

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%manifest libmtp.manifest
%defattr(-,root,root,-)
%{_libdir}/libmtp.so*
/lib/udev/rules.d/69-libmtp.rules

%files devel
%defattr(-,root,root,-)
%{_libdir}/libmtp.so*
%{_libdir}/pkgconfig/libmtp.pc
/usr/include/*
/lib/udev/mtp-probe
/usr/bin/mtp-hotplug