cvsdist e43fd68
%define battstat battstat_applet-2.0.10
cvsdist e43fd68
%define no_apm_archs alpha ia64 s390 s390x
cvsdist 1d3b461
cvsdist 1d3b461
Summary:	Small applications which embed themselves in the GNOME panel
cvsdist e43fd68
Name:     	gnome-applets
cvsdist e43fd68
Version: 	1.4.0.1
cvsdist 104390b
Release:	3
cvsdist 1d3b461
Epoch:          1
cvsdist 1d3b461
License:	GPL
cvsdist 1d3b461
Group:		User Interface/Desktops
cvsdist e43fd68
Source: 	ftp://ftp.gnome.org/pub/GNOME/sources/unstable/%{name}/%{name}-%{version}.tar.gz
cvsdist 38ef3e3
Source2:	gnome-applets-1.2.4-ja.po
cvsdist 38ef3e3
Source3:	gtik2_applet.desktop
cvsdist 38ef3e3
Source4:        gnome-applets-po.tar.gz
cvsdist e43fd68
Source5:        battstat_applet-2.0.10.tar.gz
cvsdist 1d3b461
URL:		http://www.gnome.org/
cvsdist e43fd68
cvsdist e43fd68
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
cvsdist e43fd68
cvsdist 104390b
BuildRequires:  gnome-libs-devel libgtop-devel gdk-pixbuf-devel gnome-core-devel gdbm-devel
cvsdist 1d3b461
cvsdist 1d3b461
Requires:	libxml
cvsdist 1d3b461
Requires:	libgtop
cvsdist 1d3b461
Requires:	libghttp
cvsdist 1d3b461
Requires:	gnome-core >= 1.1.2
cvsdist 1d3b461
Requires:	gdk-pixbuf >= 0.7.0
cvsdist 1d3b461
cvsdist 494c934
Patch1: gnome-applets-1.2.4-isdn.patch
cvsdist e43fd68
Patch2: gnome-applets-battstat-2.0.10-nobrokenpath.patch
cvsdist 1d3b461
cvsdist 1d3b461
%description
cvsdist 1d3b461
GNOME (GNU Network Object Model Environment) is a user-friendly
cvsdist 1d3b461
set of applications and desktop tools to be used in conjunction with a
cvsdist 1d3b461
window manager for the X Window System.  GNOME is similar in purpose and
cvsdist 1d3b461
scope to CDE and KDE, but GNOME is based completely on Open Source
cvsdist 1d3b461
software.  The gnome-applets package provides Panel applets which
cvsdist 1d3b461
enhance your GNOME experience.
cvsdist 1d3b461
cvsdist 1d3b461
You should install the gnome-applets package if you would like embed small
cvsdist 1d3b461
utilities in the GNOME panel.
cvsdist 1d3b461
cvsdist 1d3b461
%prep
cvsdist e43fd68
%ifnarch %{no_apm_archs}
cvsdist e43fd68
%setup -q -a 5
cvsdist 104390b
cvsdist 104390b
if ! test -e /usr/lib/libapm.a ; then
cvsdist 104390b
    echo "You must have apmd installed"
cvsdist 104390b
    exit 1
