Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > by-pkgid > 7cb02d11a2d8594c07738ab6d80d5391 > files > 4

kbarcode-2.0.6-1mdv2008.1.src.rpm

%define name	kbarcode
%define version	2.0.6
%define release	%mkrel 1

Summary:	A barcode and label printing application for KDE
Name:		%{name}
Version:	%{version}
Release:	%{release}
License:	GPLv2+
URL:		http://www.kbarcode.net
Group:		Publishing
Source0:	http://ovh.dl.sourceforge.net/sourceforge/kbarcode/%{name}-%{version}.tar.gz
Source1:	%{name}_16.png
Source2:	%{name}_32.png
Source3:	%{name}_48.png
Source4:	%{name}_1.4.0.pdf
Patch0:		kbarcode-detect-automake-1.10.patch
Patch3:		kbarcode-2.0.6-fix-desktop.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}
BuildRequires:	kdelibs-devel
BuildRequires:	chrpath
BuildRequires:  barcode-devel
BuildRequires:  desktop-file-utils
Requires:	barcode
Requires:	ghostscript

%description
KBarcode is a barcode and label printing application for KDE 3.
It can be used to print every thing from simple business cards
up to complex labels with several barcodes (e.g. article
descriptions).
KBarcode comes with an easy to use WYSIWYG label designer, a setup
wizard, batch import of labels (directly from the delivery note),
thousands of predefined labels, database managment tools and
translations in many languages. Even printing more than 10.000
labels in one go is no problem for KBarcode.
Additionally it is a simply xbarcode replacement for the creation
of barcodes. All major types of barcodes like EAN, UPC, CODE39 and
ISBN are supported.

It has support for databases, and you need a package like libqt3-mysql,
libqt3-odbc or libqt3-psql, together with a specific database installed.
Install the kbarcode-doc package for documentation on how to set it up.


%post
%{update_menus}
%update_icon_cache hicolor

%postun
%{clean_menus}
%clean_icon_cache hicolor


%files -f %{name}.lang
%defattr(-,root,root,-)
%{_bindir}/*
%{_libdir}/kde3/kfile_kbarcode.la
%{_libdir}/kde3/kfile_kbarcode.so
%{_datadir}/services/kfile_kbarcode.desktop
%dir %{_datadir}/apps/kbarcode
%{_datadir}/apps/kbarcode/*
%{_iconsdir}/hicolor/*/*/*.png
%{_iconsdir}/%{name}.png
%{_liconsdir}/%{name}.png
%{_miconsdir}/%{name}.png
%{_datadir}/applications/kde/kbarcode-batch.desktop
%{_datadir}/applications/kde/kbarcode-editor.desktop
%{_datadir}/mimelnk/application/kbarcode-label.desktop
%{_datadir}/applications/kde/kbarcode-single.desktop
%{_datadir}/applications/kde/kbarcode.desktop

#--------------------------------------------------------------------

%package doc
Summary:	Documentation for Kbarcode
Group:		Publishing

%description doc
KBarcode is a barcode and label printing application for KDE 3.
It can be used to print every thing from simple business cards
up to complex labels with several barcodes (e.g. article
descriptions).
This package provides documentation for Kbarcode.

%files doc
%defattr(-,root,root,-)
%doc AUTHORS COPYING README kbarcode/barcodes.html

#--------------------------------------------------------------------

%prep
%setup -q -n %name-%{version}
%patch0 -p0
%patch3 -p0

%build
make -f Makefile.cvs

%ifarch %ix86
CFLAGS="%optflags" CXXFLAGS="`echo %optflags |sed -e 's/-fomit-frame-pointer//' | sed -e 's/-ffast-math//'`" \
%else
CFLAGS="%optflags" CXXFLAGS="%optflags" \
%endif

%configure2_5x --with-xinerama \
	--enable-final 
%make


%install
rm -rf %{buildroot}
%makeinstall_std

desktop-file-install --vendor="" \
  --add-category="Utility" \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications/kde $RPM_BUILD_ROOT%{_datadir}/applications/kde/kbarcode.desktop

install -d %buildroot/%_miconsdir
install -d %buildroot/%_liconsdir
install -d %buildroot/%_iconsdir

install -m644 %SOURCE1 %buildroot/%_miconsdir/%name.png
install -m644 %SOURCE2 %buildroot/%_iconsdir/%name.png
install -m644 %SOURCE3 %buildroot/%_liconsdir/%name.png
install -m644 %SOURCE4 $RPM_BUILD_DIR/%{name}-%{version}

rm %buildroot/%{_datadir}/apps/kbarcode/barcodes.html

# disable rpath
chrpath -d %buildroot/%{_bindir}/%{name}
chrpath -d %buildroot/%{_libdir}/kde3/kfile_kbarcode.so

install -d %buildroot%{_datadir}/mimelnk/application
mv %buildroot%{_datadir}/applications/kde/kbarcode-label.desktop %buildroot%{_datadir}/mimelnk/application/

%{find_lang} %name

%clean
rm -rf %{buildroot}


%changelog
* Sun Jan 06 2008 Funda Wang <fundawang@mandriva.org> 2.0.6-1mdv2008.1
+ Revision: 145988
- New version 2.0.6

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request

* Mon Jun 18 2007 Nicolas Lécureuil <neoclust@mandriva.org> 2.0.5-1mdv2008.0
+ Revision: 40649
- [BUGFIX] Move mimetype files in the correct place (Bug #28817)


* Wed Nov 08 2006 Lenny Cartier <lenny@mandriva.com> 2.0.5-1mdv2007.0
+ Revision: 78119
- Update to 2.0.5
- Import kbarcode