libmtp/libmtp.spec

70 lines
2.1 KiB
RPMSpec
Raw Normal View History

2019-12-14 18:56:51 +08:00
Name: libmtp
Version: 1.1.14
Release: 5
Summary: An Initiator implementation of the Media Transfer Protocol (MTP) in the form of a library
License: LGPLv2+
URL: http://libmtp.sourceforge.net/
Source0: https://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch0: 0001-doc-Don-t-document-internal-endian-macros.patch
BuildRequires: libusbx-devel, doxygen, libgcrypt-devel, chrpath
Requires: udev
Provides: %{name}-examples%{?_isa} %{name}-examples
Obsoletes: %{name}-examples
%description
libmtp is an Initiator implementation of the Media Transfer Protocol (MTP)
in the form of a library suitable primarily for POSIX compliant operating systems.
We implement MTP Basic, the stuff proposed for standardization.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig, libusb1-devel, libgcrypt-devel
%description devel
This package includes development files for libmtp.
%prep
%autosetup -p1
%build
%configure --disable-static --with-udev-rules=69-libmtp.rules
%make_build
%install
%make_install
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}.la
cd $RPM_BUILD_ROOT%{_bindir}
ln -sf mtp-connect mtp-delfile
ln -sf mtp-connect mtp-getfile
ln -sf mtp-connect mtp-newfolder
ln -sf mtp-connect mtp-sendfile
ln -sf mtp-connect mtp-sendtr
cd -
iconv -f iso-8859-1 -t utf-8 -o COPYING.utf8 COPYING
touch -r COPYING COPYING.utf8; mv -f COPYING.utf8 COPYING
touch -r configure.ac $RPM_BUILD_ROOT%{_includedir}/*.h $RPM_BUILD_ROOT%{_libdir}/pkgconfig/*.pc
mv $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}/html html
chrpath -d $RPM_BUILD_ROOT{%{_bindir},/usr/lib/udev}/mtp*
%ldconfig_scriptlets
%files
%doc AUTHORS html README
%license COPYING
%{_libdir}/%{name}.so.9*
/usr/lib/udev/rules.d/69-%{name}.rules
/usr/lib/udev/hwdb.d/69-%{name}.hwdb
/usr/lib/udev/mtp-probe
%{_bindir}/mtp-*
%files devel
%{_libdir}/%{name}.so
%{_includedir}/%{name}.h
%{_libdir}/pkgconfig/%{name}.pc
%changelog
* Fri Nov 29 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.1.14-5
- Package init