commit 70c2b1e0d594defc964dd8656464045771935b6d
Author: Jakub Bogusz <[email protected]>
Date:   Sat Jan 11 10:32:08 2014 +0100

    - converted to PLD-compatible package; added udev bcond

 libusbx.spec | 94 +++++++++++++++++++++++++++++++++++++++++++++---------------
 1 file changed, 71 insertions(+), 23 deletions(-)
---
diff --git a/libusbx.spec b/libusbx.spec
index 68b328a..69714d8 100644
--- a/libusbx.spec
+++ b/libusbx.spec
@@ -1,17 +1,25 @@
+#
+# Conditional build:
+%bcond_without static_libs     # static library
+%bcond_without udev            # udev for device enumeration and hotplug 
support
+#
 Summary:       Library for accessing USB devices
+Summary(pl.UTF-8):     Biblioteka dostępu do urządzeń USB
 Name:          libusbx
 Version:       1.0.17
-Release:       0.1
-Source0:       
http://downloads.sourceforge.net/libusbx/%{name}-%{version}.tar.bz2
-# Source0-md5: 99467ca2cb81c19c4a172de9f30e7576
+Release:       1
 License:       LGPL v2+
 Group:         Libraries
+Source0:       
http://downloads.sourceforge.net/libusbx/%{name}-%{version}.tar.bz2
+# Source0-md5: 99467ca2cb81c19c4a172de9f30e7576
 URL:           http://sourceforge.net/apps/mediawiki/libusbx/
 BuildRequires: doxygen
-BuildRequires: systemd-devel
-BuildRequires: udev-devel
-Provides:      libusb1 = %{version}-%{release}
-Obsoletes:     libusb1 <= 1.0.9
+BuildRequires: glibc-devel >= 6:2.9
+%{?with_udev:BuildRequires:    udev-devel}
+Provides:      libusb = %{version}-%{release}
+Obsoletes:     libusb < 1.0.10
+Obsoletes:     libusb1 < 1.0.10
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 This package provides a way for applications to access USB devices.
@@ -22,28 +30,62 @@ started by most of the libusb-1.0 developers, after the 
original
 libusb project did not produce a new release for over 18 months.
 
 Note that this library is not compatible with the original libusb-0.1
-series, if you need libusb-0.1 compatibility install the libusb
+series, if you need libusb-0.1 compatibility install the libusb-compat
 package.
 
-%package        devel
-Summary:       Development files for %{name}
+%description -l pl.UTF-8
+Ten pakiet zapewnia aplikacjom sposób dostępu do urządzeń USB.
+
+Libusbx to odgałęzienie oryginalnego libusb, w pełni zgodny co do API
+i ABI zamiennik dla wydania libusb 1.0.9. Został utworzony przez
+większość programistów libusb-1.0 po tym, jak oryginalny projekt nie
+wydał nowej wersji przez ponad 18 miesięcy.
+
+Uwaga: ta biblioteka nie jest zgodna z pierwotną serią libusb-0.1; dla
+zgodności z nią należy zainstalować pakiet libusb-compat.
+
+%package devel
+Summary:       Header files for libusbx library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki libusbx
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
-Provides:      libusb1-devel = %{version}-%{release}
-Obsoletes:     libusb1-devel <= 1.0.9
+%{?with_udev:Requires: udev-devel}
+Provides:      libusb-devel = %{version}-%{release}
+Obsoletes:     libusb-devel < 1.0.10
+Obsoletes:     libusb1-devel < 1.0.10
+
+%description devel
+This package contains the header files for developing applications
+that use libusbx.
 
-%description    devel
-The %{name}-devel package contains libraries and header files for
-developing applications that use %{name}.
+%description devel -l pl.UTF-8
+Ten pakiet zawiera pliki nagłówkowe do rozwijania aplikacji
+wykorzystujących bibliotekę libusbx.
+
+%package static
+Summary:       Static libusbx library
+Summary(pl.UTF-8):     Statyczna biblioteka libusbx
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+Provides:      libusb-static = %{version}-%{release}
+Obsoletes:     libusb-static < 1.0.10
+Obsoletes:     libusb1-static < 1.0.10
+
+%description static
+Static libusbx library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka libusbx.
 
 %prep
 %setup -q
 
 %build
 %configure \
-       --disable-static \
-       --disable-silent-rules \
        --enable-examples-build \
+       --disable-silent-rules \
+       %{!?with_static_libs:--disable-static} \
+       %{!?with_udev:--disable-udev}
 
 %{__make}
 %{__make} -C doc docs
@@ -54,22 +96,28 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-rm $RPM_BUILD_ROOT%{_libdir}/*.la
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS COPYING README ChangeLog
-%{_libdir}/*.so.*
+%doc AUTHORS ChangeLog NEWS README TODO
+%attr(755,root,root) %{_libdir}/libusb-1.0.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libusb-1.0.so.0
 
 %files devel
 %defattr(644,root,root,755)
 %doc doc/html examples/*.c
+%attr(755,root,root) %{_libdir}/libusb-1.0.so
 %{_includedir}/libusb-1.0
-%{_libdir}/*.so
 %{_pkgconfigdir}/libusb-1.0.pc
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libusb-1.0.a
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libusbx.git/commitdiff/70c2b1e0d594defc964dd8656464045771935b6d

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to