Group :: Sistema/Bibliotecas
RPM: libmtp
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
%def_disable static
%define sover 9
Name: libmtp
Version: 1.1.21
Release: alt1
Packager: Dmitriy Khanzhin <jinn at altlinux.org>
Summary: a library for accessing Media Transfer Protocol devices
License: LGPLv2.1+
Group: System/Libraries
Url: http://libmtp.sourceforge.net/
Source: %name-%version.tar
BuildRequires: libusb-devel libgcrypt-devel
%package -n %name%sover
Summary: a library for accessing Media Transfer Protocol devices
Group: System/Libraries
Provides: %name = %version-%release
%package -n %name-devel
Summary: %name development environment
Group: Development/C
Requires: %name%sover = %version-%release
%package -n %name-devel-static
Summary: %name static development environment
Group: Development/C
Requires: %name-devel = %version-%release
%package -n %name-examples
Summary: %name usage examples
Group: Sound
Requires: %name%sover = %version-%release
%description
Libmtp is a LGPL library implementation of the Media Transfer Protocol (MTP),
a superset of the Picture Transfer Protocol (PTP).
%description -n %name%sover
Libmtp is a LGPL library implementation of the Media Transfer Protocol (MTP),
a superset of the Picture Transfer Protocol (PTP).
%description -n %name-devel
This package contains all files which are needs to compile programs using
the %name library.
%description -n %name-devel-static
This package contains libraries which are needs to compile programs statically
linked against %name library.
%description -n %name-examples
This package contains example programs for communicating with MTP devices.
%prep
%setup
%build
touch config.rpath
%autoreconf
%configure \
%{subst_enable static} \
--with-udev=/lib/udev \
--with-udev-group=audio \
--with-udev-mode=0660
%make_build
%install
%makeinstall_std
# Replace links with relative links
rm -f %buildroot%_bindir/mtp-{delfile,getfile,newfolder,sendfile,sendtr}
pushd %buildroot%_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
rm -rf %buildroot%_docdir/%name-%version/html
%files -n %name%sover
%_libdir/*.so.*
%_udevhwdbdir/*
%_udevrulesdir/*
/lib/udev/mtp-probe
%doc AUTHORS README TODO
%files -n %name-devel
%_includedir/*
%_pkgconfigdir/*
%_libdir/*.so
%if_enabled static
%files -n %name-devel-static
%_libdir/*.a
%endif
%files -n %name-examples
%_bindir/*
%changelog
…
Todas as alterações você pod ver aqui
%define sover 9
Name: libmtp
Version: 1.1.21
Release: alt1
Packager: Dmitriy Khanzhin <jinn at altlinux.org>
Summary: a library for accessing Media Transfer Protocol devices
License: LGPLv2.1+
Group: System/Libraries
Url: http://libmtp.sourceforge.net/
Source: %name-%version.tar
BuildRequires: libusb-devel libgcrypt-devel
%package -n %name%sover
Summary: a library for accessing Media Transfer Protocol devices
Group: System/Libraries
Provides: %name = %version-%release
%package -n %name-devel
Summary: %name development environment
Group: Development/C
Requires: %name%sover = %version-%release
%package -n %name-devel-static
Summary: %name static development environment
Group: Development/C
Requires: %name-devel = %version-%release
%package -n %name-examples
Summary: %name usage examples
Group: Sound
Requires: %name%sover = %version-%release
%description
Libmtp is a LGPL library implementation of the Media Transfer Protocol (MTP),
a superset of the Picture Transfer Protocol (PTP).
%description -n %name%sover
Libmtp is a LGPL library implementation of the Media Transfer Protocol (MTP),
a superset of the Picture Transfer Protocol (PTP).
%description -n %name-devel
This package contains all files which are needs to compile programs using
the %name library.
%description -n %name-devel-static
This package contains libraries which are needs to compile programs statically
linked against %name library.
%description -n %name-examples
This package contains example programs for communicating with MTP devices.
%prep
%setup
%build
touch config.rpath
%autoreconf
%configure \
%{subst_enable static} \
--with-udev=/lib/udev \
--with-udev-group=audio \
--with-udev-mode=0660
%make_build
%install
%makeinstall_std
# Replace links with relative links
rm -f %buildroot%_bindir/mtp-{delfile,getfile,newfolder,sendfile,sendtr}
pushd %buildroot%_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
rm -rf %buildroot%_docdir/%name-%version/html
%files -n %name%sover
%_libdir/*.so.*
%_udevhwdbdir/*
%_udevrulesdir/*
/lib/udev/mtp-probe
%doc AUTHORS README TODO
%files -n %name-devel
%_includedir/*
%_pkgconfigdir/*
%_libdir/*.so
%if_enabled static
%files -n %name-devel-static
%_libdir/*.a
%endif
%files -n %name-examples
%_bindir/*
%changelog
…
Todas as alterações você pod ver aqui