File xournal.spec of Package xournal

# spec file for package xournal
# Copyright (c) 2018 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

Name:           xournal
Release:        0
Summary:        An application for notetaking, sketching, and keeping a journal using a stylus
License:        GPL-2.0-or-later
Group:          Productivity/Office/Other
Patch0:         %{name}-implicit-funcs.patch
# PATCH-FIX-UPSTREAM xournal-Improve-window-title.patch --
Patch1:         %{name}-Improve-window-title.patch
# PATCH-FIX-UPSTREAM xournal-appdata.patch -- Add, translate and install appdata file
Patch2:         xournal-appdata.patch
# PATCH-FIX-UPSTREAM xournal-fix-strokes-on-Lenovo-active-pen.patch -- Fix strokes with Lenovo active pen 2; patches taken from upstream git
Patch3:         xournal-fix-strokes-on-Lenovo-active-pen.patch
BuildRequires:  automake >= 1.11.2
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  inkscape
BuildRequires:  intltool
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(atk)
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(fontconfig)
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(gdk-pixbuf-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gobject-2.0)
BuildRequires:  pkgconfig(gtk+-x11-2.0)
BuildRequires:  pkgconfig(libart-2.0)
BuildRequires:  pkgconfig(libgnomecanvas-2.0)
BuildRequires:  pkgconfig(pango)
BuildRequires:  pkgconfig(pangocairo)
BuildRequires:  pkgconfig(pangoft2)
BuildRequires:  pkgconfig(poppler-glib)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(zlib)

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

Xournal is an application for notetaking, sketching, and keeping a journal
using a stylus. You can also use it to annotate PDF files with scribbles or
text. It works similarly to applications like Microsoft Windows Journal or
It is free software (GNU GPL) and runs on Linux and other GTK+/Gnome platforms. 

%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

autoreconf -fi
intltoolize --force
make %{?_smp_mflags}

make %{?_smp_mflags} DESTDIR=%{buildroot} install
make DESTDIR=%{buildroot} desktop-install

for i in 24 32 48 64 128 256
  mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps
  mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/mimetypes
  inkscape -w ${i} -C pixmaps/%{name}.svg \
           -e %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png
  inkscape -w ${i} -C pixmaps/xoj.svg \
           -e %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/mimetypes/application-x-xoj.png

%suse_update_desktop_file %{name}
%find_lang %{name}

install -D -m 0644 %{name}.xml %{buildroot}%{_datadir}/mime/application/x-xoj.xml
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 0644 -t %{buildroot}%{_docdir}/%{name} AUTHORS COPYING ChangeLog NEWS README

%fdupes %{buildroot}%{_datadir}



%files -f %{name}.lang
%defattr(-, root, root)
%doc %{_docdir}/%{name}
%dir %{_datadir}/mimelnk
%dir %{_datadir}/mimelnk/application
%if 0%{?suse_version} < 1320
%dir %{_datadir}/appdata

openSUSE Build Service is sponsored by