File barcode.spec of Package barcode

#
# spec file for package barcode (Version 0.98)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           barcode
BuildRequires:  texlive
License:        GPL v2 or later
Group:          Productivity/Graphics/Other
AutoReqProv:    on
Version:        0.98
Release:        395
Summary:        Text-Mode Barcode Creation Utility
Url:            http://www.gnu.org/software/barcode/barcode.html
Source:         ftp://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.bz2
Patch:          %{name}-%{version}.patch
Patch1:         %{name}-%{version}-bookland.patch
Patch2:         %{name}-%{version}-info.patch
Patch3:         %{name}-%{version}-gcc_warning.patch
Patch4:         %{name}-%{version}-nohtmltoinfo.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
GNU Barcode is meant to meet most barcode creation needs with a
conventional printer. It can create printouts for the conventional
product tagging standards: UPC-A, UPC-E, EAN-13, EAN-8, ISBN, as well
as a few other formats. Output is generated in either PostScript or
Encapsulated PostScript format.



Authors:
--------
    Alessandro Rubini <rubini@gnu.org>

%package devel
License:        GPL v2 or later
Summary:        Barcode creation library
Group:          Development/Libraries/C and C++
PreReq:         %install_info_prereq

%description devel
The barcode-devel package contains library for creating barcode output
files. It can create printouts for the conventional product tagging
standards: UPC-A, UPC-E, EAN-13, EAN-8, ISBN, as well as a few other
formats. Output is generated as either Postscript or Encapsulated
Postscript.



Authors:
--------
    Alessandro Rubini <rubini@gnu.org>

%prep
%setup
%patch
%patch1
%patch2
%patch3
%patch4

%build
%{?suse_update_config:%{suse_update_config -f}}
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
./configure --mandir=%{_mandir} \
	    --prefix=%{_prefix} \
            --infodir=%{_infodir} \
            --sysconfdir=%{_sysconfdir}
make

%install
make DESTDIR=$RPM_BUILD_ROOT \
     LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
     install
install --mode=0755 bookland/bookland.py $RPM_BUILD_ROOT/%{_bindir}
install -m 644 doc/%{name}.info $RPM_BUILD_ROOT%{_infodir}

%clean
rm -rf $RPM_BUILD_ROOT

%post devel
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%postun devel
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%files
%defattr(-, root, root)
%doc COPYING README INSTALL TODO
%doc %{_mandir}/man1/*
%{_bindir}/barcode
%{_bindir}/bookland.py

%files devel
%defattr(-, root, root)
%doc %{_mandir}/man3/*
%doc %{_infodir}/*
%{_prefix}/include/*
%{_libdir}/libbarcode.a

%changelog
* Fri Apr 11 2008 lmichnovic@suse.cz
- reenabled pdf creation, the ps2pdf is fixed now
  (*nohtmltoinfo.patch)
* Tue Apr 08 2008 lmichnovic@suse.cz
- fixed executable perm of info page
- not removing RPM_BUILD_ROOT in %%install section
* Tue Apr 08 2008 lmichnovic@suse.cz
- disabled generating html which was broken for a long time anyway
  and disabled pdf creation because broken ps2pdf
  (*nohtmltoinfo.patch)
* Fri Apr 20 2007 aj@suse.de
- Use texlive.
- Cleanup build requires.
* Thu Jan 26 2006 sbrabec@suse.cz
- Added %%install_info_prereq.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Sep 21 2005 lmichnovic@suse.cz
- fixed gcc warning
* Fri Dec 10 2004 ro@suse.de
- use ghostscript-x11-packages in neededforbuild
* Sun Jan 11 2004 adrian@suse.de
- build as user
* Fri Jun 20 2003 ltinkl@suse.cz
- updated sources to 0.98
- install bookland.py script
- correctly install info pages
* Mon Apr 08 2002 pmladek@suse.cz
- used macro %%{_libdir} to fix for lib64
- cleaned up spec file
* Mon Jan 07 2002 rvasice@suse.cz
- update to version 0.97
* Tue Jun 05 2001 rvasice@suse.cz
- initial package version 0.96
- fixed paths in Makefile.in, added DESTDIR