@@ -2,15 +2,21 @@ Vendor: Microsoft Corporation
22Distribution: Azure Linux
33Name: highlight
44Summary: Universal source code to formatted text converter
5- Version: 3.54
6- Release: 3 %{?dist }
7- License: GPLv3
5+ Version: 4.18
6+ Release: 1 %{?dist }
7+ License: GPL-3.0 -only
88URL: http://www.andre-simon.de/
99Source0: http://www.andre-simon.de/zip/%{name }-%{version }.tar.bz2
10+
11+ %bcond qt 0
12+
1013BuildRequires: gcc-c++
14+ %if %{with qt }
1115BuildRequires: qt5-qtbase-devel
16+ %endif
1217BuildRequires: lua-devel, boost-devel
1318BuildRequires: desktop-file-utils
19+ BuildRequires: make
1420
1521%{?filter_setup:
1622%filter_from_provides /^perl(/d;
@@ -27,12 +33,14 @@ Language descriptions are configurable and support regular expressions.
2733The utility offers indentation and reformatting capabilities.
2834It is easily possible to create new language definitions and colour themes.
2935
36+ %if %{with qt }
3037%package gui
31- Summary: GUI for the hihghlight source code formatter
38+ Summary: GUI for the highlight source code formatter
3239Requires: %{name } = %{version }-%{release }
3340
3441%description gui
3542A Qt-based GUI for the highlight source code formatter source.
43+ %endif
3644
3745%prep
3846%autosetup
@@ -44,21 +52,32 @@ LDFLAGS="$LDFLAGS %{?__global_ldflags}"; export LDFLAGS
4452
4553# disabled paralell builds to fix FTBFS on rawhide & highlight 3.52+
4654#make_build all gui CFLAGS="${CFLAGS}" \
47- make all gui CFLAGS= "${CFLAGS}" \
55+ %{__make} all CFLAGS= "${CFLAGS}" \
56+ CXXFLAGS= "${CXXFLAGS}" \
57+ LDFLAGS= "${LDFLAGS}" \
58+ LFLAGS= "-Wl,-O1 ${LDFLAGS}" \
59+ PREFIX= "%{_prefix }" \
60+ conf_dir= "%{_sysconfdir }/"
61+
62+ %if %{with qt }
63+ %{__make} gui CFLAGS= "${CFLAGS}" \
4864 CXXFLAGS= "${CXXFLAGS}" \
4965 LDFLAGS= "${LDFLAGS}" \
5066 LFLAGS= "-Wl,-O1 ${LDFLAGS}" \
5167 PREFIX= "%{_prefix }" \
52- conf_dir= "%{_sysconfdir }/highlight/ " \
68+ conf_dir= "%{_sysconfdir }/" \
5369 QMAKE= "%{_qt5_qmake }" \
5470 QMAKE_STRIP=
71+ %endif
5572
5673%install
57- %make_install PREFIX=" %{_prefix}" conf_dir=" %{_sysconfdir}/highlight/ "
74+ %make_install PREFIX=" %{_prefix}" conf_dir=" %{_sysconfdir}/"
5875
5976mkdir -p $RPM_BUILD_ROOT%{_datadir }/applications
6077mkdir -p $RPM_BUILD_ROOT%{_datadir }/pixmaps
61- make install-gui DESTDIR= $RPM_BUILD_ROOT PREFIX= "%{_prefix }" conf_dir= "%{_sysconfdir }/highlight/"
78+ %if %{with qt }
79+ make install-gui DESTDIR= $RPM_BUILD_ROOT PREFIX= "%{_prefix }" conf_dir= "%{_sysconfdir }/"
80+ %endif
6281
6382rm -rf $RPM_BUILD_ROOT%{_docdir }/%{name }/
6483
@@ -71,18 +90,29 @@ desktop-file-install \
7190%{_datadir }/highlight/
7291%{_mandir }/man1/highlight.1*
7392%{_mandir }/man5/filetypes.conf.5*
93+ %{_datadir }/bash-completion/completions/highlight
94+ %{_datadir }/fish/vendor_completions.d/highlight.fish
95+ %{_datadir }/zsh/site-functions/_highlight
7496%config(noreplace) %{_sysconfdir }/highlight/
7597
7698%doc ChangeLog* AUTHORS README* extras/
7799%license COPYING
78100
101+ %if %{with qt }
79102%files gui
80103%{_bindir }/highlight-gui
81104%{_datadir }/applications/highlight.desktop
82- %{_datadir }/pixmaps/highlight.xpm
105+ %{_datadir }/icons/hicolor/256x256/apps/highlight.png
106+ %else
107+ %exclude %{_datadir }/applications/highlight.desktop
108+ %endif
83109
84110
85111%changelog
112+ * Wed Dec 24 2025 Sumit Jena <v-sumitjena@microsoft.com> - 4.18-1
113+ - Update to version 4.18
114+ - License Verified
115+
86116* Fri Oct 15 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 3.54-3
87117- Initial CBL-Mariner import from Fedora 32 (license: MIT).
88118
0 commit comments