public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <rosset.filipe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/highlight] rawhide: spec cleanup and modernization
Date: Sun, 07 Jun 2026 00:07:11 GMT [thread overview]
Message-ID: <178079083159.1.4666205664671493615.rpms-highlight-1c7f6280de98@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/highlight
Branch : rawhide
Commit : 1c7f6280de987b811ee3d502f34b6dd6919019ae
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date : 2026-06-06T21:07:03-03:00
Stats : +25/-39 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/highlight/c/1c7f6280de987b811ee3d502f34b6dd6919019ae?branch=rawhide
Log:
spec cleanup and modernization
---
diff --git a/highlight.spec b/highlight.spec
index 8220638..d72749b 100644
--- a/highlight.spec
+++ b/highlight.spec
@@ -8,20 +8,17 @@ Source0: http://www.andre-simon.de/zip/%{name}-%{version}.tar.bz2
%bcond qt %[%{undefined rhel} || 0%{?rhel} < 10]
+BuildRequires: boost-devel
+BuildRequires: desktop-file-utils
BuildRequires: gcc-c++
+BuildRequires: lua-devel
+BuildRequires: make
%if %{with qt}
BuildRequires: qt5-qtbase-devel
%endif
-BuildRequires: lua-devel, boost-devel
-BuildRequires: desktop-file-utils
-BuildRequires: make
-%{?filter_setup:
-%filter_from_provides /^perl(/d;
-%filter_from_requires /^perl(/d;
-%filter_from_requires /^\/bin\/lua/d;
-%filter_setup
-}
+%global __provides_exclude ^perl\\(
+%global __requires_exclude ^(perl\\(|/bin/lua)
%description
A utility that converts sourcecode to HTML, XHTML, RTF, LaTeX, TeX,
@@ -44,44 +41,35 @@ A Qt-based GUI for the highlight source code formatter source.
%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}/"
+%set_build_flags
+# The makefile compiles C++ files using CFLAGS, so we add CXXFLAGS to CFLAGS in the environment
+export CFLAGS="$CFLAGS $CXXFLAGS -fPIC"
+
+%make_build all \
+ PREFIX="%{_prefix}" \
+ conf_dir="%{_sysconfdir}/"
%if %{with qt}
- %{__make} gui CFLAGS="${CFLAGS}" \
- CXXFLAGS="${CXXFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- LFLAGS="-Wl,-O1 ${LDFLAGS}" \
- PREFIX="%{_prefix}" \
- conf_dir="%{_sysconfdir}/" \
- QMAKE="%{_qt5_qmake}" \
- QMAKE_STRIP=
+%make_build gui \
+ PREFIX="%{_prefix}" \
+ conf_dir="%{_sysconfdir}/" \
+ QMAKE="%{_qt5_qmake}" \
+ QMAKE_STRIP=
%endif
%install
%make_install PREFIX="%{_prefix}" conf_dir="%{_sysconfdir}/"
-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}/"
+make install-gui DESTDIR=%{buildroot} PREFIX="%{_prefix}" conf_dir="%{_sysconfdir}/"
%endif
-rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/
+rm -rf %{buildroot}%{_docdir}/%{name}/
-desktop-file-install \
- --dir $RPM_BUILD_ROOT%{_datadir}/applications \
- highlight.desktop
+%check
+%if %{with qt}
+desktop-file-validate %{buildroot}%{_datadir}/applications/highlight.desktop
+%endif
%files
%{_bindir}/highlight
@@ -96,13 +84,11 @@ desktop-file-install \
%doc ChangeLog* AUTHORS README* extras/
%license COPYING
- %if %{with qt}
+%if %{with qt}
%files gui
%{_bindir}/highlight-gui
%{_datadir}/applications/highlight.desktop
%{_datadir}/icons/hicolor/256x256/apps/highlight.png
-%else
-%exclude %{_datadir}/applications/highlight.desktop
%endif
reply other threads:[~2026-06-07 0:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178079083159.1.4666205664671493615.rpms-highlight-1c7f6280de98@fedoraproject.org \
--to=rosset.filipe@gmail.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox