From c6920f0532212b748f416243b7c0b417d72d9cec Mon Sep 17 00:00:00 2001 From: Automatic Build System Date: Fri, 5 Jan 2024 23:41:02 +0100 Subject: [PATCH] automatic version update by autodist [release 3.18-1mamba;Thu Apr 10 2014] --- README.md | 9 +++ highlight-2.15-doc_dir.patch | 15 ++++ highlight.spec | 141 +++++++++++++++++++++++++++++++++++ 3 files changed, 165 insertions(+) create mode 100644 highlight-2.15-doc_dir.patch create mode 100644 highlight.spec diff --git a/README.md b/README.md index 8db17e0..35fbf89 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,11 @@ # highlight +Highlight converts source code to formatted text with syntax highlighting. + +* Coloured output in HTML, XHTML, RTF, TeX, LaTeX, SVG, BBCode and XML format +* Supports 150+ programming languages +* Includes 40 colour themes +* Recognizes nested languages +* CLI, GUI and Lib builds available +* Platform independent + diff --git a/highlight-2.15-doc_dir.patch b/highlight-2.15-doc_dir.patch new file mode 100644 index 0000000..beb664e --- /dev/null +++ b/highlight-2.15-doc_dir.patch @@ -0,0 +1,15 @@ +--- highlight-2.15/src/gui-qt/showtextfile.cpp.orig 2010-03-31 16:47:25.000000000 +0200 ++++ highlight-2.15/src/gui-qt/showtextfile.cpp 2010-03-31 16:48:01.000000000 +0200 +@@ -53,10 +53,10 @@ + + + bool ShowTextFile::setFileName(const QString& fileName){ +-#ifndef HL_DOC_DIR ++#ifndef DOC_DIR + QFile file( QString("%1/%2").arg(QDir::currentPath()).arg( fileName )); + #else +- QFile file( QString("%1/%2").arg(HL_DOC_DIR).arg(fileName )); ++ QFile file( QString("%1/%2").arg(DOC_DIR).arg(fileName )); + #endif + if ( file.open( QIODevice::ReadOnly) ) { + QTextStream stream( &file ); diff --git a/highlight.spec b/highlight.spec new file mode 100644 index 0000000..8e2dcec --- /dev/null +++ b/highlight.spec @@ -0,0 +1,141 @@ +%define majver %(echo %version | cut -d. -f1-2) +Name: highlight +Version: 3.18 +Release: 1mamba +Summary: A universal source code to formatted text converter +Group: Development/Tools +Vendor: openmamba +Distribution: openmamba +Packager: Stefano Cotta Ramusino +URL: http://www.andre-simon.de/ +Source: http://www.andre-simon.de/zip/highlight-%{version}.tar.bz2 +Patch: highlight-2.15-doc_dir.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libgcc +BuildRequires: liblua51-devel +BuildRequires: libqt4-devel +BuildRequires: libreadline-devel +BuildRequires: libstdc++6-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Highlight converts source code to formatted text with syntax highlighting. + +* Coloured output in HTML, XHTML, RTF, TeX, LaTeX, SVG, BBCode and XML format +* Supports 150+ programming languages +* Includes 40 colour themes +* Recognizes nested languages +* CLI, GUI and Lib builds available +* Platform independent + +%package gui +Summary: highlight frontend +Group: Graphical Desktop/Applications/Development +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description gui +Highlight converts source code to formatted text with syntax highlighting. + +* Coloured output in HTML, XHTML, RTF, TeX, LaTeX, SVG, BBCode and XML format +* Supports 150+ programming languages +* Includes 40 colour themes +* Recognizes nested languages +* CLI, GUI and Lib builds available +* Platform independent + +This package contains the Qt-based GUI. + +%prep +%setup -q -n %{name}-%{majver} +%patch -p1 + +sed -i "s|\-llua5\.1||g" src/gui-qt/highlight.pro + +# Provides: exclude perl(highlight_pipe) from examples +cat <<__EOF__ > %{name}-perl.prov +#!/bin/sh +/usr/lib/rpm/perl.prov \$* | grep -v '^perl(highlight_pipe)$' +__EOF__ +%define __perl_provides %{_builddir}/%{name}-%{majver}/%{name}-perl.prov +chmod +x %{__perl_provides} + +# Requires: exclude perl(IPC::Open3) from examples +cat <<__EOF__ > %{name}-perl.req +#!/bin/sh +/usr/lib/rpm/perl.req \$* | grep -v '^perl(IPC::Open3)$' +__EOF__ +%define __perl_requires %{_builddir}/%{name}-%{majver}/%{name}-perl.req +chmod +x %{__perl_requires} + +%build +%make clean all gui \ + doc_dir=%{_defaultdocdir}/%{name}-%{version}/ + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +install -d %{buildroot}%{_datadir}/{application,pixmap}s + +%makeinstall install-gui + +desktop-file-install \ + --dir %{buildroot}%{_datadir}/applications \ + highlight.desktop + +# Remove documentation +rm -rf %{buildroot}%{_defaultdocdir} + +# Remove this example to avoid incorrect perl provides and requires +rm -rf examples/plugins/movabletype + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%files +%defattr(-,root,root) +%config(noreplace) %{_sysconfdir}/highlight +%{_bindir}/highlight +%dir %{_datadir}/highlight +%{_datadir}/highlight/* +%{_mandir}/man1/highlight.1* +%doc AUTHORS COPYING + +%files gui +%defattr(-,root,root,-) +%{_bindir}/highlight-gui +%{_datadir}/applications/highlight.desktop +%{_datadir}/pixmaps/highlight.xpm +#%doc ChangeLog README* TODO examples + +%changelog +* Thu Apr 10 2014 Automatic Build System 3.18-1mamba +- automatic version update by autodist + +* Fri Jan 17 2014 Automatic Build System 3.17-1mamba +- automatic version update by autodist + +* Wed Nov 06 2013 Automatic Build System 3.16.1-1mamba +- automatic version update by autodist + +* Thu Oct 03 2013 Automatic Build System 3.16-1mamba +- automatic version update by autodist + +* Fri Aug 16 2013 Automatic Build System 3.15-1mamba +- automatic version update by autodist + +* Wed Jun 05 2013 Automatic Build System 3.14-1mamba +- automatic version update by autodist + +* Tue Apr 23 2013 Silvan Calarco 3.13-1mamba +- update to 3.13 + +* Fri Feb 24 2012 Automatic Build System 3.7-1mamba +- automatic version update by autodist + +* Tue Jun 22 2010 Stefano Cotta Ramusino 2.16-1mamba +- update to 2.16 + +* Wed Mar 31 2010 Stefano Cotta Ramusino 2.15-1mamba +- package created by autospec