Fix flatpak build

Flatpak builds use the host systemd rather than their own, and install
into the /app prefix.  We also need to avoid the hard dependency on
systemd/udev, which exists on host systems but are unwanted in
flatpak apps or runtimes.
This commit is contained in:
Yaakov Selkowitz 2023-01-19 20:55:32 -05:00
parent ab7046b0cd
commit 89bd0c0a4a

View File

@ -3,13 +3,13 @@
Name: libmtp
Version: 1.1.19
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Software library for MTP media players
URL: http://libmtp.sourceforge.net/
Source0: https://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
License: LGPLv2+
Requires: udev
Recommends: udev
BuildRequires: libtool
BuildRequires: gettext-devel
BuildRequires: gcc
@ -83,8 +83,8 @@ mkdir -p -m 755 $RPM_BUILD_ROOT%{_pkgdocdir}
install -p -m 644 AUTHORS README TODO \
$RPM_BUILD_ROOT%{_pkgdocdir}
# Move some autogenerated documentation where we want it
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 \
if [ $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html != $RPM_BUILD_ROOT%{_pkgdocdir}/html ] ; then \
mv $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html \
$RPM_BUILD_ROOT%{_pkgdocdir} ; \
fi
# Touch generated files to make them always have the same time stamp.
@ -113,6 +113,10 @@ chrpath --delete $RPM_BUILD_ROOT{%{_bindir},/usr/lib/udev}/mtp*
%{_libdir}/pkgconfig/libmtp.pc
%changelog
* Tue Feb 21 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 1.1.19-4
- Fix flatpak build
- Soften udev dependency for flatpaks
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.19-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild