Name:		glabels
Version:	2.2.8
Release:	1%{?_dist_release}
Summary:	A program for creating labels and business cards for GNOME
Summary(ja):	GNOME 用のラベルと名刺を作成するためのプログラム

Group:		Applications/Publishing
License:	GPLv2+
URL:		http://glabels.sf.net

Source0:	http://dl.sf.net/%{name}/%{name}-%{version}.tar.bz2
#Patch0: 	%{name}-libxml-XML_PARSE_HUGE.patch

BuildRoot:	%{_tmppath}/%{name}-%{version}-root

BuildRequires:	desktop-file-utils
BuildRequires:	evolution-data-server-devel >= 1.8
BuildRequires:	gettext
BuildRequires:	gtk2-devel >= 2.10
BuildRequires:	glib2 >= 2.12
BuildRequires:	libglade2-devel >= 2.6
BuildRequires:	libgnomeui-devel >= 2.16
BuildRequires:	libSM-devel
BuildRequires:	libxml2 >= 2.6
BuildRequires:	perl-XML-Parser
BuildRequires:	scrollkeeper
BuildRequires:	intltool
BuildRequires:	gnome-doc-utils >= 0.3.2

Requires(post):	desktop-file-utils
Requires(post):	/sbin/ldconfig
Requires(post):	shared-mime-info

Requires(postun):	desktop-file-utils
Requires(postun):	/sbin/ldconfig
Requires(postun):	shared-mime-info

Requires:	%{name}-libs = %{version}-%{release}
Requires:	%{name}-doc = %{version}-%{release}
	
%description
gLabels is a lightweight program for creating labels and
business cards for the GNOME desktop environment.
It is designed to work with various laser/ink-jet peel-off
label and business card sheets that you'll find at most office
supply stores.

%description -l ja
gLabels はGNOME デスクトップ環境用のラベルや名刺を
作成するための軽量のプログラムです。
殆どのオフィス用品店で見つけることができる様々な
レーザー/インクジェット用のラベルや名刺用紙に対応するよう
設計されています。

%package	devel
Summary:	Development files for %{name}
Summary(ja):	%{name} の開発ファイル
License:	LGPLv2+
Group:		Development/Libraries
Requires:	%{name}-libs = %{version}-%{release}

%description	devel
This package contains the header files and development documentation for
libglabels. 

%description -l ja devel
このパッケージは libglabels のヘッダファイルと
開発ドキュメントを含んでいます。 


%package 	libs
License:	LGPLv2+
Summary:	Shared liblaries for %{name}
Summary(ja):	%{name} の共有ライブラリ
Group:		Development/Libraries

%description	libs
This package contains the shared libraries for %{name}. 

%description -l ja libs
このパッケージは %{name} の共有ライブラリを含んでいます。 


%package 	doc
License:	GFDL
Summary:	Runtime documentation for %{name}
Summary(ja):	%{name} の実行ドキュメント
Group:		Development/Libraries
Requires(post):	scrollkeeper
Requires(postun):	scrollkeeper

%description	doc
This package contains the runtime documentation and manual pages for %{name}. 

%description -l ja doc
このパッケージは %{name} の実行ドキュメントとマニュアルを含んでいます。  

%prep
%setup -q
#%patch0 -p1 -b .libxml-XML_PARSE_HUGE


%build
%configure --disable-update-mimedb --disable-update-desktopdb --disable-static
make %{?_smp_mflags}


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
desktop-file-install					\
	--vendor=vine					\
	--dir %{buildroot}%{_datadir}/applications	\
	--delete-original				\
	%{buildroot}%{_datadir}/applications/%{name}.desktop
%find_lang %{name}
## Fix encodings.
for DOC_FILE in AUTHORS ChangeLog NEWS; do
	%{_bindir}/iconv -f iso8859-1 -t utf-8 ${DOC_FILE} > ${DOC_FILE}.conv;
	mv -f ${DOC_FILE}.conv ${DOC_FILE};
done

rm -rf %{buildroot}%{_libdir}/libglabels.la
rm -rf %{buildroot}%{_libdir}/libglabels.a


%post
update-desktop-database &> /dev/null ||:
update-mime-database %{_datadir}/mime &> /dev/null ||:

%postun
update-desktop-database &> /dev/null ||:
update-mime-database %{_datadir}/mime &> /dev/null ||:


%post	libs -p /sbin/ldconfig

%postun	libs -p /sbin/ldconfig


%post	doc
scrollkeeper-update -q -o %{_datadir}/omf/%{name} ||:

%postun	doc
scrollkeeper-update -q ||:


%clean
rm -rf %{buildroot}


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING COPYING.README_FIRST NEWS README TODO
%{_bindir}/glabels*
%{_datadir}/application-registry/glabels.applications
%{_datadir}/applications/vine-glabels.desktop
%{_datadir}/glabels/
%{_datadir}/mime/packages/glabels.xml
%{_datadir}/mime-info/glabels.*
%{_datadir}/pixmaps/glabels/
%{_datadir}/pixmaps/glabels*.png

