|
Jochen Schmitt |
33efd8e |
Name: highlight
|
|
Jochen Schmitt |
33efd8e |
Summary: Universal source code to formatted text converter
|
|
|
b71bd8d |
Version: 4.8
|
|
|
29df3ff |
Release: %autorelease
|
|
|
8181b49 |
License: GPL-3.0-only
|
|
Jochen Schmitt |
33efd8e |
URL: http://www.andre-simon.de/
|
|
Jochen Schmitt |
ef1d751 |
Source0: http://www.andre-simon.de/zip/%{name}-%{version}.tar.bz2
|
|
|
7ffd7a5 |
|
|
|
dab1332 |
%bcond qt %[%{undefined rhel} || 0%{?rhel} < 10]
|
|
|
7ffd7a5 |
|
|
|
041f97f |
BuildRequires: gcc-c++
|
|
|
7ffd7a5 |
%if %{with qt}
|
|
|
ac027c8 |
BuildRequires: qt5-qtbase-devel
|
|
|
7ffd7a5 |
%endif
|
|
|
e1e7a44 |
BuildRequires: lua-devel, boost-devel
|
|
Jochen Schmitt |
33efd8e |
BuildRequires: desktop-file-utils
|
|
|
c85aa9f |
BuildRequires: make
|
|
|
cefe703 |
|
|
Jochen Schmitt |
32f3f27 |
%{?filter_setup:
|
|
Jochen Schmitt |
32f3f27 |
%filter_from_provides /^perl(/d;
|
|
Jochen Schmitt |
32f3f27 |
%filter_from_requires /^perl(/d;
|
|
|
678ec65 |
%filter_from_requires /^\/bin\/lua/d;
|
|
Jochen Schmitt |
32f3f27 |
%filter_setup
|
|
Jochen Schmitt |
32f3f27 |
}
|
|
Jochen Schmitt |
32f3f27 |
|
|
|
cefe703 |
%description
|
|
|
cefe703 |
A utility that converts sourcecode to HTML, XHTML, RTF, LaTeX, TeX,
|
|
|
cefe703 |
XSL-FO, XML or ANSI escape sequences with syntax highlighting.
|
|
|
cefe703 |
It supports several programming and markup languages.
|
|
|
cefe703 |
Language descriptions are configurable and support regular expressions.
|
|
|
cefe703 |
The utility offers indentation and reformatting capabilities.
|
|
|
cefe703 |
It is easily possible to create new language definitions and colour themes.
|
|
|
cefe703 |
|
|
|
7ffd7a5 |
%if %{with qt}
|
|
|
740211f |
%package gui
|
|
|
d6194a2 |
Summary: GUI for the highlight source code formatter
|
|
Jochen Schmitt |
33efd8e |
Requires: %{name} = %{version}-%{release}
|
|
|
740211f |
|
|
|
740211f |
%description gui
|
|
|
740211f |
A Qt-based GUI for the highlight source code formatter source.
|
|
|
7ffd7a5 |
%endif
|
|
|
740211f |
|
|
|
cefe703 |
%prep
|
|
|
5c83876 |
%autosetup
|
|
|
cefe703 |
|
|
|
cefe703 |
%build
|
|
|
0c48abd |
CFLAGS="$CFLAGS -fPIC %{optflags}"; export CFLAGS
|
|
|
0c48abd |
CXXFLAGS="$CXXFLAGS -fPIC %{optflags}"; export CXXFLAGS
|
|
|
0c48abd |
LDFLAGS="$LDFLAGS %{?__global_ldflags}"; export LDFLAGS
|
|
Rex Dieter |
51b831d |
|
|
|
8087f14 |
# disabled paralell builds to fix FTBFS on rawhide & highlight 3.52+
|
|
|
8087f14 |
#make_build all gui CFLAGS="${CFLAGS}" \
|
|
|
7ffd7a5 |
%{__make} all CFLAGS="${CFLAGS}" \
|
|
|
7ffd7a5 |
CXXFLAGS="${CXXFLAGS}" \
|
|
|
7ffd7a5 |
LDFLAGS="${LDFLAGS}" \
|
|
|
7ffd7a5 |
LFLAGS="-Wl,-O1 ${LDFLAGS}" \
|
|
|
7ffd7a5 |
PREFIX="%{_prefix}" \
|
|
|
7ffd7a5 |
conf_dir="%{_sysconfdir}/highlight/"
|
|
|
7ffd7a5 |
|
|
|
7ffd7a5 |
%if %{with qt}
|
|
|
7ffd7a5 |
%{__make} gui CFLAGS="${CFLAGS}" \
|
|
|
0c48abd |
CXXFLAGS="${CXXFLAGS}" \
|
|
|
0c48abd |
LDFLAGS="${LDFLAGS}" \
|
|
|
0c48abd |
LFLAGS="-Wl,-O1 ${LDFLAGS}" \
|
|
|
501d30d |
PREFIX="%{_prefix}" \
|
|
|
501d30d |
conf_dir="%{_sysconfdir}/highlight/" \
|
|
|
0c48abd |
QMAKE="%{_qt5_qmake}" \
|
|
|
ac027c8 |
QMAKE_STRIP=
|
|
|
7ffd7a5 |
%endif
|
|
|
cefe703 |
|
|
|
cefe703 |
%install
|
|
|
501d30d |
%make_install PREFIX="%{_prefix}" conf_dir="%{_sysconfdir}/highlight/"
|
|
|
cefe703 |
|
|
|
740211f |
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
|
|
|
740211f |
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
|
|
7ffd7a5 |
%if %{with qt}
|
|
|
501d30d |
make install-gui DESTDIR=$RPM_BUILD_ROOT PREFIX="%{_prefix}" conf_dir="%{_sysconfdir}/highlight/"
|
|
|
7ffd7a5 |
%endif
|
|
|
740211f |
|
|
|
c8ae655 |
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/
|
|
|
c8ae655 |
|
|
|
740211f |
desktop-file-install \
|
|
|
740211f |
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
|
|
|
740211f |
highlight.desktop
|
|
|
740211f |
|
|
|
cefe703 |
%files
|
|
|
cefe703 |
%{_bindir}/highlight
|
|
|
cefe703 |
%{_datadir}/highlight/
|
|
|
d5eab8f |
%{_mandir}/man1/highlight.1*
|
|
|
501d30d |
%{_mandir}/man5/filetypes.conf.5*
|
|
|
4895c57 |
%{_datadir}/bash-completion/completions/highlight
|
|
|
4895c57 |
%{_datadir}/fish/vendor_completions.d/highlight.fish
|
|
|
4895c57 |
%{_datadir}/zsh/site-functions/_highlight
|
|
|
4a5cdc1 |
%config(noreplace) %{_sysconfdir}/highlight/
|
|
|
eb1e139 |
|
|
|
c10f0f7 |
%doc ChangeLog* AUTHORS README* extras/
|
|
|
3e42af5 |
%license COPYING
|
|
|
cefe703 |
|
|
|
7ffd7a5 |
%if %{with qt}
|
|
|
740211f |
%files gui
|
|
|
740211f |
%{_bindir}/highlight-gui
|
|
|
740211f |
%{_datadir}/applications/highlight.desktop
|
|
|
0107794 |
%{_datadir}/icons/hicolor/256x256/apps/highlight.png
|
|
|
7ffd7a5 |
%else
|
|
|
7ffd7a5 |
%exclude %{_datadir}/applications/highlight.desktop
|
|
|
7ffd7a5 |
%endif
|
|
|
740211f |
|
|
|
c10f0f7 |
|
|
|
cefe703 |
%changelog
|
|
|
29df3ff |
%autochangelog
|