%define battstat battstat_applet-2.0.10 %define no_apm_archs alpha ia64 s390 s390x sparc sparc64 Summary: Small applications for the GNOME panel. Name: gnome-applets Version: 1.4.0.5 Release: 6 Epoch: 1 License: GPL Group: User Interface/Desktops Source: ftp://ftp.gnome.org/pub/GNOME/sources/unstable/%{name}/%{name}-%{version}.tar.gz Source2: gnome-applets-1.2.4-ja.po Source3: gtik2_applet.desktop Source4: gnome-applets-pofiles.tar.gz Source5: battstat_applet-2.0.10.tar.gz URL: http://www.gnome.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: gnome-libs-devel libgtop-devel gdk-pixbuf-devel gnome-core-devel gdbm-devel BuildRequires: GConf-devel BuildRequires: gnome-vfs-devel >= 1.0.4 BuildRequires: /usr/bin/automake-1.4 Requires: libxml Requires: libgtop Requires: gnome-core >= 1.1.2 Requires: gdk-pixbuf >= 0.7.0 Obsoletes: battstat_applet Patch1: gnome-applets-1.2.4-isdn.patch Patch2: gnome-applets-battstat-2.0.10-nobrokenpath.patch Patch3: gnome-applets-1.4.0.1-mixer.patch Patch4: gnome-applets-1.4.0.1-battstat_dialog.patch Patch5: gnome-applets-1.4.0.5-charpick-cflags.patch Patch6: gnome-applets-1.4.0.5-pppcommand.patch Patch7: gnome-applets-1.4.0.5-yahoo.patch Patch8: gnome-applets-1.4.0.5-orientation.patch %description GNOME (GNU Network Object Model Environment) is a user-friendly set of applications and desktop tools to be used in conjunction with a window manager for the X Window System. The gnome-applets package provides small utilities for the GNOME panel. %prep %ifnarch %{no_apm_archs} %setup -q -a 5 if ! test -e /usr/lib/libapm.a ; then echo "You must have apmd installed" exit 1 fi %else %setup -q %endif # already upstream, left here in case I downgrade to 1.4.0.1 # %patch1 -p1 -b .isdn %ifnarch %{no_apm_archs} %patch2 -p1 -b .nobrokenpath %endif # also appears to be upstream, though changed slightly (?) # %patch3 -p0 -b .mixer cp %{SOURCE2} $RPM_BUILD_DIR/%{name}-%{PACKAGE_VERSION}/po/ja.po cp %{SOURCE3} $RPM_BUILD_DIR/%{name}-%{PACKAGE_VERSION}/gtik/ # translations tar zxf %{SOURCE4} # broken po file rm -f po/zh_TW.po; touch po/zh_TW.po %ifnarch %{no_apm_archs} %patch4 -p0 -b .batstat_dialog %endif %patch5 -p1 -b .charpick-cflags %patch6 -p1 -b .pppcommand %patch7 -p1 -b .yahoo %ifnarch %{no_apm_archs} %patch8 -p1 -b .orientation %endif %build libtoolize --copy --force aclocal-1.4 -I macros automake-1.4 autoconf %configure OLD_PO_FILE_INPUT=yes make %ifnarch %{no_apm_archs} cd %{battstat} libtoolize --copy --force aclocal-1.4 -I macros automake-1.4 autoconf %configure %endif %install [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT %makeinstall %ifnarch %{no_apm_archs} ## install battstat cd %{battstat} %makeinstall %endif ## delete desktop files for extraneous applets cd $RPM_BUILD_ROOT%{_prefix}/share/applets # Salvage this toy clock mv Clocks/jbc_applet.desktop Amusements # nuke other clocks /bin/rm -rf Clocks # whoever thought whereami had utility was on hard drugs mv Utility/whereami_applet.desktop Amusements ## battery_applet .desktop has more translations and a better name, ## so we use it, but have it launch battstat instead cat Monitors/battery_applet.desktop | sed -e 's/battery_applet/battstat_applet/g' > Utility/battstat_applet.desktop # Then nuke battery_applet.desktop rm Monitors/battery_applet.desktop %ifarch %{no_apm_archs} # nuke battstat stuff rm Utility/battstat_applet.desktop %else # nuke original battstat .desktop rm Monitors/battstat_applet.desktop %endif cd $RPM_BUILD_DIR/%{name}-%{version} # no binary stripping if [ -f %{name}.files ] ; then rm -f %{name}.files fi ############################################################################## ## function ProcessLang() { # rpm provides a handy scriptlet to do the locale stuff lets use that. if [ -f /usr/lib/rpm/find-lang.sh ] ; then /usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT %name sed "s:(644, root, root, 755):(444, bin, bin, 555):" %{name}.lang >tmp.lang && mv tmp.lang %{name}.lang if [ -f %{name}.files ] ; then cat %{name}.files %{name}.lang >tmp.files && mv tmp.files %{name}.files fi fi } function ProcessBin() { # Gather up all the executable files. Stripping if requested. # This will not recurse. if [ -d $RPM_BUILD_ROOT%{_prefix}/bin ] ; then echo "%defattr (0555, bin, bin)" >>%{name}.files find $RPM_BUILD_ROOT%{_prefix}/bin -type f -print | sed "s:^$RPM_BUILD_ROOT::g" >>%{name}.files fi } function ProcessLib() { # Gather up any libraries. # Usage: ProcessLib # Type is either 'runtime' or 'devel' if [ -d $1 ] ; then echo "%defattr (0555, bin, bin)" >>$3 case "$2" in runtime) # Grab runtime libraries find $1 -name "*.so.*" -print | sed "s:^$RPM_BUILD_ROOT::g" >>$3 ;; devel) find $1 -name "*.so" -print | sed "s:^$RPM_BUILD_ROOT::g" >>$3 find $1 -name "*.la" -print | sed "s:^$RPM_BUILD_ROOT::g" >>$3 find $1 -name "*.a" -print | sed "s:^$RPM_BUILD_ROOT::g" >>$3 find $1 -name "*.sh" -print | sed "s:^$RPM_BUILD_ROOT::g" >>$3 ;; esac fi } function ProcessDir() { # Build a list of files in the specified dir sticking # a %defattr line as specified in front of the mess. This is intended # for normal dirs. Use ProcessLib for library dirs # for include dirs. Appending to . # This will recurse. # # Usage: ProcessDir # if [ -d $1 ] ; then if [ ! -z "$3" ] ; then echo "%defattr ($3)" >>$2 fi echo "*** Processing $1" find $1 -type f -print | sed "s:^$RPM_BUILD_ROOT::g" >>$2 fi } function BuildFiles() { ProcessBin ProcessLang for i in `find $RPM_BUILD_ROOT%{_prefix}/share -maxdepth 1 -type d -print | \ sed "s:^$RPM_BUILD_ROOT%{_prefix}/share::g"` ; do echo $i case $i in /applets|/asclock|/clockmail|/geyes|/gnome|/gweather|/odometer|/sound-monitor|/pixmaps|/tickastat|/xmodmap) ProcessDir $RPM_BUILD_ROOT%{_prefix}/share$i %{name}.files "0444, bin, bin, 0555" ;; *) ;; esac done ProcessDir $RPM_BUILD_ROOT/etc %{name}.files "0444, bin, bin, 0555" ProcessLib $RPM_BUILD_ROOT%{_prefix}/lib runtime %{name}.files } BuildFiles %clean [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -f %{name}.files %defattr(-, root, root) # Need to own the directories too /usr/share/gnome/gkb /usr/share/gnome/help/* %doc AUTHORS COPYING ChangeLog NEWS README %changelog * Mon Apr 15 2002 Havoc Pennington - merge translations * Thu Apr 11 2002 Havoc Pennington - default battstat applet to vertical mode * Thu Mar 21 2002 Havoc Pennington - add patch to adapt to yahoo web site changes, #61561 * Tue Mar 5 2002 Havoc Pennington - remove requires libghttp4 * Mon Mar 4 2002 Havoc Pennington - no apm on sparc, #60538 - obsolete battstat_applet for Ximian compat, #51427 - use ifup/ifdown ppp0 instead of pppon/pppoff for default ppp command in modemlights, #54199 * Tue Feb 12 2002 Havoc Pennington - 1.4.0.5, cross fingers - add gconf-devel buildreq, though this is dubious as hell (pulled in by gtik using gnome-vfs, but if gtik actually accessed gconf it would fail due to gnorba conflict) - patch totally busted charpick Makefile.am cflags override * Thu Jan 24 2002 Havoc Pennington - automake14 * Thu Aug 30 2001 Alex Larsson - Removed annoying broken battery full dialog #52861 - Also fix mixer applet for USB sound #52603 * Mon Aug 27 2001 Havoc Pennington - Add po files from sources.redhat.com * Wed Aug 15 2001 Alexander Larsson - Own /usr/share/gnome/gkb and /usr/share/gnome/help/* * Wed Jul 18 2001 Havoc Pennington - add some build requires - remove ifarch build requires, replace with check in setup * Wed Jul 11 2001 Florian La Roche - sanitize specfile to RH style - do not require apmd for s390 s390x * Mon Jul 9 2001 Jonathan Blandford - new version * Sun Jul 08 2001 Havoc Pennington - remove extra .desktop file for battstat * Sat Jul 07 2001 Havoc Pennington - add battstat applet - rearrange .desktop files for applets * Tue Jun 12 2001 Than Ngo - fix isdn stuff to build against kernel-2.4.x - use %%{_tmppath} * Mon Jun 11 2001 Florian La Roche - allow newer gettext versions * Thu Mar 15 2001 Havoc Pennington - translations * Mon Feb 12 2001 Akira TAGOH - Updated Japanese translation (ja.po, .desktop). Note: Please remove Source[23]: when release the next upstream version. * Fri Jan 19 2001 Havoc Pennington - 1.2.4 * Fri Aug 11 2000 Jonathan Blandford - Update Epoch * Wed Jul 19 2000 Jonathan Blandford - Change slashapp to gnome-news app. * Thu Jul 13 2000 Prospector - automatic rebuild * Mon Jun 19 2000 Owen Taylor - 1.2.1 - use %%makeinstall