All pastes #1461983 Raw Edit

Anonymous

public text v1 · immutable
#1461983 ·published 2009-06-16 09:16 UTC
rendered paste body

# Conditional build:
%bcond_without  kde4	# build KDE4 styles
%bcond_without	gtk2	# build GTK+2 styles
%bcond_without	kde3	# build KDE styles

%define		ver		0.63.0
%define		kde3_ver	0.63.0
%define		kde4_ver	0.63.0
%define		gtk2_ver	0.63.0
Release:			1
%define		tmpdir		/tmp/build
%define		debug_package	%{nil}
Summary:	A free and corrected port of Red Hat's GTK+/Qt theme
Name:		QtCurve
Version:	%{ver}
License:	GPL
Group:		Themes
Source0:	http://home.freeuk.com/cpdrummond/%{name}-KDE3-%{kde3_ver}.tar.bz2
Source1:	http://home.freeuk.com/cpdrummond/%{name}-Gtk2-%{gtk2_ver}.tar.bz2
Source2:	http://home.freeuk.com/cpdrummond/%{name}-KDE4-%{kde4_ver}.tar.bz2
URL:		http://www.kde-look.org/content/show.php?content=40492
BuildRequires:	autoconf
BuildRequires:	automake
BuildRequires:	cmake
%{?with_kde4:BuildRequires:	kdelibs-devel >= 4.0}
%{?with_kde4:BuildRequires:	kdebase-workspace-devel}
%{?with_gtk2:BuildRequires:	gtk2-devel}
%{?with_kde:BuildRequires:	kdelibs3-devel >= 3.1}
BuildRequires:	libtool
BuildRequires:	pkgconfig
BuildRequires:	sed > 4.0
BuildRequires:	gcc-c++
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Obsoletes:	qtcurve-kde4

%description
A free and corrected port of Red Hat's GTK+/Qt theme.

%package -n qtcurve-kde3-style
Summary:	A free and corrected port of Red Hat's GTK+/Qt theme
Version:	%{kde3_ver}
Group:		Themes
Requires:	kdelibs >= 3.1
Obsoletes:	kde-style-QtCurve

%description -n qtcurve-kde3-style
A free and corrected port of Red Hat's GTK+/Qt theme. KDE3/Qt3 version.

%package -n qtcurve-kde4-style
Summary:	A free and corrected port of Red Hat's GTK+/Qt theme
Version:	%{kde4_ver}
Group:		Themes
Requires:	qtcurve-common-theme = %{ver}-%{release}
Obsoletes:	kde4-style-QtCurve

%description -n qtcurve-kde4-style
A free and corrected port of Red Hat's GTK+/Qt theme. KDE4/Qt4 version.

%package -n qtcurve-gtk2-theme
Summary:	A free and corrected port of Red Hat's GTK+/Qt theme
Version:	%{gtk2_ver}
Group:		Themes
Requires:	qtcurve-common-theme = %{ver}-%{release}
Obsoletes:	gtk2-theme-QtCurve

%description -n qtcurve-gtk2-theme
A free and corrected port of Red Hat's GTK+/Qt theme. GTK+2 version.

%package -n qtcurve-common-theme
Summary:	A free and corrected port of Redhats GTK+/Qt theme - common
Version:	%{ver}
Group:		Themes
BuildArch:	noarch
Obsoletes:	gtk-theme-bluecurve
Obsoletes:	gtk2-theme-bluecurve
Obsoletes:	kde-style-bluecurve
Obsoletes:	kde-theme-bluecurve
Obsoletes:	kde-theme-bluecurve
Obsoletes:	theme-bluecurve-common
Obsoletes:	qtcurve-kde4
Obsoletes:	theme-QtCurve-common

%description -n qtcurve-common-theme
A free and corrected port of Red Hat's GTK+/Qt theme. Documentation
and common files package.

%prep
%setup -q -c -D %{?with_kde3:-a0} %{?with_gtk2:-a1} %{?with_kde4:-a2}
%if %{with gtk2}
cd %{name}-Gtk2-%{gtk2_ver}
cd -
%endif

%if %{with kde4}
cd %{name}-KDE4-%{kde4_ver}
cd -
%endif


%build
%if %{with kde3}
cd %{name}-KDE3-%{kde3_ver}
%cmake \
	-DCMAKE_INSTALL_PREFIX=%{_prefix} \
	.
