f6d3222
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
f6d3222
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
f6d3222
f6d3222
Name:           zbar
b131d30
Version:        0.10
b131d30
Release:        1%{?dist}
f6d3222
Summary:        Bar code reader
f6d3222
f6d3222
Group:          User Interface/X Hardware Support
f6d3222
License:        LGPLv2+
d1ffdbd
URL:            http://zbar.sourceforge.net/
f6d3222
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
f6d3222
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
f6d3222
092a56e
BuildRequires:  python-devel, gtk2-devel, pygtk2-devel, ImageMagick-c++-devel, libXv-devel, xmlto
092a56e
092a56e
%if 0%{?rhel}
092a56e
BuildRequires: qt4-devel
092a56e
%else
092a56e
BuildRequires: qt-devel
092a56e
%endif
f6d3222
f6d3222
%description
f6d3222
A layered barcode scanning and decoding library. Supports EAN, UPC, Code 128,
f6d3222
Code 39 and Interleaved 2 of 5.
f6d3222
Includes applications for decoding captured barcode images and using a video 
f6d3222
device (eg, webcam) as a barcode scanner.
f6d3222
f6d3222
%package devel
f6d3222
Group: Development/Libraries
f6d3222
Summary: Bar code library extra development files
f6d3222
Requires: pkgconfig, %{name} = %{version}-%{release}
f6d3222
f6d3222
%description devel
f6d3222
This package contains header files and additional libraries used for
f6d3222
developing applications that read bar codes with this library.
f6d3222
f6d3222
%package gtk
f6d3222
Group: Development/Libraries
f6d3222
Summary: Bar code reader GTK widget
f6d3222
Requires: %{name} = %{version}-%{release}
f6d3222
f6d3222
%description gtk
f6d3222
This package contains a bar code scanning widget for use with GUI
f6d3222
applications based on GTK+-2.0.
f6d3222
f6d3222
%package gtk-devel
f6d3222
Group: Development/Libraries
f6d3222
Summary: Bar code reader GTK widget extra development files
f6d3222
Requires: pkgconfig, %{name}-gtk = %{version}-%{release}, %{name}-devel = %{version}-%{release}
f6d3222
f6d3222
%description gtk-devel
f6d3222
This package contains header files and additional libraries used for
f6d3222
developing GUI applications based on GTK+-2.0 that include a bar code
f6d3222
scanning widget.
f6d3222
f6d3222
%package pygtk
f6d3222
Group: Development/Libraries
f6d3222
Summary: Bar code reader PyGTK widget
f6d3222
Requires: pygtk2, %{name}-gtk = %{version}-%{release}
f6d3222
f6d3222
%description pygtk
f6d3222
This package contains a bar code scanning widget for use in GUI
f6d3222
applications based on PyGTK.
f6d3222
f6d3222
%package qt
f6d3222
Group: Development/Libraries
f6d3222
Summary: Bar code reader Qt widget
f6d3222
Requires: %{name} = %{version}-%{release}
f6d3222
f6d3222
%description qt
f6d3222
This package contains a bar code scanning widget for use with GUI
f6d3222
applications based on Qt4.
f6d3222
f6d3222
%package qt-devel
f6d3222
Group: Development/Libraries
f6d3222
Summary: Bar code reader Qt widget extra development files
f6d3222
Requires: pkgconfig, %{name}-qt = %{version}-%{release}, %{name}-devel = %{version}-%{release}
f6d3222
f6d3222
%description qt-devel
f6d3222
This package contains header files and additional libraries used for
f6d3222
developing GUI applications based on Qt4 that include a bar code
f6d3222
scanning widget.
f6d3222
f6d3222
%prep
f6d3222
%setup -q
f6d3222
f6d3222
%build
f6d3222
%configure --docdir=%{_docdir}/%{name}-%{version}
f6d3222
f6d3222
# rpath
f6d3222
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
f6d3222
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
f6d3222
f6d3222
make %{?_smp_mflags}
f6d3222
f6d3222
%install
f6d3222
rm -rf $RPM_BUILD_ROOT
f6d3222
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
f6d3222
f6d3222
#Remove .la and .a files
f6d3222
find ${RPM_BUILD_ROOT} -name '*.la' -or -name '*.a' | xargs rm -f
f6d3222
f6d3222
%clean
f6d3222
rm -rf $RPM_BUILD_ROOT
f6d3222
f6d3222
%post -p /sbin/ldconfig
f6d3222
f6d3222
%post devel -p /sbin/ldconfig
f6d3222
f6d3222
%post gtk -p /sbin/ldconfig
f6d3222
f6d3222
%post qt -p /sbin/ldconfig
f6d3222
f6d3222
%postun -p /sbin/ldconfig
f6d3222
f6d3222
%postun devel -p /sbin/ldconfig
f6d3222
f6d3222
%postun gtk -p /sbin/ldconfig
f6d3222
f6d3222
%postun qt -p /sbin/ldconfig
f6d3222
f6d3222
%files
f6d3222
%defattr(-,root,root,-)
b131d30
%doc COPYING LICENSE NEWS
f6d3222
f6d3222
%{_bindir}/zbarimg
f6d3222
%{_bindir}/zbarcam
f6d3222
%{_libdir}/libzbar.so.*
f6d3222
%{_mandir}/man1/*
f6d3222
f6d3222
%files devel
f6d3222
%defattr(-,root,root,-)
f6d3222
%doc HACKING TODO
f6d3222
f6d3222
%{_libdir}/libzbar.so
f6d3222
%{_libdir}/pkgconfig/zbar.pc
f6d3222
%dir %{_includedir}/zbar
f6d3222
%{_includedir}/zbar.h
f6d3222
%{_includedir}/zbar/Exception.h
f6d3222
%{_includedir}/zbar/Symbol.h
f6d3222
%{_includedir}/zbar/Image.h
f6d3222
%{_includedir}/zbar/Scanner.h
f6d3222
%{_includedir}/zbar/Decoder.h
f6d3222
%{_includedir}/zbar/ImageScanner.h
f6d3222
%{_includedir}/zbar/Video.h
f6d3222
%{_includedir}/zbar/Window.h
f6d3222
%{_includedir}/zbar/Processor.h
f6d3222
f6d3222
%files gtk
f6d3222
%defattr(-,root,root,-)
f6d3222
%{_libdir}/libzbargtk.so.*
f6d3222
f6d3222
%files gtk-devel
f6d3222
%defattr(-,root,root,-)
f6d3222
%{_libdir}/libzbargtk.so
f6d3222
%{_libdir}/pkgconfig/zbar-gtk.pc
f6d3222
%{_includedir}/zbar/zbargtk.h
f6d3222
f6d3222
%files pygtk
f6d3222
%defattr(-,root,root,-)
f6d3222
%{python_sitearch}/zbarpygtk.so
f6d3222
%{python_sitearch}/zbar.so
f6d3222
f6d3222
%files qt
f6d3222
%defattr(-,root,root,-)
f6d3222
%{_libdir}/libzbarqt.so.*
f6d3222
f6d3222
%files qt-devel
f6d3222
%defattr(-,root,root,-)
f6d3222
%{_libdir}/libzbarqt.so
f6d3222
%{_libdir}/pkgconfig/zbar-qt.pc
f6d3222
%{_includedir}/zbar/QZBar*.h
f6d3222
f6d3222
%changelog
b131d30
* Mon Nov 02 2009 Bastien Nocera <bnocera@redhat.com> 0.10-1
b131d30
- Update to 0.10
b131d30
d1ffdbd
* Wed Jul 29 2009 Douglas Schilling Landgraf <dougsland@redhat.com> - 0.8-7
d1ffdbd
- Replace URL info
d1ffdbd
092a56e
* Wed Jul 29 2009 Itamar Reis Peixoto <itamar@ispbrasil.com.br> - 0.8-6
092a56e
- fix epel build
092a56e
f6d3222
* Thu Jul 28 2009 Douglas Schilling Landgraf <dougsland@redhat.com> - 0.8-5
f6d3222
- Now fixed Source0 url
f6d3222
- Removed ldconfig calls to devel subpackages
f6d3222
- Fixed directory ownership issue -pygtk
f6d3222
- Added %%{name} to URL
f6d3222
- Added comment to rpath 
f6d3222
- Improved comment for removing .la and .a files
f6d3222
f6d3222
* Thu Jul 27 2009 Douglas Schilling Landgraf <dougsland@redhat.com> - 0.8-4
f6d3222
- Fixed sourceforge url
f6d3222
- Removed redundant libX11-devel package from BuildRequires
f6d3222
- Removed redundant ImageMagick package from Requires
f6d3222
- Removed Provides for not included static libs
f6d3222
- Removed redundant requires to subpackages -qt and -gtk
f6d3222
- Removed redundant {name} = %%{version}-%%{release} from -pygtk
f6d3222
- Replaced macros from % to %% in changelog 
f6d3222
- Fixed ownership issue
f6d3222
- Added ldconfig call to devel, qt-devel and gtk-devel
f6d3222
f6d3222
* Thu Jul 24 2009 Douglas Schilling Landgraf <dougsland@redhat.com> - 0.8-3
f6d3222
- Fixed License from LGPLv2 to LGPLv2+
f6d3222
- Added to main BuildRequires libXv-devel and xmlto packages
f6d3222
- Removed pkgconfig from main BuildRequires
f6d3222
- Removed .la and .a files
f6d3222
- Removed version validation from ImageMagick-c++ and ImageMagick-c++-devel packages
f6d3222
- Replaced 3 {%%version} to %%{version} (packages: devel, qt-devel, gtk-devel)
f6d3222
- Removed duplicated description for each package
f6d3222
- Added %%{version}-%%{release} to packages: devel, gtk, gtk-devel, pygtk, qt
f6d3222
- Added pkgconfig to packages gtk-devel, qt-devel into Requires session
f6d3222
- Removed redundant packages
f6d3222
- Added dependency of gtk to pygtk
f6d3222
- Added timestamp on installed files
f6d3222
- Replaced %%{_datadir}/man to %%{_mandir}
f6d3222
- Removed INSTALL file
f6d3222
- Fixed %%doc session
f6d3222
- Added to -devel own of %%{_includedir}/zbar directory
f6d3222
- Replaced "%%{_libdir}/python*" to %%{python_sitearch}
f6d3222
- Fixed %%defattr
f6d3222
- Fixed Release Number and Changelog
f6d3222
- Fixed rpath error
f6d3222
f6d3222
* Thu Jul 16 2009 Douglas Schilling Landgraf <dougsland@redhat.com> - 0.8-2
f6d3222
- Added pkgconfig to devel package 
f6d3222
- Fixed syntax to ldconfig 
f6d3222
- Fixed warnings from rpmlint
f6d3222
- Fixed static path to docs
f6d3222
f6d3222
* Thu Jul 15 2009 Douglas Schilling Landgraf <dougsland@redhat.com> - 0.8-1
f6d3222
- First release, based on original zbar.spec provided by sources