File highlight.spec of Package highlight
#
# spec file for package highlight
#
# 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: highlight
Version: 3.31
Release: 0
Summary: Universal Source Code to Formatted Text Converter
License: GPL-3.0+
Group: Development/Tools/Other
Url: http://www.andre-simon.de/
Source0: http://www.andre-simon.de/zip/%{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE highlight-2.10-makefile_suse.patch
Patch0: highlight-2.10-makefile_suse.patch
# PATCH-FIX-OPENSUSE highlight-3.30-use_optflags.patch
Patch1: highlight-3.30-use_optflags.patch
BuildRequires: boost-devel
BuildRequires: gcc-c++
BuildRequires: libqt4-devel
BuildRequires: lua-devel
BuildRequires: update-desktop-files
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A utility that converts sourcecode to HTML, XHTML, RTF, LaTeX, TeX, XML or ANSI
escape sequences with syntax highlighting.
It supports several programming and markup languages.
Language descriptions are configurable and support regular expressions.
The utility offers indentation and reformatting capabilities.
It is easily possible to create new language definitions and colour themes.
%package gui
Summary: Universal Source Code to Formatted Text Converter
Group: Development/Tools/Other
Requires: %{name} = %{version}
%description gui
A utility that converts sourcecode to HTML, XHTML, RTF, LaTeX, TeX, XML or ANSI
escape sequences with syntax highlighting.
It supports several programming and markup languages.
Language descriptions are configurable and support regular expressions.
The utility offers indentation and reformatting capabilities.
It is easily possible to create new language definitions and colour themes.
%prep
%setup -q
%patch0 -p1
%patch1
%build
make QMAKE="qmake" OPTFLAGS="%{optflags}" %{?_smp_mflags}
make gui QMAKE="qmake" OPTFLAGS="%{optflags}" %{?_smp_mflags}
%install
%makeinstall install-gui
%suse_update_desktop_file -G "Text converter" -r %{name} Utility TextEditor
L="$PWD/%{name}.lang"
LDIR="%{_datadir}/%{name}/gui_files/l10n"
echo -n >"$L"
pushd "%{buildroot}$LDIR"
/bin/ls -1 *.qm | while read qm; do
[ -f "$qm" ] || continue
l="${qm#*_}"
l="${l%.qm}"
echo "%lang($l) $LDIR/$qm" >>"$L"
done
popd
%files
%defattr(-,root,root,-)
%dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/*
%{_bindir}/%{name}
%dir %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/filetypes.conf
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/langDefs
%{_datadir}/%{name}/langDefs/*.lang
%dir %{_datadir}/%{name}/plugins
%{_datadir}/%{name}/plugins/*.lua
%dir %{_datadir}/%{name}/themes
%{_datadir}/%{name}/themes/*.theme
%{_mandir}/man1/%{name}.1%{ext_man}
%exclude %{_docdir}/%{name}/INSTALL
%files gui -f "%{name}.lang"
%defattr(-,root,root,-)
%{_bindir}/%{name}-gui
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/%{name}/gui_files
%dir %{_datadir}/%{name}/gui_files/ext
%{_datadir}/%{name}/gui_files/ext/fileopenfilter.conf
%dir %{_datadir}/%{name}/gui_files/l10n
%{_datadir}/pixmaps/%{name}.xpm
%changelog