Group :: Sistema/Bibliotecas
RPM: libmtp
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
%def_disable static
%define sover 8
Name: libmtp
Version: 0.3.7
Release: alt1
Packager: Dmitriy Khanzhin <jinn at altlinux.ru>
Summary: a library for accessing Media Transfer Protocol devices
License: LGPLv2.1+
Group: System/Libraries
Url: http://libmtp.sourceforge.net/
Source: %name-%version.tar
Patch1: libmtp-0.2.6-fix-udev-rules.patch
Patch2: libmtp-0.2.6-alt-set-udev-permissions.patch
# Automatically added by buildreq on Sat Apr 18 2009
BuildRequires: doxygen gcc-c++ libusb-compat-devel
%package -n %name%sover
Summary: a library for accessing Media Transfer Protocol devices
Group: System/Libraries
Provides: %name = %version-%release
Obsoletes: %{name}7
Obsoletes: %name < %version-%release
%package -n %name-devel
Summary: %name development environment
Group: Development/C
Requires: %name = %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: Accessibility
Requires: %name = %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
%patch1 -p1
%patch2 -p1
%build
%configure %{subst_enable static}
%make_build
%install
%make DESTDIR=%buildroot install
/bin/bzip2 -9 ChangeLog
/bin/install -D -m644 %name.rules %buildroot%_sysconfdir/udev/rules.d/90-%name%sover.rules
/bin/install -D -m644 %name.fdi %buildroot%_datadir/hal/fdi/information/20thirdparty/10-usb-music-players-%name%sover.fdi
%pre -n %name%sover
# create group
/usr/sbin/groupadd -fr camera || :
%files -n %name%sover
%_libdir/*.so.*
%_sysconfdir/udev/rules.d/*
%_datadir/hal/fdi/information/20thirdparty/*
%doc AUTHORS ChangeLog* README TODO
%files -n %name-devel
%_includedir/*
%_libdir/pkgconfig/*
%_libdir/*.so
%if_enabled static
%files -n %name-devel-static
%_libdir/*.a
%endif
%files -n %name-examples
%_bindir/*
%doc doc/html
%changelog
…
Todas as alterações você pod ver aqui
%define sover 8
Name: libmtp
Version: 0.3.7
Release: alt1
Packager: Dmitriy Khanzhin <jinn at altlinux.ru>
Summary: a library for accessing Media Transfer Protocol devices
License: LGPLv2.1+
Group: System/Libraries
Url: http://libmtp.sourceforge.net/
Source: %name-%version.tar
Patch1: libmtp-0.2.6-fix-udev-rules.patch
Patch2: libmtp-0.2.6-alt-set-udev-permissions.patch
# Automatically added by buildreq on Sat Apr 18 2009
BuildRequires: doxygen gcc-c++ libusb-compat-devel
%package -n %name%sover
Summary: a library for accessing Media Transfer Protocol devices
Group: System/Libraries
Provides: %name = %version-%release
Obsoletes: %{name}7
Obsoletes: %name < %version-%release
%package -n %name-devel
Summary: %name development environment
Group: Development/C
Requires: %name = %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: Accessibility
Requires: %name = %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
%patch1 -p1
%patch2 -p1
%build
%configure %{subst_enable static}
%make_build
%install
%make DESTDIR=%buildroot install
/bin/bzip2 -9 ChangeLog
/bin/install -D -m644 %name.rules %buildroot%_sysconfdir/udev/rules.d/90-%name%sover.rules
/bin/install -D -m644 %name.fdi %buildroot%_datadir/hal/fdi/information/20thirdparty/10-usb-music-players-%name%sover.fdi
%pre -n %name%sover
# create group
/usr/sbin/groupadd -fr camera || :
%files -n %name%sover
%_libdir/*.so.*
%_sysconfdir/udev/rules.d/*
%_datadir/hal/fdi/information/20thirdparty/*
%doc AUTHORS ChangeLog* README TODO
%files -n %name-devel
%_includedir/*
%_libdir/pkgconfig/*
%_libdir/*.so
%if_enabled static
%files -n %name-devel-static
%_libdir/*.a
%endif
%files -n %name-examples
%_bindir/*
%doc doc/html
%changelog
…
Todas as alterações você pod ver aqui