File glabels.spec of Package glabels
#
# spec file for package glabels
#
# Copyright (c) 2011 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/
#
# norootforbuild
Name: glabels
Url: http://glabels.sourceforge.net/
License: GPLv2+
Group: Productivity/Office/Other
Version: 2.2.8
Release: 4
Summary: Label Editing and Printing Tool
Source: http://ftp.gnome.org/pub/GNOME/sources/glabels/2.2/glabels-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM glabels-build-fix.patch vuntz@opensuse.org -- Fix missing include, already fixed in git
Patch0: glabels-build-fix.patch
BuildRequires: evolution-data-server-devel
BuildRequires: fdupes
BuildRequires: glib2-devel
BuildRequires: gnome-doc-utils-devel
BuildRequires: gtk2-devel
BuildRequires: libglade2-devel
BuildRequires: libgnomeui-devel
BuildRequires: libxml2-devel
BuildRequires: update-desktop-files
BuildRequires: intltool
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Recommends: %{name}-lang
%description
Labels is a powerful tool for editing and printing all kinds of labels.
It comes with a lot of templates of standard labels.
%package devel
License: GPLv2+
Summary: Label Editing and Printing Tool - Development Files
Group: Development/Libraries/GNOME
Requires: %{name} = %{version}
Requires: glib2-devel
Requires: libxml2-devel
%description devel
Labels is a powerful tool for editing and printing all kinds of labels.
It comes with a lot of templates of standard labels.
This package contains all necessary include files and libraries needed
to develop applications that require these.
%lang_package
%prep
%setup -q
%patch0 -p1
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
# FIXME: Build as root modifies system!
%configure\
--disable-static \
--disable-update-mimedb \
--disable-update-desktopdb \
--disable-scrollkeeper
make %{?jobs:-j%jobs}
%install
%makeinstall
find %{buildroot} -type f -name "*.la" -delete -print
# delete scrollkeeper directory. configure does not understand --disable-scrollkeeper.
rm -rf %{buildroot}%{_localstatedir}/scrollkeeper
%suse_update_desktop_file glabels WordProcessor
%find_lang %{name} %{?no_lang_C}
rm -r $RPM_BUILD_ROOT%{_datadir}/mime-info $RPM_BUILD_ROOT%{_datadir}/application-registry
%fdupes -s %{buildroot}
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%post
/sbin/ldconfig
%if 0%{?suse_version} > 1130
%desktop_database_post
%mime_database_post
%else
if test -x usr/bin/update-mime-database ; then
usr/bin/update-mime-database /usr/share/mime >/dev/null
fi
%endif
%postun
/sbin/ldconfig
%if 0%{?suse_version} > 1130
%desktop_database_postun
%mime_database_postun
%else
if test -x usr/bin/update-mime-database ; then
usr/bin/update-mime-database /usr/share/mime >/dev/null
fi
%endif
%files
%defattr(-,root,root)
%doc AUTHORS COPYING README TODO
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%dir %{_datadir}/omf/
%dir %{_datadir}/omf/%{name}/
%doc %{_datadir}/omf/%{name}/%{name}-C.omf
%{_bindir}/*
%{_libdir}/*.so.*
%{_datadir}/applications/*.desktop
%{_datadir}/glabels
%{_datadir}/mime/packages/glabels.xml
%{_datadir}/pixmaps/*.png
%{_datadir}/pixmaps/glabels
%doc %{_mandir}/man?/*.*
%files devel
%defattr(-,root,root)
%{_includedir}/libglabels
%{_libdir}/pkgconfig/libglabels.pc
%{_libdir}/*.so
%{_datadir}/gtk-doc/html/libglabels
%files lang -f %{name}.lang
%changelog