File xournal.spec of Package xournal
#
# spec file for package xournal
#
# Copyright (c) 2016 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: xournal
Version: 0.4.8
Release: 0
Summary: An application for notetaking, sketching, and keeping a journal using a stylus
License: GPL-2.0+
Group: Productivity/Office/Other
Url: http://math.mit.edu/~auroux/software/xournal/
Source: %{name}-%{version}.tar.gz
Patch0: %{name}-implicit-funcs.patch
# PATCH-FIX-UPSTREAM xournal-german-translation.patch -- https://sourceforge.net/p/xournal/bugs/152/ -> is fixed in git
Patch1: %{name}-german-translation.patch
# PATCH-FIX-UPSTREAM xournal-Improve-window-title.patch -- https://sourceforge.net/p/xournal/patches/79/
Patch2: %{name}-Improve-window-title.patch
# PATCH-FIX-UPSTREAM xournal-appdata.patch badshah400@gmail.com -- Add, translate and install appdata file
Patch3: xournal-appdata.patch
BuildRequires: automake >= 1.11.2
BuildRequires: fdupes
BuildRequires: gtk2-devel
BuildRequires: hicolor-icon-theme
BuildRequires: inkscape
BuildRequires: intltool
BuildRequires: libgnomecanvas-devel
BuildRequires: libpoppler-glib-devel
BuildRequires: update-desktop-files
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Xournal is an application for notetaking, sketching, keeping a journal
using a stylus. It is free software (GNU GPL) and runs on Linux (recent
distributions) and other GTK+/Gnome platforms. It is similar to
Microsoft Windows Journal or to other alternatives such as Jarnal and
Gournal.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
autoreconf -fi
intltoolize --force
%configure
make %{?_smp_mflags}
%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
make DESTDIR=%{buildroot} desktop-install
# GENERATE AND INSTALL HIRES ICONS IN HICOLOR ICON DIR
for i in 24 32 48 64 128 256
do
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
done
%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}
%post
%desktop_database_post
%icon_theme_cache_post
%mime_database_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%mime_database_postun
%files -f %{name}.lang
%defattr(-, root, root)
%doc %{_docdir}/%{name}
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%{_datadir}/icons/hicolor/*/mimetypes/*xoj.*
%{_datadir}/mime/packages/xournal.xml
%{_datadir}/mime/application/x-xoj.xml
%dir %{_datadir}/mimelnk
%dir %{_datadir}/mimelnk/application
%{_datadir}/mimelnk/application/x-xoj.desktop
%if 0%{?suse_version} < 1320
%dir %{_datadir}/appdata
%endif
%changelog