[im-chooser] Conditionally build XFCE support for RHEL.
Akira TAGOH
tagoh at fedoraproject.org
Wed May 23 01:44:26 UTC 2012
commit 29695427a2a8c449c94d41448ab14ab7a228f48f
Author: Akira TAGOH <tagoh at redhat.com>
Date: Wed May 23 10:44:22 2012 +0900
Conditionally build XFCE support for RHEL.
im-chooser.spec | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/im-chooser.spec b/im-chooser.spec
index c908218..e680d1e 100644
--- a/im-chooser.spec
+++ b/im-chooser.spec
@@ -1,13 +1,23 @@
+%if 0%{!?_with_xfce:1} && 0%{!?_without_xfce:1}
+%if 0%{?rhel}
+%global _with_xfce 0
+%else
+%global _with_xfce 1
+%endif
+%endif
+
Name: im-chooser
Version: 1.5.2.2
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
URL: http://fedorahosted.org/im-chooser/
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%{?_with_gtk2:BuildRequires: gtk2-devel}
%{!?_with_gtk2:BuildRequires: gtk3-devel}
BuildRequires: libSM-devel imsettings-devel >= 1.2.0
+%if 0%{?_with_xfce}
BuildRequires: libxfce4util-devel
+%endif
BuildRequires: desktop-file-utils intltool gettext
Source0: http://fedorahosted.org/releases/i/m/%{name}/%{name}-%{version}.tar.bz2
@@ -49,6 +59,7 @@ to be used or disable Input Method usage on the desktop.
This package contains the control-center panel module on GNOME3.
%endif
+%if 0%{?_with_xfce}
%package xfce
Summary: XFCE settings panel for im-chooser
Group: Applications/System
@@ -60,6 +71,7 @@ im-chooser is a GUI configuration tool to choose the Input Method
to be used or disable Input Method usage on the desktop.
This package contains the XFCE settings panel for im-chooser.
+%endif
%prep
@@ -79,7 +91,9 @@ desktop-file-install --vendor=fedora \
--delete-original \
--dir=$RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_BUILD_ROOT%{_datadir}/applications/im-chooser.desktop
+%if 0%{?_with_xfce}
desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/xfce4-im-chooser.desktop
+%endif
#%%{!?_with_gtk2:desktop-file-validate $RPM_BUILD_ROOT%%{_datadir}/applications/im-chooser-panel.desktop}
rm -rf $RPM_BUILD_ROOT%{_libdir}/libimchooseui.{so,la,a}
@@ -129,12 +143,17 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_datadir}/applications/im-chooser-panel.desktop
%endif
+%if 0%{?_with_xfce}
%files xfce
%defattr (-, root, root, -)
%{_bindir}/xfce4-im-chooser
%{_datadir}/applications/xfce4-im-chooser.desktop
+%endif
%changelog
+* Wed May 23 2012 Akira TAGOH <tagoh at redhat.com> - 1.5.2.2-2
+- Conditionally build XFCE support for RHEL.
+
* Wed Apr 18 2012 Akira TAGOH <tagoh at redhat.com> - 1.5.2.2-1
- New upstream release.
- Update translations (#801232)
More information about the scm-commits
mailing list