File verbiste.spec of Package verbiste

#
# spec file for package verbiste
#
# Copyright (c) 2017 SUSE LINUX 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:           verbiste
Version:        0.1.44
Release:        0
Summary:        French conjugation system
License:        GPL-2.0+
Group:          Productivity/Other
Url:            http://sarrazip.com/dev/verbiste.html
Source:         https://perso.b2b2c.ca/~sarrazip/dev/%{name}-%{version}.tar.gz
Patch0:         %{name}-0.1.44-desktop.patch
BuildRequires:  gcc-c++
BuildRequires:  gettext
BuildRequires:  libglade2-devel
BuildRequires:  libgnomeui-devel
BuildRequires:  libxml2-devel
BuildRequires:  perl-XML-Parser
BuildRequires:  update-desktop-files
BuildRequires:  vala-devel
Requires:       texlive-latex
Requires:       verbiste-gnome = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This package contains a database of French conjugation templates
and a list of more than 6000 regular and irregular French verbs
with their corresponding template.  One can obtain the complete
conjugation for a verb from its infinitive form, and obtain the mode,
tense and person from a conjugated verb.  The library comes with two
command-line tools named french-conjugator and french-deconjugator
(see their manual pages).

%description -l fr
Ce paquet contient une base de données de modèles de conjugaison
du français et une liste de plus de 6000 verbes réguliers et
irréguliers avec leur modèle correspondant.  On peut obtenir
la conjugaison complète pour un verbe à partir de sa forme
infinitive, ou encore obtenir le mode, le temps et la personne à
partir d'un verbe conjugué.  La librairie vient avec deux outils à
ligne de commande nommés french-conjugator et french-deconjugator
(voir leurs pages de manuel).

%package devel
Summary:        C++ development files for the Verbiste library
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       libgnomeui-devel
Requires:       libxml2-devel

%description devel
C++ development files for the Verbiste library.

Verbiste contains a database of French conjugation templates
and a list of more than 6000 regular and irregular French verbs
with their corresponding template.

%package gnome
Summary:        GNOME Panel applet and application based on Verbiste
Group:          System/GUI/GNOME
Requires:       %{name} = %{version}

%description gnome
GNOME Panel applet and application based on Verbiste.

Verbiste contains a database of French conjugation templates
and a list of more than 6000 regular and irregular French verbs
with their corresponding template.

%package console
Summary:        GUI-equivalent console app
Group:          Productivity/Office/Dictionary
Requires:       %{name} = %{version}

%description console
GUI-equivalent console application for verbiste.

%prep
%setup -q
%patch0 -p1
sed -i "s|libpanelapplet-2.0|libpanelapplet-4.0|g" configure
sed -i "/^docdir/cdocdir=@docdir@/" Makefile.in

%build
%configure \
    --docdir=%{_defaultdocdir}/%{name} \
    --with-gnome-app \
    --with-console-app \
    --disable-maintainer-mode \
    --without-examples
make %{?_smp_mflags}

%install
make install DESTDIR=%{buildroot} INSTALL="install -p"
%suse_update_desktop_file -n %{name} Office Dictionary

%find_lang %{name}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-, root, root)
%doc %{_defaultdocdir}/%{name}/*
%dir %{_defaultdocdir}/%{name}
%dir %{_mandir}/fr
%dir %{_mandir}/fr/man3
%{_libdir}/lib*.so.*
%{_mandir}/man*/*.*
%{_mandir}/*/man*/*.*
%{_bindir}/french-*
%{_datadir}/%{name}*
%dir %{_datadir}/texmf
%dir %{_datadir}/texmf/tex
%dir %{_datadir}/texmf/tex/latex

%files devel
%defattr(-, root, root)
%{_includedir}/*
%{_libdir}/lib*.so
%{_libdir}/lib*.la
%{_libdir}/pkgconfig/*

%files gnome -f %{name}.lang
%defattr(-, root, root)
%dir %{_datadir}/icons/hicolor/512x512
%dir %{_datadir}/icons/hicolor/512x512/apps
%{_bindir}/%{name}
%{_bindir}/%{name}-gtk
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/verbiste.png
%{_datadir}/icons/hicolor/scalable/apps/verbiste.svg
%{_datadir}/texmf/tex/latex/*

%files console
%defattr(-, root, root)
%{_bindir}/%{name}-console

%changelog
openSUSE Build Service is sponsored by