LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File TeXmacs.spec of Package TeXmacs (Project Publishing)

#
# spec file for package TeXmacs
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 8/2011 - now  open-slx GmbH <Sascha.Manns@open-slx.de>
# Copyright (c) 2009 - 7/2011 Sascha Manns <saigkill@opensuse.org>
#
# 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

%define build_qt 1

Name:           TeXmacs
Version:        1.99.6
Release:        0
Summary:        A Structured WYSIWYG Scientific Text Editor
License:        GPL-2.0+
Group:          Productivity/Editors/Other
Url:            http://www.texmacs.org/
Source:         %{name}-%{version}-src.tar.bz2
# PATCH-FEATURE-UPSTREAM adapted from http://lists.gnu.org/archive/html/texmacs-dev/2017-09/msg00002.html
Patch0:         feature-maxima-inline-plots_18125aa.patch
BuildRequires:  automake
BuildRequires:  fdupes
BuildRequires:  freetype2-devel
BuildRequires:  gcc-c++
BuildRequires:  ghostscript-devel
# guile-devel could perhaps be removed since only the 1.8 version is to be used,
# but leaved here to be sure the build is also OK on systems where it is present
#BuildRequires:  guile-devel
%if 0%{?suse_version} >= 1210
# for 12.1, need the update repo (done in meta information)
BuildRequires:  libguile1-devel
%endif
BuildRequires:  lzma
BuildRequires:  shared-mime-info
BuildRequires:  update-desktop-files
BuildRequires:  xorg-x11-devel
%if %build_qt == 1
BuildRequires:  libqt4-devel
%endif
Requires:       texlive
# guile could perhaps be removed since only the 1.8 version is to be used,
# but leaved here to be sure the build is also OK on systems where it is present
#Requires:       guile
Requires:       pkgconfig(guile-1.8)
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
GNU TeXmacs is a free scientific text editor, inspired by TeX and GNU
Emacs. The editor allows you to write structured documents via a
WYSIWYG (what-you-see-is-what-you-get) and user friendly interface. New
styles can be created by the user. The program implements high-quality
typesetting algorithms and TeX fonts, which help you to produce
professional looking documents.

The high typesetting quality still goes through for automatically
generated formulas, which makes TeXmacs suitable as an interface for
computer algebra systems. TeXmacs also supports the Guile/Scheme
extension language, so that you may customize the interface and write
your own extensions to the editor.

In the future, TeXmacs is planned to evolve towards a complete
scientific office suite, with spreadsheet capabilities, a technical
drawing editor, and a presentation mode.

%package examples
Summary:        A Structured WYSIWYG Scientific Text Editor
Group:          Productivity/Editors/Other

%description examples
GNU TeXmacs is a free scientific text editor, inspired by TeX and GNU
Emacs. The editor allows you to write structured documents via a
WYSIWYG (what-you-see-is-what-you-get) and user friendly interface. New
styles can be created by the user. The program implements high-quality
typesetting algorithms and TeX fonts, which help you to produce
professional looking documents.

The high typesetting quality still goes through for automatically
generated formulas, which makes TeXmacs suitable as an interface for
computer algebra systems. TeXmacs also supports the Guile/Scheme
extension language, so that you may customize the interface and write
your own extensions to the editor.

In the future, TeXmacs is planned to evolve towards a complete
scientific office suite, with spreadsheet capabilities, a technical
drawing editor, and a presentation mode.

%prep
%setup -q -n %{name}-%{version}-src
%patch0 -p0

rm -f config.cache

%build
# lots of binaries in libexec, which would default to /usr/lib otherwise
%define configure_args_common --enable-optimize="%{optflags}" --libexec=%{_libdir}
%define configure_args_qt --enable-qt --enable-qtpipes
%define configure_args_guile GUILE_CFLAGS="`pkg-config --static --cflags guile-1.8`" GUILE_LDFLAGS="`pkg-config --static --libs guile-1.8`" GUILE_DATA_PATH="`pkg-config --variable=datadir guile-1.8`" GUILE_VERSION="`pkg-config --modversion guile-1.8`"

autoreconf -f -i

%if %build_qt == 1
%define configure_args %{configure_args_common} %{configure_args_qt} %{configure_args_guile}
%else
%define configure_args %{configure_args_common} %{configure_args_guile}
%endif

%configure %{configure_args}
# this the recommended way to use make with multiple jobs
make %{?_smp_mflags}

%install
%make_install STRIP=:
rm -rf %{buildroot}%{_datadir}/%{name}/plugins/{maple/src.9,mathematica/src.lazy}
rm -f %{buildroot}%{_libdir}/TeXmacs/bin/*.bat
rm -f %{buildroot}%{_includedir}/%{name}.h
%suse_update_desktop_file texmacs Office WordProcessor
# texmacs mime files are 
# mime/packages/texmacs.xml
# mime/text/x-texmacs.xml
# remove other files (system ones)
find %{buildroot}%{_datadir}/mime/ -maxdepth 1 -type f -delete
%fdupes %{buildroot}/%{_prefix}

%post
%if 0%{?suse_version} < 1330
%desktop_database_post
%endif

%postun
%if 0%{?suse_version} < 1330
%desktop_database_postun
%endif

%files
%defattr(-, root, root)
%{_bindir}/*
%{_libdir}/TeXmacs
%dir %{_datadir}/TeXmacs
# all but examples under TeXmacs/
# LICENSE must stay there, otherwise
# Error: help file $TEXMACS_PATH/LICENSE not found
%doc %{_datadir}/TeXmacs/LICENSE
%{_datadir}/TeXmacs/doc
%{_datadir}/TeXmacs/fonts
%{_datadir}/TeXmacs/langs
%{_datadir}/TeXmacs/misc
%{_datadir}/TeXmacs/packages
%{_datadir}/TeXmacs/plugins
%{_datadir}/TeXmacs/progs
%{_datadir}/TeXmacs/styles
%{_datadir}/TeXmacs/texts
%dir %{_datadir}/application-registry
%{_datadir}/application-registry/texmacs.applications
%{_datadir}/applications/*.desktop
%dir %{_datadir}/icons/gnome
%dir %{_datadir}/icons/gnome/scalable
%dir %{_datadir}/icons/gnome/scalable/apps
%dir %{_datadir}/icons/gnome/scalable/mimetypes
%{_datadir}/icons/gnome/scalable/apps/TeXmacs.svg
%{_datadir}/icons/gnome/scalable/mimetypes/text-texmacs.svg
%{_datadir}/mime-info
%{_datadir}/mime/packages/texmacs.xml
%{_datadir}/mime/text/x-texmacs.xml
%{_datadir}/pixmaps/*.xpm
%doc %{_mandir}/man?/*.*

%files examples
%defattr(-, root, root)
%{_datadir}/TeXmacs/examples

%changelog