Migrating Req./Prov. filterering to filter rpm macros

This commit is contained in:
Jochen Schmitt 2011-03-20 21:03:53 +01:00
parent f6aeba82fa
commit 32f3f2773d

View File

@ -2,7 +2,7 @@ Name: highlight
Summary: Universal source code to formatted text converter Summary: Universal source code to formatted text converter
Version: 3.3 Version: 3.3
Release: 2%{?dist} Release: 5%{?dist}
Group: Development/Tools Group: Development/Tools
License: GPLv3 License: GPLv3
@ -16,6 +16,12 @@ BuildRequires: desktop-file-utils
Buildroot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
%{?filter_setup:
%filter_from_provides /^perl(/d;
%filter_from_requires /^perl(/d;
%filter_setup
}
%description %description
A utility that converts sourcecode to HTML, XHTML, RTF, LaTeX, TeX, A utility that converts sourcecode to HTML, XHTML, RTF, LaTeX, TeX,
XSL-FO, XML or ANSI escape sequences with syntax highlighting. XSL-FO, XML or ANSI escape sequences with syntax highlighting.
@ -35,22 +41,6 @@ A Qt-based GUI for the highlight source code formatter source.
%setup -q %setup -q
# Provides: exclude perl(highlight_pipe) from example
cat <<__EOF__ > %{name}-perl.prov
#!/bin/sh
/usr/lib/rpm/perl.prov \$* | grep -v '^perl(highlight_pipe)$'
__EOF__
%define __perl_provides %{_builddir}/%{name}-%{version}/%{name}-perl.prov
chmod +x %{__perl_provides}
# Requires: exclude all perl related req. from example
cat <<__EOF__ > %{name}-perl.req
#!/bin/sh
/usr/lib/rpm/perl.req \$* | grep -v '^perl('
__EOF__
%define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-perl.req
chmod +x %{__perl_requires}
%build %build
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" LDFLAGS= make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=
rm -rf src/gui-qt/moc* rm -rf src/gui-qt/moc*
@ -74,11 +64,6 @@ desktop-file-install \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \ --dir $RPM_BUILD_ROOT%{_datadir}/applications \
highlight.desktop highlight.desktop
# Packaging this example causes lots of incorrect perl provides and
# requires. Since it isn't going to work out of the box, I'm nuking it.
rm -rf examples/plugins/movabletype
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -99,6 +84,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/pixmaps/highlight.xpm %{_datadir}/pixmaps/highlight.xpm
%changelog %changelog
* Sun Mar 20 2011 Jochen Schmitt <Jochen herr-schmitt de> 3.3-5
- Migrating Req./Prov. filterering to filter rpm macros
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3-2 * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild