highlight/highlight.spec

111 lines
3.4 KiB
RPMSpec
Raw Normal View History

Name: highlight
Summary: Universal source code to formatted text converter
2023-09-09 05:26:42 +00:00
Version: 4.8
2023-09-09 05:15:03 +00:00
Release: %autorelease
2023-05-30 10:43:02 +00:00
License: GPL-3.0-only
URL: http://www.andre-simon.de/
Source0: http://www.andre-simon.de/zip/%{name}-%{version}.tar.bz2
%bcond qt %[%{undefined rhel} || 0%{?rhel} < 10]
2018-04-09 00:21:41 +00:00
BuildRequires: gcc-c++
%if %{with qt}
BuildRequires: qt5-qtbase-devel
%endif
2010-06-10 15:58:29 +00:00
BuildRequires: lua-devel, boost-devel
BuildRequires: desktop-file-utils
2022-08-25 03:35:27 +00:00
BuildRequires: make
%{?filter_setup:
%filter_from_provides /^perl(/d;
%filter_from_requires /^perl(/d;
%filter_from_requires /^\/bin\/lua/d;
%filter_setup
}
%description
A utility that converts sourcecode to HTML, XHTML, RTF, LaTeX, TeX,
XSL-FO, 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.
%if %{with qt}
2009-04-20 19:46:40 +00:00
%package gui
2021-11-25 13:44:10 +00:00
Summary: GUI for the highlight source code formatter
Requires: %{name} = %{version}-%{release}
2009-04-20 19:46:40 +00:00
%description gui
A Qt-based GUI for the highlight source code formatter source.
%endif
2009-04-20 19:46:40 +00:00
%prep
%autosetup
%build
CFLAGS="$CFLAGS -fPIC %{optflags}"; export CFLAGS
CXXFLAGS="$CXXFLAGS -fPIC %{optflags}"; export CXXFLAGS
LDFLAGS="$LDFLAGS %{?__global_ldflags}"; export LDFLAGS
# disabled paralell builds to fix FTBFS on rawhide & highlight 3.52+
#make_build all gui CFLAGS="${CFLAGS}" \
%{__make} all CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
LDFLAGS="${LDFLAGS}" \
LFLAGS="-Wl,-O1 ${LDFLAGS}" \
PREFIX="%{_prefix}" \
conf_dir="%{_sysconfdir}/highlight/"
%if %{with qt}
%{__make} gui CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
LDFLAGS="${LDFLAGS}" \
LFLAGS="-Wl,-O1 ${LDFLAGS}" \
PREFIX="%{_prefix}" \
conf_dir="%{_sysconfdir}/highlight/" \
QMAKE="%{_qt5_qmake}" \
QMAKE_STRIP=
%endif
%install
%make_install PREFIX="%{_prefix}" conf_dir="%{_sysconfdir}/highlight/"
2009-04-20 19:46:40 +00:00
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
%if %{with qt}
make install-gui DESTDIR=$RPM_BUILD_ROOT PREFIX="%{_prefix}" conf_dir="%{_sysconfdir}/highlight/"
%endif
2009-04-20 19:46:40 +00:00
2009-06-29 16:25:31 +00:00
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/
2009-04-20 19:46:40 +00:00
desktop-file-install \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
highlight.desktop
%files
%{_bindir}/highlight
%{_datadir}/highlight/
%{_mandir}/man1/highlight.1*
%{_mandir}/man5/filetypes.conf.5*
2023-03-31 00:47:53 +00:00
%{_datadir}/bash-completion/completions/highlight
%{_datadir}/fish/vendor_completions.d/highlight.fish
%{_datadir}/zsh/site-functions/_highlight
2007-07-10 18:38:16 +00:00
%config(noreplace) %{_sysconfdir}/highlight/
%doc ChangeLog* AUTHORS README* extras/
2018-03-29 05:48:26 +00:00
%license COPYING
%if %{with qt}
2009-04-20 19:46:40 +00:00
%files gui
%{_bindir}/highlight-gui
%{_datadir}/applications/highlight.desktop
2020-12-30 05:43:57 +00:00
%{_datadir}/icons/hicolor/256x256/apps/highlight.png
%else
%exclude %{_datadir}/applications/highlight.desktop
%endif
2009-04-20 19:46:40 +00:00
%changelog
2023-09-09 05:15:03 +00:00
%autochangelog