%files	devel
%defattr(-,root,root,-)
%doc AUTHORS COPYING-LIBGLABELS
%doc %{_datadir}/gtk-doc/html/libglabels
#%exclude %{_libdir}/libglabels.la
#%exclude %{_libdir}/libglabels.a
%{_includedir}/libglabels/
%{_libdir}/libglabels.so
%{_libdir}/pkgconfig/libglabels.pc

%files	libs
%defattr(-,root,root,-)
%doc AUTHORS COPYING-LIBGLABELS
%{_libdir}/libglabels.so.*

%files	doc
%defattr(-,root,root,-)
## Manual ("man") pages are automatically marked as %%doc by RPM. 
%doc AUTHORS COPYING-DOCS
%doc %{_datadir}/gnome/help/glabels/
%{_datadir}/omf/glabels/
%{_mandir}/man?/glabels.*


%changelog
* Thu Apr 29 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 2.2.8-1
- new upstream release
- add BuildRequires: gnome-doc-utils >= 0.3.2

* Wed Mar 3 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 2.2.7-1
- New upstream release
- dropt Patch0
- added BuildRequires: libSM-devel

* Wed Nov 18 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 2.2.6-1
- New upstream release
- changed BuildRequires: gtk2 to gtk2-devel
- added BuildRequires: intltool
- added Patch1 from Fedora

* Sun Jun 21 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 2.2.5-1
- initial build for VineSeed

* Wed Jan 07 2009 Peter Gordon <peter@thecodergeek.com> - 2.2.4-1
- Update to new upstream bug-fix release (2.2.4):
  * Corrected button order in "Open" and "Save as" dialogs.
  * Fixed performance problem when large number of fonts are installed.
  * Corrected several i18n problems.
  * Fixed "paste" bug that created phantom object views.
  * Fixed performance problem when many objects are selected.
  * New templates.  

* Tue Aug 26 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2.3-2
- fix license tag (again)

* Thu Aug 21 2008 Peter Gordon <peter@thecodergeek.com> - 2.2.3-1
- Update to new upstream bug-fix release (2.2.3).
- Drop glabels-batch segfault patch (fixed upstream).
  - fix-batch-segfault.patch 

* Fri Aug 08 2008 Peter Gordon <peter@thecodergeek.com> - 2.2.2-3
- Add patch from Casey Harkins to fix a segfault in glabels-batch:
  + fix-batch-segfault.patch
- Resolves: bug #458473.

* Mon Jul 21 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.2.2-2
- fix license tag

* Tue Mar 04 2008 Peter Gordon <peter@thecodergeek.com> - 2.2.2-1
- Update to new upstream bug-fix release (2.2.2).

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.2.1-2
- Autorebuild for GCC 4.3

* Mon Jan 28 2008 Peter Gordon <peter@thecodergeek.com> - 2.2.1-1
- Update to new upstream bug-fix release (2.2.1).

* Mon Jan 14 2008 Peter Gordon <peter@thecodergeek.com> - 2.2.0-1
- Update to new upstream release (2.2.0 Final); Yay!

* Sun Dec 16 2007 Peter Gordon <peter@thecodergeek.com> - 2.1.5-1
- Update to new upstream development snapshot (2.1.5).

* Tue Aug 21 2007 Peter Gordon <peter@thecodergeek.com> - 2.0.4-7
- Rebuild with new BuildID-enabled binutils. 

* Fri Aug 03 2007 Peter Gordon <peter@thecodergeek.com> - 2.0.4-6
- Update License tagging (GPLv2+). This necessitates a split of two
  subpackages:
  (1) glabels-doc: Runtime documentation for gLabels (GFDLv1.1+)
  (2) glabels-libs: Shared libraries for gLabels (LGPLv2+)
- Fix version in previous %%changelog entry.
- Lots and lots of aesthetic spec file changes.
- Remove X-Fedora category from desktop-file-install invocation.
- Add TODO to installed %%doc files. 

* Sun Aug 27 2006 Peter Gordon <peter@thecodergeek.com> - 2.0.4-5
- Add BR: perl(XML::Parser)
 
* Sun Aug 27 2006 Peter Gordon <peter@thecodergeek.com> - 2.0.4-4
- Mass FC6 rebuild

* Wed Jul 05 2006 Peter Gordon <peter@thecodergeek.com> - 2.0.4-3
- Add BuildRequires: gettext (#197633)

* Sat Feb 18 2006 Jef Spaleta <jspaleta@gmail.com> - 2.0.4-2
- Bump for fe5 rebuild 

* Sat Jan 01 2006 Jef Spaleta <jspaleta@gmail.com> - 2.0.4-1
- Update to new stable upstream version

* Thu Aug 18 2005 Jef Spaleta <jspaleta@gmail.com> - 2.0.3-3
- rebuild

* Thu Jul 7 2005 Jef Spaleta <jspaleta@gmail.com> - 2.0.3-2
- use Source0

* Mon Jul 5 2005 Jef Spaleta <jspaleta@gmail.com> - 2.0.3-1
- Initial fedora extras build