cvsdist 104390b
fi
cvsdist 104390b
cvsdist e43fd68
%else
cvsdist 1d3b461
%setup -q
cvsdist e43fd68
%endif
cvsdist e43fd68
cvsdist 494c934
%patch1 -p1 -b .isdn
cvsdist 494c934
cvsdist e43fd68
%ifnarch %{no_apm_archs}
cvsdist e43fd68
%patch2 -p1 -b .nobrokenpath
cvsdist e43fd68
%endif
cvsdist e43fd68
cvsdist 38ef3e3
cp %{SOURCE2} $RPM_BUILD_DIR/%{name}-%{PACKAGE_VERSION}/po/ja.po
cvsdist 38ef3e3
cp %{SOURCE3} $RPM_BUILD_DIR/%{name}-%{PACKAGE_VERSION}/gtik/
cvsdist 38ef3e3
# translations
cvsdist 38ef3e3
tar zxf %{SOURCE4}
cvsdist 1d3b461
%build
cvsdist 1d3b461
cvsdist 1d3b461
%configure --sysconfdir=/etc
cvsdist 1d3b461
CFLAGS="$RPM_OPT_FLAGS"
cvsdist 494c934
OLD_PO_FILE_INPUT=yes make
cvsdist 1d3b461
cvsdist e43fd68
%ifnarch %{no_apm_archs}
cvsdist e43fd68
cd %{battstat}
cvsdist e43fd68
automake
cvsdist e43fd68
%configure 
cvsdist e43fd68
%endif
cvsdist e43fd68
cvsdist 1d3b461
%install
cvsdist 1d3b461
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
cvsdist 1d3b461
%makeinstall
cvsdist 1d3b461
cvsdist e43fd68
%ifnarch %{no_apm_archs}
cvsdist e43fd68
## install battstat
cvsdist e43fd68
cd %{battstat}
cvsdist e43fd68
%makeinstall
cvsdist e43fd68
%endif
cvsdist e43fd68
cvsdist e43fd68
## delete desktop files for extraneous applets
cvsdist e43fd68
cd $RPM_BUILD_ROOT%{_prefix}/share/applets
cvsdist e43fd68
# Salvage this toy clock
cvsdist e43fd68
mv Clocks/jbc_applet.desktop Amusements
cvsdist e43fd68
# nuke other clocks
cvsdist e43fd68
/bin/rm -rf Clocks
cvsdist e43fd68
cvsdist e43fd68
# whoever thought whereami had utility was on hard drugs
cvsdist e43fd68
mv Utility/whereami_applet.desktop Amusements
cvsdist e43fd68
cvsdist e43fd68
## battery_applet .desktop has more translations and a better name,
cvsdist e43fd68
## so we use it, but have it launch battstat instead
cvsdist e43fd68
cvsdist e43fd68
cat Monitors/battery_applet.desktop | sed -e 's/battery_applet/battstat_applet/g' > Utility/battstat_applet.desktop
cvsdist e43fd68
cvsdist e43fd68
# Then nuke battery_applet.desktop
cvsdist e43fd68
rm Monitors/battery_applet.desktop
cvsdist e43fd68
cvsdist e43fd68
%ifarch %{no_apm_archs}
cvsdist e43fd68
# nuke battstat stuff
cvsdist e43fd68
rm Utility/battstat_applet.desktop
cvsdist e43fd68
%else
cvsdist e43fd68
# nuke original battstat .desktop
cvsdist e43fd68
rm Monitors/battstat_applet.desktop
cvsdist e43fd68
%endif
cvsdist e43fd68
cvsdist e43fd68
cd $RPM_BUILD_DIR/%{name}-%{version}
cvsdist e43fd68
cvsdist 1d3b461
# no binary stripping
cvsdist 1d3b461
if [ -f %{name}.files ] ; then
cvsdist 1d3b461
  rm -f %{name}.files
cvsdist 1d3b461
fi
cvsdist 1d3b461
##############################################################################
cvsdist 1d3b461
##
cvsdist 1d3b461
function ProcessLang() {
cvsdist 1d3b461
 # rpm provides a handy scriptlet to do the locale stuff lets use that.
cvsdist 1d3b461
 if [ -f /usr/lib/rpm/find-lang.sh ] ; then
cvsdist 1d3b461
  /usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT %name
cvsdist 1d3b461
  sed "s:(644, root, root, 755):(444, bin, bin, 555):" %{name}.lang >tmp.lang && mv tmp.lang %{name}.lang
cvsdist 1d3b461
  if [ -f %{name}.files ] ; then
cvsdist 1d3b461
    cat %{name}.files %{name}.lang >tmp.files && mv tmp.files %{name}.files
cvsdist 1d3b461
  fi
cvsdist 1d3b461
 fi
cvsdist 1d3b461
}
cvsdist 1d3b461
function ProcessBin() {
cvsdist 1d3b461
  # Gather up all the executable files. Stripping if requested.
cvsdist 1d3b461
  # This will not recurse.
cvsdist 1d3b461
  if [ -d $RPM_BUILD_ROOT%{_prefix}/bin ] ; then
cvsdist 1d3b461
    echo "%defattr (0555, bin, bin)" >>%{name}.files
cvsdist 1d3b461
    find $RPM_BUILD_ROOT%{_prefix}/bin -type f -print | sed "s:^$RPM_BUILD_ROOT::g" >>%{name}.files
cvsdist 1d3b461
  fi
cvsdist 1d3b461
}
cvsdist 1d3b461
cvsdist 1d3b461
function ProcessLib() {
cvsdist 1d3b461
  # Gather up any libraries.
cvsdist 1d3b461
  # Usage: ProcessLib <dir> <type> <output file>
cvsdist 1d3b461
  # Type is either 'runtime' or 'devel'
cvsdist 1d3b461
  if [ -d $1 ] ; then
cvsdist 1d3b461
    echo "%defattr (0555, bin, bin)" >>$3
cvsdist 1d3b461
    case "$2" in
cvsdist 1d3b461
      runtime)
