highlight: allow dropping qt5 build dep
Building with '--without=qt' removes qt build deps, and also results in not building the -gui package
This commit is contained in:
parent
c85aa9fb97
commit
7ffd7a5fa1
@ -1,12 +1,17 @@
|
|||||||
Name: highlight
|
Name: highlight
|
||||||
Summary: Universal source code to formatted text converter
|
Summary: Universal source code to formatted text converter
|
||||||
Version: 4.2
|
Version: 4.2
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv3
|
License: GPLv3
|
||||||
URL: http://www.andre-simon.de/
|
URL: http://www.andre-simon.de/
|
||||||
Source0: http://www.andre-simon.de/zip/%{name}-%{version}.tar.bz2
|
Source0: http://www.andre-simon.de/zip/%{name}-%{version}.tar.bz2
|
||||||
|
|
||||||
|
%bcond qt 1
|
||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
%if %{with qt}
|
||||||
BuildRequires: qt5-qtbase-devel
|
BuildRequires: qt5-qtbase-devel
|
||||||
|
%endif
|
||||||
BuildRequires: lua-devel, boost-devel
|
BuildRequires: lua-devel, boost-devel
|
||||||
BuildRequires: desktop-file-utils
|
BuildRequires: desktop-file-utils
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
@ -26,12 +31,14 @@ Language descriptions are configurable and support regular expressions.
|
|||||||
The utility offers indentation and reformatting capabilities.
|
The utility offers indentation and reformatting capabilities.
|
||||||
It is easily possible to create new language definitions and colour themes.
|
It is easily possible to create new language definitions and colour themes.
|
||||||
|
|
||||||
|
%if %{with qt}
|
||||||
%package gui
|
%package gui
|
||||||
Summary: GUI for the highlight source code formatter
|
Summary: GUI for the highlight source code formatter
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
%description gui
|
%description gui
|
||||||
A Qt-based GUI for the highlight source code formatter source.
|
A Qt-based GUI for the highlight source code formatter source.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup
|
%autosetup
|
||||||
@ -43,7 +50,15 @@ LDFLAGS="$LDFLAGS %{?__global_ldflags}"; export LDFLAGS
|
|||||||
|
|
||||||
# disabled paralell builds to fix FTBFS on rawhide & highlight 3.52+
|
# disabled paralell builds to fix FTBFS on rawhide & highlight 3.52+
|
||||||
#make_build all gui CFLAGS="${CFLAGS}" \
|
#make_build all gui CFLAGS="${CFLAGS}" \
|
||||||
%{__make} 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}" \
|
CXXFLAGS="${CXXFLAGS}" \
|
||||||
LDFLAGS="${LDFLAGS}" \
|
LDFLAGS="${LDFLAGS}" \
|
||||||
LFLAGS="-Wl,-O1 ${LDFLAGS}" \
|
LFLAGS="-Wl,-O1 ${LDFLAGS}" \
|
||||||
@ -51,13 +66,16 @@ LDFLAGS="$LDFLAGS %{?__global_ldflags}"; export LDFLAGS
|
|||||||
conf_dir="%{_sysconfdir}/highlight/" \
|
conf_dir="%{_sysconfdir}/highlight/" \
|
||||||
QMAKE="%{_qt5_qmake}" \
|
QMAKE="%{_qt5_qmake}" \
|
||||||
QMAKE_STRIP=
|
QMAKE_STRIP=
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install PREFIX="%{_prefix}" conf_dir="%{_sysconfdir}/highlight/"
|
%make_install PREFIX="%{_prefix}" conf_dir="%{_sysconfdir}/highlight/"
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/pixmaps
|
||||||
|
%if %{with qt}
|
||||||
make install-gui DESTDIR=$RPM_BUILD_ROOT PREFIX="%{_prefix}" conf_dir="%{_sysconfdir}/highlight/"
|
make install-gui DESTDIR=$RPM_BUILD_ROOT PREFIX="%{_prefix}" conf_dir="%{_sysconfdir}/highlight/"
|
||||||
|
%endif
|
||||||
|
|
||||||
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/
|
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/
|
||||||
|
|
||||||
@ -75,13 +93,20 @@ desktop-file-install \
|
|||||||
%doc ChangeLog* AUTHORS README* extras/
|
%doc ChangeLog* AUTHORS README* extras/
|
||||||
%license COPYING
|
%license COPYING
|
||||||
|
|
||||||
|
%if %{with qt}
|
||||||
%files gui
|
%files gui
|
||||||
%{_bindir}/highlight-gui
|
%{_bindir}/highlight-gui
|
||||||
%{_datadir}/applications/highlight.desktop
|
%{_datadir}/applications/highlight.desktop
|
||||||
%{_datadir}/icons/hicolor/256x256/apps/highlight.png
|
%{_datadir}/icons/hicolor/256x256/apps/highlight.png
|
||||||
|
%else
|
||||||
|
%exclude %{_datadir}/applications/highlight.desktop
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 6 2022 Amit Shah <amitshah@fedoraproject.org> - 4.2-2
|
||||||
|
- Allow disabling Qt deps
|
||||||
|
|
||||||
* Thu Aug 25 2022 Filipe Rosset <rosset.filipe@gmail.com> - 4.2-1
|
* Thu Aug 25 2022 Filipe Rosset <rosset.filipe@gmail.com> - 4.2-1
|
||||||
- Update to 4.2
|
- Update to 4.2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user