File mtpfs.spec of Package mtpfs
#
# spec file for package mtpfs
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%bcond_with mad
Name: mtpfs
Version: 1.1
Release: 0
Summary: FUSE filesystem for Media Transfer Protocol devices
License: GPL-3.0+
Group: Productivity/Multimedia/Other
Url: http://www.adebenham.com/mtpfs/
Source: %{name}-%{version}.tar.bz2
Source1: mtpfs.1
Source2: %{name}-rpmlintrc
Patch1: 01-memory-leak.diff
Patch2: 02-files-no-folders.diff
Patch3: mtpfs-1.1-no-return-in-nonvoid-function.patch
BuildRequires: fuse-devel
BuildRequires: libid3tag-devel
BuildRequires: libmtp-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gthread-2.0)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?with mad}
BuildRequires: libmad-devel
%endif
%description
MTPfs is a FUSE filesystem that supports reading and writing from any MTP
(Media Transfer Protocol) devices (as supported by libmtp), such as MP3
players, video players or digital cameras.
In addition to revealing media files on the connected device, MTPfs exposes a
virtual directory called "/Playlists" which contains the device's playlists as
m3u files.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
%configure \
%if ! 0%{with mad}
--enable-mad=no \
%endif
--disable-static
make %{?_smp_mflags}
%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
install -Dm644 %{SOURCE1} %{buildroot}%{_mandir}/man1/mtpfs.1
mkdir -p %{buildroot}/sbin
pushd %{buildroot}/sbin
ln -s %{_bindir}/mtpfs mount.mtpfs
popd
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_bindir}/mtpfs
/sbin/mount.mtpfs
%{_mandir}/man1/mtpfs.1*
%changelog