cvsdist 1d3b461
       # Grab runtime libraries
cvsdist 1d3b461
       find $1 -name "*.so.*" -print | sed "s:^$RPM_BUILD_ROOT::g" >>$3
cvsdist 1d3b461
       ;;
cvsdist 1d3b461
      devel)
cvsdist 1d3b461
       find $1 -name "*.so" -print | sed "s:^$RPM_BUILD_ROOT::g" >>$3
cvsdist 1d3b461
       find $1 -name "*.la" -print | sed "s:^$RPM_BUILD_ROOT::g" >>$3
cvsdist 1d3b461
       find $1 -name "*.a" -print | sed "s:^$RPM_BUILD_ROOT::g" >>$3
cvsdist 1d3b461
       find $1 -name "*.sh" -print | sed "s:^$RPM_BUILD_ROOT::g" >>$3
cvsdist 1d3b461
       ;;
cvsdist 1d3b461
    esac
cvsdist 1d3b461
   fi
cvsdist 1d3b461
}
cvsdist 1d3b461
function ProcessDir() {
cvsdist 1d3b461
  # Build a list of files in the specified dir sticking
cvsdist 1d3b461
  # a %defattr line as specified in front of the mess. This is intended
cvsdist 1d3b461
  # for normal dirs. Use ProcessLib for library dirs
cvsdist 1d3b461
  # for include dirs. Appending to <output file>.
cvsdist 1d3b461
  # This will recurse.
cvsdist 1d3b461
  #
cvsdist 1d3b461
  # Usage: ProcessDir <dir> <output file> <attr>
cvsdist 1d3b461
  #
cvsdist 1d3b461
  if [ -d $1 ] ; then
cvsdist 1d3b461
   if [ ! -z "$3" ] ; then
cvsdist 1d3b461
     echo "%defattr ($3)" >>$2
cvsdist 1d3b461
   fi
cvsdist 1d3b461
   echo "*** Processing $1"
cvsdist 1d3b461
   find $1 -type f -print | sed "s:^$RPM_BUILD_ROOT::g" >>$2
cvsdist 1d3b461
  fi
cvsdist 1d3b461
}
cvsdist 1d3b461
cvsdist 1d3b461
function BuildFiles() {
cvsdist 1d3b461
  ProcessBin
cvsdist 1d3b461
  ProcessLang
cvsdist 1d3b461
  for i in `find $RPM_BUILD_ROOT%{_prefix}/share -maxdepth 1 -type d -print | \
cvsdist 1d3b461
     sed "s:^$RPM_BUILD_ROOT%{_prefix}/share::g"` ; do
cvsdist 1d3b461
    echo $i
cvsdist 1d3b461
    case $i in
cvsdist 1d3b461
     /applets|/asclock|/clockmail|/geyes|/gnome|/gweather|/odometer|/sound-monitor|/pixmaps|/tickastat|/xmodmap)
cvsdist 1d3b461
cvsdist 1d3b461
         ProcessDir $RPM_BUILD_ROOT%{_prefix}/share$i %{name}.files "0444, bin, bin, 0555"
cvsdist 1d3b461
         ;;
cvsdist 1d3b461
     *)
cvsdist 1d3b461
         ;;
cvsdist 1d3b461
   esac
cvsdist 1d3b461
  done
cvsdist 1d3b461
  ProcessDir $RPM_BUILD_ROOT/etc %{name}.files "0444, bin, bin, 0555"
