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/
#
Name: glabels
Version: 3.0.0
Release: 1
License: GPLv3+
Summary: Label Editing and Printing Tool
Url: http://glabels.sourceforge.net/
Group: Productivity/Office/Other
Source: http://ftp.gnome.org/pub/GNOME/sources/glabels/3.0/glabels-%{version}.tar.bz2
BuildRequires: barcode-devel
BuildRequires: fdupes
BuildRequires: intltool
# We need the %%mime_database_* macros
BuildRequires: shared-mime-info
BuildRequires: translation-update-upstream
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gnome-doc-utils)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(libebook-1.2)
BuildRequires: pkgconfig(librsvg-2.0)
BuildRequires: pkgconfig(libxml-2.0)
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires
%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
translation-update-upstream
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
# FIXME: Build as root modifies system!
%configure\
--disable-static \
--disable-scrollkeeper
make %{?_smp_mflags}
%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-3.0 WordProcessor
%find_lang %{name}-3.0 %{?no_lang_C}
%fdupes -s %{buildroot}
%clean
%{?buildroot:%__rm -rf %{buildroot}}
%post
/sbin/ldconfig
%if 0%{?suse_version} > 1130
%glib2_gsettings_schema_post
%icon_theme_cache_post
%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
%glib2_gsettings_schema_postun
%icon_theme_cache_postun
%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}-3.0/
%doc %{_datadir}/gnome/help/%{name}-3.0/C/
%{_bindir}/*
%{_libdir}/*.so.*
%{_datadir}/applications/*.desktop
%{_datadir}/glabels-3.0/
%{_datadir}/libglabels-3.0/
%{_datadir}/glib-2.0/schemas/org.gnome.glabels-3.gschema.xml
%{_datadir}/mime/packages/glabels-3.0.xml
%{_datadir}/icons/hicolor/*/apps/glabels-3.0.png
%{_datadir}/icons/hicolor/*/mimetypes/application-x-glabels.png
%doc %{_mandir}/man?/*.*
%files devel
%defattr(-,root,root)
%{_includedir}/libglabels-3.0/
%{_includedir}/libglbarcode-3.0/
%{_libdir}/pkgconfig/libglabels-3.0.pc
%{_libdir}/pkgconfig/libglbarcode-3.0.pc
%{_libdir}/*.so
%{_datadir}/gtk-doc/html/libglabels-3.0/
%{_datadir}/gtk-doc/html/libglbarcode-3.0/
%files lang -f %{name}-3.0.lang
%changelog