rpms/pidgin/F-9 pidgin-NOT-UPSTREAM-2.5.2-rhel4-sound-migration.patch, NONE, 1.1 pidgin.spec, 1.60, 1.61
Warren Togami 砥上勇
wtogami at fedoraproject.org
Tue Nov 25 02:55:27 UTC 2008
- Previous message: rpms/ghc/devel cabal-lib-template.spec, NONE, 1.1 cabal2spec, NONE, 1.1 Makefile, 1.5, 1.6 ghc-rpm-macros.ghc, 1.8, 1.9 ghc.spec, 1.60, 1.61
- Next message: rpms/metacity/devel metacity.spec,1.172,1.173
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: wtogami
Update of /cvs/pkgs/rpms/pidgin/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13696
Modified Files:
pidgin.spec
Added Files:
pidgin-NOT-UPSTREAM-2.5.2-rhel4-sound-migration.patch
Log Message:
- Automatically detect booleans to enable build features from dist tag
- Unify RHEL4 and RHEL5 spec with Fedora to make both easier to maintain
pidgin-NOT-UPSTREAM-2.5.2-rhel4-sound-migration.patch:
--- NEW FILE pidgin-NOT-UPSTREAM-2.5.2-rhel4-sound-migration.patch ---
diff -urN pidgin-2.5.2.orig/pidgin/gtksound.c pidgin-2.5.2/pidgin/gtksound.c
--- pidgin-2.5.2.orig/pidgin/gtksound.c 2008-07-13 22:05:38.000000000 -0400
+++ pidgin-2.5.2/pidgin/gtksound.c 2008-11-22 13:36:54.000000000 -0500
@@ -298,6 +298,9 @@
purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/sound/mute", FALSE);
purple_prefs_add_path(PIDGIN_PREFS_ROOT "/sound/command", "");
purple_prefs_add_string(PIDGIN_PREFS_ROOT "/sound/method", "automatic");
+#ifndef USE_GSTREAMER
+ purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/sound/rhel4migrated", FALSE);
+#endif
purple_prefs_add_int(PIDGIN_PREFS_ROOT "/sound/volume", 50);
#ifdef USE_GSTREAMER
@@ -433,6 +436,19 @@
return;
}
+#ifndef USE_GSTREAMER
+ /* RHEL4 migration code */
+ if (!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/sound/rhel4migrated")) {
+ purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/sound/rhel4migrated", TRUE);
+ if(!strcmp(method, "automatic") ||
+ !strcmp(method, "esd") ||
+ !strcmp(method, "arts")) {
+ purple_prefs_set_string(PIDGIN_PREFS_ROOT "/sound/method", "custom");
+ purple_prefs_set_path(PIDGIN_PREFS_ROOT "/sound/command", "aplay %s");
+ }
+ }
+#endif
+
#ifndef _WIN32
if (!strcmp(method, "custom")) {
const char *sound_cmd;
Index: pidgin.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pidgin/F-9/pidgin.spec,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- pidgin.spec 21 Nov 2008 20:26:24 -0000 1.60
+++ pidgin.spec 25 Nov 2008 02:54:56 -0000 1.61
@@ -1,37 +1,68 @@
-# OPTION: perl split into subpackages (FC1+)
-%define perl_integration 1
-# OPTION: krb5 for Zephyr protocol (FC1+)
-%define krb_integration 1
-# OPTION: gtkspell integration (FC1+)
-%define gtkspell_integration 1
-# OPTION: Evolution 1.5+ integration (FC3+)
-%define evolution_integration 1
-# OPTION: SILC integration (FC3+)
-%define silc_integration 1
-# OPTION: dbus integration (FC5+)
+# OVERRIDE RHEL VERSION HERE, RHEL BUILDSYSTEM DOESN'T HAVE DIST TAG
+#%%define rhel 4
+
+# Define Variables that must exist
+%{?!rhel:%define rhel 0}
+%{?!fedora:%define fedora 0}
+
+# Map RHEL to Fedora version
+%if 0%{?rhel} == 4
+%define fedora 3
+%define dist .el4
+%endif
+%if 0%{?rhel} == 5
+%define fedora 6
+%define dist .el5
+%endif
+
+# Define variables to use in conditionals
+%define force_sound_aplay 0
+%define dbus_integration 0
+%define gstreamer_integration 0
+%define nm_integration 0
+%define modular_x 0
+%define dbus_glib_splt 0
+%define bonjour_support 0
+%define meanwhile_integration 0
+%define use_gnome_open 0
+%define perl_devel_separated 0
+%define perl_embed_separated 0
+%define api_docs 0
+
+# RHEL4: Use ALSA aplay to output sounds because it lacks gstreamer
+%if 0%{?fedora} < 5
+%define force_sound_aplay 1
+%endif
+# RHEL4+ and FC5+: dbus, gstreamer, NetworkManager, modular X
+%if 0%{?fedora} >= 5
%define dbus_integration 1
-# OPTION: gstreamer integration (FC5+)
%define gstreamer_integration 1
-# OPTION: NetworkManager integration (FC5+)
%define nm_integration 1
-# OPTION: Modular X (FC5+)
%define modular_x 1
-# OPTION: dbus-glib split (FC6+)
+%endif
+# RHEL4+ and FC6+: dbus-glib split, bonjour, meanwhile
+%if 0%{?fedora} >= 6
%define dbus_glib_splt 1
-# OPTION: Bonjour support (FC6+)
%define bonjour_support 1
-# OPTION: Meanwhile integration (F6+)
%define meanwhile_integration 1
-# OPTION: Perl devel separated out (F7+)
+%endif
+# RHEL4 and RHEL5: Use gnome-open instead of xdg-open (RHEL4 and RHEL5)
+%if 0%{?fedora} <= 6
+%define use_gnome_open 1
+%endif
+# F7+: Perl devel separated out
+%if 0%{?fedora} >= 7
%define perl_devel_separated 1
-# OPTION: Perl embed separated out (F8+)
+%endif
+# F8+: Perl embed separated out, generate pidgin API documentation
+%if 0%{?fedora} >= 6
%define perl_embed_separated 1
-# OPTION: generate pidgin API documentation (F8+)
%define api_docs 1
+%endif
Name: pidgin
Version: 2.5.2
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2+ and GPLv2 and MIT
# GPLv2+ - libpurple, gnt, finch, pidgin, most prpls
# GPLv2 - silc & novell prpls
@@ -62,6 +93,7 @@
## Patches 0-99: Fedora specific or upstream wont accept
Patch0: pidgin-2.4.2-reread-resolvconf.patch
+Patch1: pidgin-NOT-UPSTREAM-2.5.2-rhel4-sound-migration.patch
## Patches 100+: To be Included in Future Upstream
Patch100: pidgin-2.5.2-sametime-redirect-null.patch
@@ -105,23 +137,13 @@
BuildRequires: libxml2-devel
# krb5 needed for Zephyr (FC1+)
-%if %{krb_integration}
BuildRequires: krb5-devel
-%endif
# gtkspell integration (FC1+)
-%if %{gtkspell_integration}
BuildRequires: gtkspell-devel, aspell-devel
-%endif
-# Preferred Applications (FC6+)
-Requires: xdg-utils
# Evolution integration (FC3+)
-%if %{evolution_integration}
BuildRequires: evolution-data-server-devel
-%endif
# SILC integration (FC3+)
-%if %{silc_integration}
BuildRequires: libsilc-devel
-%endif
# DBus integration (FC5+)
%if %{dbus_integration}
BuildRequires: dbus-devel >= 0.60
@@ -143,6 +165,12 @@
BuildRequires: libSM-devel
BuildRequires: libXScrnSaver-devel
%endif
+# Preferred Applications (xdg for FC6+)
+%if %{use_gnome_open}
+Requires: libgnome
+%else
+Requires: xdg-utils
+%endif
# DBus GLIB Split (FC6+)
%if %{dbus_glib_splt}
BuildRequires: dbus-glib-devel >= 0.70
@@ -150,7 +178,7 @@
%if %{bonjour_support}
BuildRequires: avahi-glib-devel
%endif
-# Meanwhile integration (F7+)
+# Meanwhile integration (F6+)
%if %{meanwhile_integration}
BuildRequires: meanwhile-devel
%endif
@@ -198,7 +226,6 @@
documentation, and libraries required for development of Pidgin scripts
and plugins.
-%if %{perl_integration}
%package perl
Summary: Perl scripting support for Pidgin
Group: Applications/Internet
@@ -208,7 +235,6 @@
%description perl
Perl plugin loader for Pidgin. This package will allow you to write or
use Pidgin plugins written in the Perl programming language.
-%endif
%package -n libpurple
@@ -249,7 +275,6 @@
documentation, and libraries required for development of libpurple based
instant messaging clients or plugins for any libpurple based client.
-%if %{perl_integration}
%package -n libpurple-perl
Summary: Perl scripting support for libpurple
Group: Applications/Internet
@@ -259,7 +284,6 @@
%description -n libpurple-perl
Perl plugin loader for libpurple. This package will allow you to write or
use libpurple plugins written in the Perl programming language.
-%endif
%package -n libpurple-tcl
@@ -276,6 +300,7 @@
Summary: A text-based user interface for Pidgin
Group: Applications/Internet
Requires: glib2 >= %{glib_ver}
+Requires: libpurple = %{version}-%{release}
%description -n finch
A text-based user interface for using libpurple. This can be run from a
@@ -310,9 +335,13 @@
%endif
%prep
+echo "FEDORA=%{fedora} RHEL=%{rhel}"
%setup -q
## Patches 0-99: Fedora specific or upstream wont accept
%patch0 -p1 -b .resolv
+%if %{force_sound_aplay}
+%patch1 -p1 -b .aplay
+%endif
## Patches 100+: To be Included in Future Upstream
%patch100 -p1 -b sametime-redirect-null
@@ -327,25 +356,18 @@
# Our preferences
cp %{SOURCE1} prefs.xml
+# RHEL5 and earlier did not have xdg-open, so use gnome-open instead
+if [ "%{use_gnome_open}" == "1" ]; then
+ sed -i "s/value='xdg-open'/value='gnome-open'/" prefs.xml
+fi
+
%build
SWITCHES="--with-extraversion=%{release}"
-%if %{krb_integration}
SWITCHES="$SWITCHES --with-krb4"
-%endif
-%if %{silc_integration}
SWITCHES="$SWITCHES --with-silc-includes=%{_includedir}/silc --with-silc-libs=%{_libdir}"
-%endif
-%if %{perl_integration}
SWITCHES="$SWITCHES --enable-perl"
-%else
- SWITCHES="$SWITCHES --disable-perl"
-%endif
-%if %{evolution_integration}
SWITCHES="$SWITCHES --enable-gevolution"
-%else
- SWITCHES="$SWITCHES --disable-gevolution"
-%endif
%if %{dbus_integration}
SWITCHES="$SWITCHES --enable-dbus"
%else
@@ -359,6 +381,12 @@
%else
SWITCHES="$SWITCHES --disable-gstreamer"
%endif
+%if ! %{bonjour_support}
+ SWITCHES="$SWITCHES --disable-avahi"
+%endif
+%if ! %{meanwhile_integration}
+ SWITCHES="$SWITCHES --disable-meanwhile"
+%endif
# FC5+ automatic -fstack-protector-all switch
export RPM_OPT_FLAGS=${RPM_OPT_FLAGS//-fstack-protector/-fstack-protector-all}
@@ -398,10 +426,8 @@
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/purple/
install -m 644 prefs.xml $RPM_BUILD_ROOT%{_sysconfdir}/purple/prefs.xml
-%if %{perl_integration}
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';'
-%endif
# make sure that we can write to all the files we've installed
# so that they are properly stripped
@@ -472,14 +498,12 @@
%{_datadir}/icons/hicolor/*/apps/pidgin.*
%{_sysconfdir}/gconf/schemas/purple.schemas
-%if %{perl_integration}
%files perl
%defattr(-,root,root,-)
%{_mandir}/man3/Pidgin*
%{perl_vendorarch}/Pidgin.pm
%dir %{perl_vendorarch}/auto/Pidgin/
%{perl_vendorarch}/auto/Pidgin/Pidgin.so
-%endif
%files devel
%defattr(-,root,root,-)
@@ -504,9 +528,7 @@
%doc libpurple/purple-notifications-example
%endif
%exclude %{_libdir}/purple-2/tcl.so
-%if %{perl_integration}
%exclude %{_libdir}/purple-2/perl.so
-%endif
%files -n libpurple-devel
%defattr(-,root,root,-)
@@ -518,7 +540,6 @@
%{_libdir}/libpurple-client.so
%endif
-%if %{perl_integration}
%files -n libpurple-perl
%defattr(-,root,root,-)
%{_mandir}/man3/Purple*
@@ -527,7 +548,6 @@
%dir %{perl_vendorarch}/auto/Purple/
%{perl_vendorarch}/auto/Purple/Purple.so
%{perl_vendorarch}/auto/Purple/autosplit.ix
-%endif
%files -n libpurple-tcl
%defattr(-,root,root,-)
@@ -557,6 +577,10 @@
%endif
%changelog
+* Sat Nov 22 2008 Warren Togami <wtogami at redhat.com> 2.5.2-3
+- Automatically detect booleans to enable build features from dist tag
+- Unify RHEL4 and RHEL5 spec with Fedora to make both easier to maintain
+
* Fri Nov 21 2008 Warren Togami <wtogami at redhat.com> 2.5.2-2
- Upstream backports:
100: sametime-redirect-null crash
- Previous message: rpms/ghc/devel cabal-lib-template.spec, NONE, 1.1 cabal2spec, NONE, 1.1 Makefile, 1.5, 1.6 ghc-rpm-macros.ghc, 1.8, 1.9 ghc.spec, 1.60, 1.61
- Next message: rpms/metacity/devel metacity.spec,1.172,1.173
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list