fec00e9
# SPEC file for libmtp, primary target is the Fedora Extras
fec00e9
# RPM repository.
fec00e9
fec00e9
Name:           libmtp
75f9b74
Version:        0.2.1
712131d
Release:        2%{?dist}
fec00e9
Summary:        A software library for MTP media players
fec00e9
URL:            http://libmtp.sourceforge.net/
fec00e9
fec00e9
Group:          System Environment/Libraries
fec00e9
Source0:        http://download.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
fec00e9
Source1:        libmtp.perms
fec00e9
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
712131d
License:        LGPLv2+
fec00e9
Requires:       udev
fec00e9
Requires:       pam
e03d7b8
Requires:	hal
fec00e9
BuildRequires:  libusb-devel
fec00e9
BuildRequires:  doxygen
fec00e9
fec00e9
%description
fec00e9
This package provides a software library for communicating with MTP
fec00e9
(Media Transfer Protocol) media players, typically audio players, video
fec00e9
players etc.
fec00e9
fec00e9
%package examples
fec00e9
Summary:        Example programs for libmtp
fec00e9
Group:          Applications/Multimedia
fec00e9
Requires:       %{name} = %{version}-%{release}
fec00e9
fec00e9
%description examples
fec00e9
This package provides example programs for communicating with MTP
fec00e9
devices.
fec00e9
fec00e9
%package devel
fec00e9
Summary:        Development files for libmtp
fec00e9
Group:          System Environment/Libraries
fec00e9
Requires:       %{name} = %{version}-%{release}
fec00e9
Requires:       pkgconfig
fec00e9
Requires:       libusb-devel
fec00e9
fec00e9
%description devel
fec00e9
This package provides development files for the libmtp
fec00e9
library for MTP media players.
fec00e9
fec00e9
%prep
fec00e9
%setup -q
fec00e9
fec00e9
%build
fec00e9
%configure --disable-static --program-prefix=mtp-
fec00e9
make %{?_smp_mflags}
fec00e9
# Remove permissions from symlink in udev script, we use
fec00e9
# PAM to fix the permissions instead.
fec00e9
examples/hotplug -a"SYMLINK+=\"libmtp-%k\"" > libmtp.rules
fec00e9
fec00e9
%install
fec00e9
rm -rf $RPM_BUILD_ROOT
fec00e9
make DESTDIR=$RPM_BUILD_ROOT install
fec00e9
# Remove libtool archive remnant
fec00e9
rm -f $RPM_BUILD_ROOT%{_libdir}/libmtp.la
fec00e9
# Install udev rules file.
fec00e9
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
fec00e9
install -p -m 644 libmtp.rules $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/60-libmtp.rules
e03d7b8
mkdir -p $RPM_BUILD_ROOT%{_datadir}/hal/fdi/information/10freedesktop
e03d7b8
install -p -m 644 libmtp.fdi $RPM_BUILD_ROOT%{_datadir}/hal/fdi/information/10freedesktop/10-usb-music-players-libmtp.fdi
fec00e9
# Install device permissions
fec00e9
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/security/console.perms.d/
fec00e9
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/security/console.perms.d/60-libmtp.perms
fec00e9
# Copy documentation to a good place
fec00e9
install -p -m 644 AUTHORS ChangeLog COPYING INSTALL README TODO \
fec00e9
$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
fec00e9
fec00e9
%clean
fec00e9
rm -rf $RPM_BUILD_ROOT
fec00e9
fec00e9
%post -p /sbin/ldconfig
fec00e9
%postun -p /sbin/ldconfig
fec00e9
fec00e9
%files
fec00e9
%defattr(-, root,root,-)
fec00e9
%{_libdir}/*.so.*
fec00e9
%config(noreplace) %{_sysconfdir}/udev/rules.d/*
fec00e9
%config(noreplace) %{_sysconfdir}/security/console.perms.d/*
e03d7b8
%config(noreplace) %{_datadir}/hal/fdi/information/10freedesktop/10-usb-music-players-libmtp.fdi
fec00e9
%files examples
fec00e9
%defattr(-,root,root,-)
fec00e9
%{_bindir}/*
fec00e9
fec00e9
%files devel
fec00e9
%defattr(-,root,root,-)
fec00e9
%{_libdir}/*.so
fec00e9
%dir %{_docdir}/%{name}-%{version}
fec00e9
%{_docdir}/%{name}-%{version}/*
fec00e9
%{_includedir}/*.h
fec00e9
%{_libdir}/pkgconfig/*.pc
fec00e9
fec00e9
fec00e9
%changelog
712131d
* Fri Aug 17 2007 Linus Walleij <triad@df.lth.se> 0.2.1-2
712131d
- License field update from LGPL to LGPLv2+
712131d
75f9b74
* Tue Aug 7 2007 Linus Walleij <triad@df.lth.se> 0.2.1-1
75f9b74
- Upstream bugfix release.
75f9b74
32a1f40
* Sat Aug 4 2007 Linus Walleij <triad@df.lth.se> 0.2.0-1
32a1f40
- New upstream release.
32a1f40
- Fixes (hopefully) the issues found by Harald.
32a1f40
- Dependent apps will need to recompile and patch some minor code.
32a1f40
8188950
* Mon Jul 30 2007 Harald Hoyer <harald@redhat.com> - 0.1.5-2
8188950
- changed udev rules for new kernel and udev versions
8188950
69da348
* Mon Mar 26 2007 Linus Walleij <triad@df.lth.se> 0.1.5-1
69da348
- New upstream release.
69da348
- Candidate for FC5, FC6 backport.
69da348
- Hopefully API/ABI compatible, testing in devel tree.
69da348
4f775fa
* Wed Mar 7 2007 Linus Walleij <triad@df.lth.se> 0.1.4-1
4f775fa
- New upstream release.
4f775fa
- Candidate for FC5, FC6 backport.
4f775fa
- Hopefully API/ABI compatible, testing in devel tree.
4f775fa
0ff3871
* Wed Jan 17 2007 Linus Walleij <triad@df.lth.se> 0.1.3-1
0ff3871
- New upstream release.
0ff3871
- Candidate for FC5, FC6 backport.
0ff3871
e03d7b8
* Thu Dec 7 2006 Linus Walleij <triad@df.lth.se> 0.1.0-1
e03d7b8
- New upstream release.
e03d7b8
- Start providing HAL rules.
e03d7b8
7ce0d59
* Fri Oct 20 2006 Linus Walleij <triad@df.lth.se> 0.0.21-1
7ce0d59
- New upstream release.
7ce0d59
fec00e9
* Tue Sep 26 2006 Linus Walleij <triad@df.lth.se> 0.0.20-1
fec00e9
- New upstream release.
fec00e9
- Updated after review by Parag AN, Kevin Fenzi and Ralf Corsepius.
fec00e9
- Fixed pkgconfig bug upstream after being detected by Ralf...
fec00e9
fec00e9
* Sun Aug 27 2006 Linus Walleij <triad@df.lth.se> 0.0.15-1
fec00e9
- New upstream release.
fec00e9
fec00e9
* Wed Aug 23 2006 Linus Walleij <triad@df.lth.se> 0.0.13-1
fec00e9
- First RPM'ed