%{__make}
cd -
%endif

%if %{with kde4}
cd %{name}-KDE4-%{kde4_ver}
%cmake \
	-DCMAKE_INSTALL_PREFIX=%{_prefix} \
	-DQTC_XBAR_SUPPORT=true \
	.
%{__make}
cd -
%endif

%if %{with gtk2}
cd %{name}-Gtk2-%{gtk2_ver}
%cmake \
	-DQTC_ADD_EVENT_FILTER=false \
	-DQTC_MODIFY_MOZILLA=true \
	-DCMAKE_INSTALL_PREFIX=%{_prefix} \
	.
%{__make}
cd -
%endif

%install
rm -rf $RPM_BUILD_ROOT

%if %{with kde3}
%{__make} -C %{name}-KDE3-%{kde3_ver} install \
	DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_libdir}/qt-3.3/plugins/
cp -Rp $RPM_BUILD_ROOT%{_libdir}/kde3/plugins/styles $RPM_BUILD_ROOT%{_libdir}/qt-3.3/plugins/
%endif

%if %{with kde4}
%{__make} -C %{name}-KDE4-%{kde4_ver} install \
	DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_libdir}/qt4/plugins/
cp -Rp $RPM_BUILD_ROOT%{_libdir}/kde4/plugins/styles $RPM_BUILD_ROOT%{_libdir}/qt4/plugins/
%endif

%if %{with gtk2}
%{__make} -C %{name}-Gtk2-%{gtk2_ver} install \
	DESTDIR=$RPM_BUILD_ROOT

chmod a+x $RPM_BUILD_ROOT%{_datadir}/themes/QtCurve/gtk-2.0/map_kde_icons.pl
%endif

rm -f $RPM_BUILD_ROOT{%{_libdir}/gtk/themes/engines,%{_libdir}/gtk-2.0/*/*}/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%if %{with kde3}
%files -n qtcurve-kde3-style
%defattr(644,root,root,755)
%{_libdir}/kde3/kstyle_qtcurve_config.la
%attr(755,root,root) %{_libdir}/kde3/kstyle_qtcurve_config.so
%attr(755,root,root) %{_libdir}/kde3/plugins/styles/*.so
%{_datadir}/apps/kstyle/themes/qtcurve*.themerc
%{_datadir}/apps/kstyle/themes/qtc_klearlooks.themerc
%{_datadir}/apps/kdisplay/color-schemes/QtCurve.kcsrc
%{_datadir}/apps/QtCurve
%{_libdir}/qt-3.3/plugins/styles
%endif

%if %{with kde4}
%files -n qtcurve-kde4-style
%defattr(-,root,root)
%{_libdir}/kde4/*
%{_libdir}/kde4/plugins/styles
%{_datadir}/kde4/apps/QtCurve
%{_datadir}/kde4/apps/kstyle
%{_datadir}/kde4/apps/color-schemes/QtCurve.colors
%{_libdir}/qt4/plugins/styles
%{_datadir}/kde4/apps/kwin/qtcurve.desktop
%endif

%if %{with gtk2}
%files -n qtcurve-gtk2-theme
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/gtk-2.0/*/*/*.so
%dir %{_datadir}/themes/QtCurve/gtk-2.0
%{_datadir}/themes/QtCurve/gtk-2.0/gtkrc
%{_datadir}/themes/QtCurve/gtk-2.0/icons3
%{_datadir}/themes/QtCurve/gtk-2.0/icons4
%attr(755,root,root) %{_datadir}/themes/QtCurve/gtk-2.0/map_kde_icons.pl
%dir %{_datadir}/themes/QtCurve/mozilla
%{_datadir}/themes/QtCurve/mozilla/QtCurve.css
%{_datadir}/themes/QtCurve/mozilla/preferences-rev.xml
%{_datadir}/themes/QtCurve/mozilla/QtCurve-KDEButtonOrder.css
%endif

%files -n qtcurve-common-theme
%defattr(644,root,root,755)
%doc %{name}-KDE3-%{kde3_ver}/{ChangeLog,README,TODO}
%doc %{name}-KDE4-%{kde4_ver}/{ChangeLog,README,TODO,COPYING}
%dir %{_datadir}/themes/QtCurve

%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)