Search
j0ke.net Open Build Service
>
Projects
>
multimedia
>
libmtp
> libmtp.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File libmtp.spec of Package libmtp (Revision 6)
Currently displaying revision
6
,
show latest
# norootforbuild %define soname 8 %define build_so7 1 %define build_so6 1 %if 0%{?suse_version} < 1030 %define build_so5 1 %define build_so4 1 %define build_so3 1 %if 0%{?suse_version} < 1020 %define build_so2 1 %else %define build_so2 0 %endif # 1020 %else %define build_so5 0 %define build_so4 0 %define build_so3 0 %define build_so2 0 %endif # 1030 Name: libmtp%{soname} %define pkg_version_so8 0.3.0 %define pkg_version_so7 0.2.6.1 %define pkg_version_so6 0.2.2 %define pkg_version_so5 0.1.5 %define pkg_version_so4 0.1.0 %define pkg_version_so3 0.0.17 %define pkg_version_so2 0.0.21 %define pkg_version_latest %{pkg_version_so8} Version: %{pkg_version_latest} Release: 5 Summary: Media Transfer Protocol (MTP) Library Source: http://prdownloads.sourceforge.net/libmtp/libmtp-%{pkg_version_so8}.tar.gz Source2: http://prdownloads.sourceforge.net/libmtp/libmtp-%{pkg_version_so2}.tar.gz Source3: http://prdownloads.sourceforge.net/libmtp/libmtp-%{pkg_version_so3}.tar.gz Source4: http://prdownloads.sourceforge.net/libmtp/libmtp-%{pkg_version_so4}.tar.gz Patch4: libmtp-0.1.0-no-libusb-dep.patch Source5: http://prdownloads.sourceforge.net/libmtp/libmtp-%{pkg_version_so5}.tar.gz Patch5: libmtp-0.1.5-no-libusb-dep.patch Source6: http://prdownloads.sourceforge.net/libmtp/libmtp-%{pkg_version_so6}.tar.gz Source7: http://prdownloads.sourceforge.net/libmtp/libmtp-%{pkg_version_so7}.tar.gz URL: http://sourceforge.net/projects/libmtp Group: Productivity/Multimedia/Sound/Players License: Lesser General Public License version 2 (LGPL v2) BuildRoot: %{_tmppath}/build-%{name}-%{pkg_version_latest} BuildRequires: gcc glibc-devel make doxygen %if 0%{?suse_version} >= 1030 || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version} BuildRequires: libusb-devel %else BuildRequires: libusb %endif BuildRequires: autoconf automake libtool # For backwards compatibility, as the libmtp package doesn't follow # the Shared Library Policy (at least up to openSUSE 10.3): Provides: libmtp = %{pkg_version_latest}-%{release} Obsoletes: libmtp Requires: libmtp-hal %description libmtp is a LGPL library implementation of the Media Transfer Protocol (MTP), a superset of the Picture Transfer Protocol (PTP). libmtp is an implementation of Microsoft's 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. Authors: -------- Linus Walleij <triad@df.lth.se> Marcus Meissner <meissner@suse.de> Richard Low <richard@wentnet.com> Mariusz Woloszyn <emsi@ipartners.pl> %package -n libmtp-tools Summary: Media Transfer Protocol (MTP) Command-Line Tools Group: System/Filesystems Requires: %{name} = %{pkg_version_latest}-%{release} Conflicts: libmtp2-tools %description -n libmtp-tools libmtp is a LGPL library implementation of the Media Transfer Protocol (MTP), a superset of the Picture Transfer Protocol (PTP). libmtp is an implementation of Microsoft's 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. Authors: -------- Linus Walleij <triad@df.lth.se> Marcus Meissner <meissner@suse.de> Richard Low <richard@wentnet.com> Mariusz Woloszyn <emsi@ipartners.pl> %package -n libmtp-hal Summary: Media Transfer Protocol (MTP) Library Group: Productivity/Multimedia/Sound/Players %description -n libmtp-hal libmtp is a LGPL library implementation of the Media Transfer Protocol (MTP), a superset of the Picture Transfer Protocol (PTP). libmtp is an implementation of Microsoft's 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. This package contains the HAL configuration for MTP devices. Authors: -------- Linus Walleij <triad@df.lth.se> Marcus Meissner <meissner@suse.de> Richard Low <richard@wentnet.com> Mariusz Woloszyn <emsi@ipartners.pl> %package -n libmtp-devel Summary: Media Transfer Protocol (MTP) Library Group: Development/Libraries/C and C++ Requires: %{name} = %{pkg_version_latest}-%{release} Conflicts: libmtp2-devel %description -n libmtp-devel libmtp is a LGPL library implementation of the Media Transfer Protocol (MTP), a superset of the Picture Transfer Protocol (PTP). libmtp is an implementation of Microsoft's 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. Authors: -------- Linus Walleij <triad@df.lth.se> Marcus Meissner <meissner@suse.de> Richard Low <richard@wentnet.com> Mariusz Woloszyn <emsi@ipartners.pl> %if %build_so7 %package -n libmtp7 Summary: Media Transfer Protocol (MTP) Library Version: %{pkg_version_so7} Group: Productivity/Multimedia/Sound/Players Requires: libmtp-hal %description -n libmtp7 Compatibility package for libmtp.so.7 %endif %if %build_so6 %package -n libmtp6 Summary: Media Transfer Protocol (MTP) Library Version: %{pkg_version_so6} Group: Productivity/Multimedia/Sound/Players Requires: libmtp-hal %description -n libmtp6 Compatibility package for libmtp.so.6 %endif %if %build_so5 %package -n libmtp5 Summary: Media Transfer Protocol (MTP) Library Version: %{pkg_version_so5} Group: Productivity/Multimedia/Sound/Players Requires: libmtp-hal %description -n libmtp5 Compatibility package for libmtp.so.5 %endif %if %build_so4 %package -n libmtp4 Summary: Media Transfer Protocol (MTP) Library Version: %{pkg_version_so4} Group: Productivity/Multimedia/Sound/Players Requires: libmtp-hal %description -n libmtp4 Compatibility package for libmtp.so.4 %endif %if %build_so3 %package -n libmtp3 Summary: Media Transfer Protocol (MTP) Library Version: %{pkg_version_so3} Group: Productivity/Multimedia/Sound/Players Requires: libmtp-hal %description -n libmtp3 Compatibility package for libmtp.so.3 %endif %if %build_so2 %package -n libmtp2 Summary: Media Transfer Protocol (MTP) Library Version: %{pkg_version_so2} Group: Productivity/Multimedia/Sound/Players %ifarch x86_64 ppc64 sparc64 amd64 ia64 Provides: libmtp2.so.2()(64bit) %else Provides: libmtp2.so.2() %endif Obsoletes: libmtp2 Provides: libmtp2 = %{pkg_version_so2}-%{release} Requires: libmtp-hal %description -n libmtp2 Compatibility package for libmtp.so.2 %endif %debug_package %prep %setup -q -n "libmtp-%{pkg_version_latest}" %if %build_so2 %setup -q -D -T -a 2 -n "libmtp-%{pkg_version_latest}" %endif %if %build_so3 %setup -q -D -T -a 3 -n "libmtp-%{pkg_version_latest}" %endif %if %build_so4 %setup -q -D -T -a 4 -n "libmtp-%{pkg_version_latest}" pushd "libmtp-%{pkg_version_so4}" %patch4 popd %endif %if %build_so5 %setup -q -D -T -a 5 -n "libmtp-%{pkg_version_latest}" pushd "libmtp-%{pkg_version_so5}" %patch5 popd %endif %if %build_so6 %setup -q -D -T -a 6 -n "libmtp-%{pkg_version_latest}" %endif %if %build_so7 %setup -q -D -T -a 7 -n "libmtp-%{pkg_version_latest}" %endif %build for SUBDIR in . "libmtp-%{pkg_version_so7}" \ "libmtp-%{pkg_version_so6}" \ "libmtp-%{pkg_version_so5}" \ "libmtp-%{pkg_version_so4}" \ "libmtp-%{pkg_version_so3}" \ "libmtp-%{pkg_version_so2}"; do if [ -e "${SUBDIR}" ]; then pushd "${SUBDIR}" aclocal -I m4 --force automake -a autoconf --force %if 0%{?suse_version} > 1000 export CFLAGS="$CFLAGS -fstack-protector" %endif %configure %__make %{?jobs:-j%{jobs}} popd fi done %install %makeinstall for SUBDIR in "libmtp-%{pkg_version_so7}" \ "libmtp-%{pkg_version_so6}" \ "libmtp-%{pkg_version_so5}" \ "libmtp-%{pkg_version_so4}" \ "libmtp-%{pkg_version_so3}" \ "libmtp-%{pkg_version_so2}"; do if [ -e "${SUBDIR}" ]; then pushd "${SUBDIR}" # this method is more of a hack, but faster: %__cp -a ./src/.libs/libmtp.so.* "%{buildroot}%{_libdir}/" #__make DESTDIR="%{buildroot}/${SUBDIR}" install #__cp -a "%{buildroot}/${SUBDIR}%{_libdir}"/libmtp.so.* "%{buildroot}%{_libdir}/" #__rm -rf "%{buildroot}/${SUBDIR}" popd fi done # for backwards compatibility: %if %build_so2 %__ln_s libmtp.so.2 "%{buildroot}%{_libdir}/libmtp2.so.2" %endif %__rm -rf "%{buildroot}%{_datadir}/doc" for bin in "%{buildroot}%{_bindir}"/*; do case $bin in mtp-*) ;; *) mv "$bin" "${bin%/*}/mtp-${bin##*/}" ;; esac done %__install -D -c -m0644 libmtp.fdi "%{buildroot}%{_datadir}/hal/fdi/information/20thirdparty/10-usb-music-players-libmtp.fdi" %__install -d "%{buildroot}%{_docdir}/%{name}" for doc in AUTHORS ChangeLog COPYING README TODO; do %__install -m0644 "$doc" "%{buildroot}%{_docdir}/%{name}/" echo "%doc %{_docdir}/%{name}/${doc}" >> rpm-doc-files done %__cp -a doc/html "%{buildroot}%{_docdir}/%{name}/html" %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean %__rm -rf "%{buildroot}" %files -f rpm-doc-files %defattr(-,root,root) %{_libdir}/libmtp.so.%{soname} %{_libdir}/libmtp.so.%{soname}.*.* %files -n libmtp-hal %defattr(-,root,root) %dir %{_datadir}/hal %dir %{_datadir}/hal/fdi %dir %{_datadir}/hal/fdi/information %dir %{_datadir}/hal/fdi/information/20thirdparty %config %{_datadir}/hal/fdi/information/20thirdparty/10-usb-music-players-libmtp.fdi %files -n libmtp-tools %defattr(-,root,root) %{_bindir}/mtp-* %files -n libmtp-devel %defattr(-,root,root) %doc %{_docdir}/%{name}/html %{_includedir}/libmtp.h %{_libdir}/libmtp.so %{_libdir}/libmtp.la %{_libdir}/libmtp.a %{_libdir}/pkgconfig/libmtp.pc %if %build_so7 %files -n libmtp7 %defattr(-,root,root) %{_libdir}/libmtp.so.7 %{_libdir}/libmtp.so.7.*.* %endif %if %build_so6 %files -n libmtp6 %defattr(-,root,root) %{_libdir}/libmtp.so.6 %{_libdir}/libmtp.so.6.*.* %endif %if %build_so5 %files -n libmtp5 %defattr(-,root,root) %{_libdir}/libmtp.so.5 %{_libdir}/libmtp.so.5.*.* %endif %if %build_so4 %files -n libmtp4 %defattr(-,root,root) %{_libdir}/libmtp.so.4 %{_libdir}/libmtp.so.4.*.* %endif %if %build_so3 %files -n libmtp3 %defattr(-,root,root) %{_libdir}/libmtp.so.3 %{_libdir}/libmtp.so.3.*.* %endif %if %build_so2 %files -n libmtp2 %defattr(-,root,root) %{_libdir}/libmtp.so.2 %{_libdir}/libmtp.so.2.*.* %{_libdir}/libmtp2.so.2 %endif %changelog * Sun Nov 25 2007 Carsten Schoene <cs@linux-administrator.com> - reimport for SLE_10 build