File barcode.spec of Package barcode
#
# spec file for package barcode
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: barcode
%if %suse_version <= 1220
BuildRequires: texlive
%else
BuildRequires: makeinfo
BuildRequires: texinfo
BuildRequires: texlive-dvips
BuildRequires: texlive-tex
BuildRequires: texlive-texinfo
%endif
Version: 0.98
Release: 0
Summary: Text-Mode Barcode Creation Utility
License: GPL-2.0+
Group: Productivity/Graphics/Other
Url: http://www.gnu.org/software/barcode/barcode.html
Source: ftp://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.gz
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
# PATCH-FIX-UPSTREAM fix mem leak (bnc#537525)
Patch5: %{name}-%{version}-leak-fix.patch
# PATCH-FIX-UPSTREAM fix memory leak (bnc#546020)
Patch6: %{name}-%{version}-memoryleak.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.
%package devel
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.
%prep
%setup
%patch
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%build
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}
%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