summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-11-21 04:59:16 +0000
committerCoprDistGit <infra@openeuler.org>2024-11-21 04:59:16 +0000
commitf7f723af70477db521fc7d07bf8a7e18f942b6e2 (patch)
tree3f66cd439e2e11a4820e7d0ff68b4046b2b8be15
parent559a654f82364f83f2e59aff5bde2b9bfcb83fe1 (diff)
automatic import of libmtp
-rw-r--r--.gitignore1
-rw-r--r--0001-doc-Don-t-document-internal-endian-macros.patch26
-rw-r--r--libmtp.spec94
-rw-r--r--sources1
4 files changed, 122 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..b31a615 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/libmtp-1.1.22.tar.gz
diff --git a/0001-doc-Don-t-document-internal-endian-macros.patch b/0001-doc-Don-t-document-internal-endian-macros.patch
new file mode 100644
index 0000000..a1cf68a
--- /dev/null
+++ b/0001-doc-Don-t-document-internal-endian-macros.patch
@@ -0,0 +1,26 @@
+From 35275512f83d246ddbddd2be2b970925e73df45e Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess@hadess.net>
+Date: Mon, 9 Oct 2017 14:25:26 +0200
+Subject: [PATCH] doc: Don't document internal endian macros
+
+As those will change across platforms, and lead to multilib conflicts
+---
+ doc/Doxyfile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
+index 65c2b83..1bc3b16 100644
+--- a/doc/Doxyfile.in
++++ b/doc/Doxyfile.in
+@@ -1007,7 +1007,7 @@
+ # Note that the wildcards are matched against the file with absolute path, so to
+ # exclude all test directories for example use the pattern */test/*
+
+-EXCLUDE_PATTERNS =
++EXCLUDE_PATTERNS = */src/gphoto2-endian.h
+
+ # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+ # (namespaces, classes, functions, etc.) that should be excluded from the
+--
+2.14.2
+
diff --git a/libmtp.spec b/libmtp.spec
new file mode 100644
index 0000000..9b8ebbd
--- /dev/null
+++ b/libmtp.spec
@@ -0,0 +1,94 @@
+Name: libmtp
+Version: 1.1.22
+Release: 1
+Summary: An Initiator implementation of the Media Transfer Protocol (MTP) in the form of a library
+License: LGPL-2.1-or-later
+URL: https://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 gcc gettext-devel libtool
+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 -n libmtp-%{version} -p1
+
+%build
+%configure --disable-static --with-udev-rules=69-libmtp.rules --with-udev=%{_prefix}/lib/udev
+%make_build
+
+%install
+%make_install
+%delete_la
+rm -f $RPM_BUILD_ROOT%{_bindir}/mtp-delfile
+rm -f $RPM_BUILD_ROOT%{_bindir}/mtp-getfile
+rm -f $RPM_BUILD_ROOT%{_bindir}/mtp-newfolder
+rm -f $RPM_BUILD_ROOT%{_bindir}/mtp-sendfile
+rm -f $RPM_BUILD_ROOT%{_bindir}/mtp-sendtr
+pushd $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
+popd
+iconv -f iso-8859-1 -t utf-8 -o COPYING.utf8 COPYING
+touch -r COPYING COPYING.utf8; mv -f COPYING.utf8 COPYING
+mkdir -p -m 755 $RPM_BUILD_ROOT%{_pkgdocdir}
+install -p -m 644 AUTHORS README TODO \
+ $RPM_BUILD_ROOT%{_pkgdocdir}
+if [ $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}/html != $RPM_BUILD_ROOT%{_pkgdocdir}/html ] ; then \
+ mv $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}/html \
+ $RPM_BUILD_ROOT%{_pkgdocdir} ; \
+fi
+touch -r configure.ac \
+ $RPM_BUILD_ROOT%{_includedir}/*.h \
+ $RPM_BUILD_ROOT%{_libdir}/pkgconfig/*.pc
+
+%files
+%license COPYING
+%{_libdir}/%{name}.so.9*
+%{_udevrulesdir}/69-%{name}.rules
+%{_udevhwdbdir}/69-%{name}.hwdb
+%{_prefix}/lib/udev/mtp-probe
+%{_bindir}/mtp-*
+
+%files devel
+%{_libdir}/%{name}.so
+%{_pkgdocdir}
+%{_includedir}/%{name}.h
+%{_libdir}/pkgconfig/%{name}.pc
+
+%changelog
+* Thu Nov 21 2024 Funda Wang <fundawang@yeah.net> - 1.1.22-1
+- Upgrade to 1.1.22
+
+* Fri Apr 28 2023 wangkai <13474090681@163.com> - 1.1.21-1
+- Upgrade to 1.1.21
+
+* Mon Mar 28 2022 lin zhang <lin.zhang@turbolinux.com.cn> - 1.1.19-1
+- Upgrade to 1.1.19
+
+* Web Aug 04 2021 Liu Yinsi <liuyinsi@163.com> - 1.1.14-7
+- define use_mtpz only in one .c file
+
+* Tue Jun 08 2021 wulei <wulei80@huawei.com> - 1.1.14-6
+- fixes failed: error: no acceptable C compiler found in $PATH
+
+* Fri Nov 29 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.1.14-5
+- Package init
diff --git a/sources b/sources
new file mode 100644
index 0000000..c8fa374
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+93bfad9dd2cd21430aefeb43e34b4476 libmtp-1.1.22.tar.gz