cvsdist 1d3b461
  ProcessLib $RPM_BUILD_ROOT%{_prefix}/lib runtime %{name}.files
cvsdist 1d3b461
}
cvsdist 1d3b461
cvsdist 1d3b461
BuildFiles
cvsdist 1d3b461
cvsdist 1d3b461
%clean
cvsdist 1d3b461
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT
cvsdist 1d3b461
cvsdist 1d3b461
%post   -p /sbin/ldconfig
cvsdist 1d3b461
%postun -p /sbin/ldconfig
cvsdist 1d3b461
cvsdist 1d3b461
%files -f %{name}.files
cvsdist 1d3b461
%defattr(-, root, root)
cvsdist 1d3b461
cvsdist 1d3b461
%doc AUTHORS COPYING ChangeLog NEWS README
cvsdist 1d3b461
cvsdist 1d3b461
%changelog
cvsdist 104390b
* Wed Jul 18 2001 Havoc Pennington <hp@redhat.com>
cvsdist 104390b
- add some build requires
cvsdist 104390b
- remove ifarch build requires, replace with check in setup
cvsdist 104390b
cvsdist e43fd68
* Wed Jul 11 2001 Florian La Roche <Florian.LaRoche@redhat.de>
cvsdist e43fd68
- sanitize specfile to RH style
cvsdist e43fd68
- do not require apmd for s390 s390x
cvsdist e43fd68
cvsdist e43fd68
* Mon Jul  9 2001 Jonathan Blandford <jrb@redhat.com>
cvsdist e43fd68
- new version
cvsdist e43fd68
cvsdist e43fd68
* Sun Jul 08 2001 Havoc Pennington <hp@redhat.com>
cvsdist e43fd68
- remove extra .desktop file for battstat
cvsdist e43fd68
cvsdist e43fd68
* Sat Jul 07 2001 Havoc Pennington <hp@redhat.com>
cvsdist e43fd68
- add battstat applet
cvsdist e43fd68
- rearrange .desktop files for applets
cvsdist e43fd68
cvsdist 494c934
* Tue Jun 12 2001 Than Ngo <than@redhat.com>
cvsdist 494c934
- fix isdn stuff to build against kernel-2.4.x
cvsdist 494c934
- use %%{_tmppath}
cvsdist 494c934
cvsdist 494c934
* Mon Jun 11 2001 Florian La Roche <Florian.LaRoche@redhat.de>
cvsdist 494c934
- allow newer gettext versions
cvsdist ad09fa5
cvsdist 38ef3e3
* Thu Mar 15 2001 Havoc Pennington <hp@redhat.com>
cvsdist 38ef3e3
- translations
cvsdist 38ef3e3
cvsdist 38ef3e3
* Mon Feb 12 2001 Akira TAGOH <tagoh@redhat.com>
cvsdist 38ef3e3
- Updated Japanese translation (ja.po, .desktop).
cvsdist 38ef3e3
  Note: Please remove Source[23]: when release the next upstream version.
cvsdist 38ef3e3
cvsdist 38ef3e3
* Fri Jan 19 2001 Havoc Pennington <hp@redhat.com>
cvsdist 38ef3e3
- 1.2.4
cvsdist 38ef3e3
cvsdist 1d3b461
* Fri Aug 11 2000 Jonathan Blandford <jrb@redhat.com>
cvsdist 1d3b461
- Update Epoch
cvsdist 1d3b461
cvsdist 1d3b461
* Wed Jul 19 2000 Jonathan Blandford <jrb@redhat.com>
cvsdist 1d3b461
- Change slashapp to gnome-news app.
cvsdist 1d3b461
cvsdist 1d3b461
* Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
cvsdist 1d3b461
- automatic rebuild
cvsdist 1d3b461
cvsdist 1d3b461
* Mon Jun 19 2000 Owen Taylor 
cvsdist 1d3b461
- %%defattr fixes
cvsdist 1d3b461
- Remove Docdir:
cvsdist 1d3b461
cvsdist 1d3b461
* Thu Jun 15 2000 Havoc Pennington <hp@redhat.com>
cvsdist 1d3b461
- 1.2.1
cvsdist 1d3b461
- use %%makeinstall