# Note that this is NOT a relocatable package
%define ccsingle control-center-single-0.3

%define gettext_package control-center

Summary: GNOME 1 control center library compatibility package
Summary(ja): GNOME1 コントロールセンターライブラリ互換パッケージ
Name: libcapplet0
Version: 1.4.0.1
Release: 11%{?_dist_release}
License: GPL/LGPL
Group: System Environment/Libraries
Source: ftp://ftp.gnome.org/pub/control-center-%{version}.tar.gz

Source11: control-center-pofiles.tar.gz
Source12: %{ccsingle}.tar.gz

BuildPrereq: gdk-pixbuf
BuildRoot: %{_tmppath}/control-center-%{version}-root
BuildRequires: gdk-pixbuf-devel
BuildRequires: gnome-libs-devel >= 1.4.2
BuildRequires: libxml-devel
BuildRequires: imlib-devel libungif-devel
BuildRequires: automake14
BuildRequires: libpng-devel
BuildRequires: db4-devel
BuildRequires: gnome-vfs-devel

Obsoletes: gnome

URL: http://www.gnome.org

Patch: control-center-nosound.patch
Patch1: control-center-esdrelease.patch
Patch3: control-center-fsbgpath.patch
#Patch4: control-center-1.0.5-dontstartesd.patch
#Patch5: control-center-1.0.5-newsession.patch
#Patch6: control-center-1.0.5-fixclosedlg.patch 
Patch7: control-center-1.2.0-limitedbgs.patch

#Patch8: control-center-1.0.5-smfixtry.patch

#Patch22: control-center-1.0.5-warning.patch
#Patch23: control-center-1.0.7pre-cappletrace.patch
#Patch24: control-center-fixrevert.patch

Patch25: control-center-1.4.0.1-bgcolor1.patch
#Patch26: control-center-1.2.0-switch.patch
Patch27: control-center-1.2.0-history.patch
#Patch28: control-center-1.2.0-themesafety.patch
Patch29: control-center-1.2.0-wmaker.patch
Patch30: control-center-1.2.1-bigbg.patch
#Patch31: control-center-1.2.1-noread.patch
#Patch32: control-center-1.2.1-solidbg.patch
#Patch33: control-center-1.2.2-fvwm2.patch
# Japanese patch
#Patch40: control-center-1.2.1-jp.patch
# Korean-related patch (?) bug #23782
#Patch41: control-center-1.2.2-fontset.patch
Patch50: control-center-mixer.patch
Patch51: control-center-xscreensaver-dpms.patch
Patch52: control-center-1.4.0.1-multifix.patch
Patch54: control-center-1.4.0.1-correct_config.patch
Patch55: control-center-1.4.0.1-cleanup.patch
Patch56: control-center-1.4.0.1-cjk.patch
Patch57: control-center-1.4.0.1-setroothint.patch
Patch58: control-center-1.4.0.1-uipropertiesmenu.patch
Patch59: control-center-1.4.0.1-pixbufflags.patch
Patch60: control-center-1.4.0.1-compileflags.patch
Patch61: control-center-1.4.0.1-noscreensaver.patch
Patch62: control-center-1.4.0.1-bg-radio-buttons.patch
# Make the theme switcher write fontsets, not fonts
Patch63: control-center-1.4.0.1-fontset.patch

#sources/patches for Vine
Patch103:       control-center-1.2.4-vinesplash.patch
Patch106:       control-center-1.4.0.1-vinedefaults.patch

%description 

This package provides the "libcapplet.so.0" library and header files
as found in GNOME 1, used by some packages not yet ported to GNOME 2.

%description -l ja

このパッケージではまだ GNOME2 に移植されていないパッケージで使用されている
GNOME1 の "libcapplet.so.0" ライブラリとそのヘッダファイルを提供しています。

%package devel
Summary: Header files for GNOME 1 control center library compatibility package
Group: Development/Libraries
Requires: libcapplet0 = %{version}
Requires: gnome-libs-devel

%description devel
The libcapplet0-devel package contains the development environment
needed for creating the capplets used in the GNOME 1 Control
Center. This is only for compiling old applications not yet 
ported to GNOME 2.

%prep
%setup -q -n control-center-%{version} -a 12

#(cd $RPM_BUILD_DIR/control-center-%{PACKAGE_VERSION}/capplets &&
# tar xfz %{SOURCE3})
# our translations
tar zxf %{SOURCE11}

%patch -p1 -b .nosound
%patch1 -p1 -b .esdrelease
%patch3 -p1 -b .fsbgpath
#%patch4 -p1 -b .dontstartesd
#%patch5 -p1 -b .newsession
#%patch6 -p1 -b .fixclosedlg
%patch7 -p1 -b .limitedbgs
#%patch8 -p1 -b .smfixtry

#%patch22 -p1 -b .warning
#%patch23 -p1 -b .cappletrace
#%patch24 -p1 -b .fixrevert

%patch25 -p1 -b .bgcolor1

#%patch26 -p1 -b .switch
#%patch27 -p1 -b .history
#%patch28 -p1 -b .themesafety
%patch29 -p1 -b .wmaker
%patch30 -p1 -b .bigbg
#%patch31 -p1 -b .noread
#%patch32 -p1 -b .solidbg
#%patch33 -p1 -b .fvwm2
#%patch40 -p1 -b .jp
#%patch41 -p1 -b .fontset
%patch50 -p1 -b .mixer
%patch51 -p1 -b .dpms
%patch52 -p1 -b .multifix
%patch54 -p1 -b .correct_config
%patch55 -p1 -b .cleanup
%patch56 -p1 -b .cjk
%patch57 -p1 -b .setroothint
%patch58 -p1 -b .uipropertiesmenu
%patch59 -p1 -b .pixbufflags
#%patch60 -p1 -b .compileflags
#%patch61 -p1 -b .screensaver
%patch62 -p1 -b .bg-radio-buttons
%patch63 -p1 -b .fontset

%patch103 -p1 -b .vinesplash
%patch106 -p1 -b .vinedefaults

sed -e "s,/usr/share/idl,`pwd`/idl,g" \
  %{ccsingle}/single-capplet-shell/Makefile.am > Makefile.am.new
mv -f Makefile.am.new %{ccsingle}/single-capplet-shell/Makefile.am

automake-1.4
(cd %{ccsingle}; automake-1.4 || exit 1)

# install new desktop entry and icon
#cp %{SOURCE1} $RPM_BUILD_DIR/control-center-%{PACKAGE_VERSION}/control-center
#cp %{SOURCE2} $RPM_BUILD_DIR/control-center-%{PACKAGE_VERSION}/control-center

%build
%configure --sysconfdir=/etc
export tagname=CC
make SUBDIRS="control-center idl po" LIBTOOL=/usr/bin/libtool

export GNOME_LIBCONFIG_PATH=`pwd`/control-center
sed -e "s,CAPPLET_INCLUDEDIR=\",CAPPLET_INCLUDEDIR=\"-I`pwd`/control-center ," \
    -e "s,CAPPLET_LIBS=\",CAPPLET_LIBS=\"-L`pwd`/control-center ," \
	control-center/cappletConf.sh > cappletConf.sh.new
mv -f cappletConf.sh.new control-center/cappletConf.sh

cd %{ccsingle}
%configure
make LIBTOOL=/usr/bin/libtool

%install
rm -rf $RPM_BUILD_ROOT

export tagname=CC
%makeinstall SUBDIRS="control-center idl po" sysconfdir=$RPM_BUILD_ROOT/etc LIBTOOL=/usr/bin/libtool

# clear out ui props for now
#rm -f $RPM_BUILD_ROOT%{prefix}/bin/ui-properties
#rm -rf $RPM_BUILD_ROOT%{prefix}/share/control-center/UIOptions
#rm -rf $RPM_BUILD_ROOT%{prefix}/share/gnome/apps/Settings/UIOptions

# get rid of this, so it won't show up in panel menu. use start here 
# instead.
rm -f $RPM_BUILD_ROOT%{prefix}/share/gnome/apps/Settings/gnomecc.desktop

# get rid of files we don't want to ship
rm -f $RPM_BUILD_ROOT/%{_bindir}/gnomecc
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT/%{_datadir}/pixmaps/*
rm -f $RPM_BUILD_ROOT/%{_datadir}/gnome/apps/Settings/gnomecc.desktop

cd %{ccsingle}
export tagname=CC
%makeinstall sysconfdir=$RPM_BUILD_ROOT/etc LIBTOOL=/usr/bin/libtool
cd ..

%find_lang %{gettext_package}

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f %{gettext_package}.lang
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_libdir}/lib*.so.*
%{_sysconfdir}/CORBA/servers/gnomecc.gnorba
%{_bindir}/gnomecc-single-shell

%files devel
%defattr(-, root, root)
%{_libdir}/lib*.so
%{_libdir}/*.a
%{_libdir}/*Conf.sh
%{_datadir}/idl
%{_includedir}/*

%changelog
* Sat Aug 16 2008 Shu KONNO <owa@bg.wakwak.com> 1.4.0.1-11vl5
- applied new versioning policy, spec in utf-8

* Thu Aug 16 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.0.1-10vl7
- rebuilt with new toolchain
- changed Group to System Environment/Libraries

* Sat May 21 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.0.1-10vl6
- Rebuild for VineSeed

* Sat May 21 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.0.1-10vl5
- Rebuild for VinePlus/3.0
- added BuildRequires: libungif-devel (for imlib), gnome-vfs-devel

* Thu Oct 21 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4.0.1-10vl4
- fixed spec file encoding
- add Japanese description

* Wed Oct 13 2004 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.4.0.1-10vl3
- rebuilt with db4-4.2.52

* Wed May 19 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.0.1-10vl2
- rebuild with db4

* Sat Jan 18 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.0.1-10vl1
- build for Vine Linux
- add Vine patches from control-center-1.4.0.1-0vl8

* Thu Nov  7 2002 Jeremy Katz <katzj@redhat.com> 1.4.0.1-10
- rebuild for libdir changes, remove unpackaged files from buildroot

* Wed Jul 31 2002 Havoc Pennington <hp@redhat.com>
- require libpng-devel 70182

* Wed Jul 31 2002 Elliot Lee <sopwith@redhat.com> 1.4.0.1-8
- Make it work without libcapplet0-devel being already installed (#70342)

* Thu Jul 25 2002 Havoc Pennington <hp@redhat.com>
- fix gettext package name so we get translations and rebuild OK

* Mon Jun 17 2002 Jeremy Katz <katzj@redhat.com>
- add gnomecc-single-shell back so that gnome1 capplets can continue working

* Sun May 26 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu May 16 2002 Bill Nottingham <notting@redhat.com>
- remove some extraneous Requires:

* Mon May 13 2002 Jeremy Katz <katzj@redhat.com>
- rebuild in new environment

* Thu Apr 25 2002 Havoc Pennington <hp@redhat.com>
- rebuild in different environment
- fix up automake stuff

* Wed Apr 17 2002 Havoc Pennington <hp@redhat.com>
- convert to compat package containing only libcapplet

* Mon Apr 15 2002 Havoc Pennington <hp@redhat.com>
- merge in translations

* Fri Apr 12 2002 Owen Taylor <otaylor@redhat.com>
- Make the theme selector write fontsets, not fonts (#62413)

* Mon Apr  1 2002 Havoc Pennington <hp@redhat.com>
- really put screensaver capplet back (I think)

* Wed Mar 27 2002 Bill Nottingham <notting@redhat.com>
- revert xscreensaver change

* Wed Mar 27 2002 Havoc Pennington <hp@redhat.com>
- init "Scaled" radio button correctly #61913

* Mon Mar 25 2002 Havoc Pennington <hp@redhat.com>
- change path to windowmaker config tool again, #61824

* Thu Mar 14 2002 Bill Nottingham <notting@redhat.com>
- rather than keep patching and patching it, use xscreensaver's own
  capplet

* Wed Feb 27 2002 Havoc Pennington <hp@redhat.com>
- rebuild in Hampton

* Wed Jan 30 2002 Jonathan Blandford <jrb@redhat.com>
- Rebuild package.

* Thu Jan 24 2002 Tim Powers <timp@redhat.com>
- rebuilt against new openssl

* Fri Jan 18 2002 Havoc Pennington <hp@redhat.com>
- automake14
- don't run auto* again in ccsingle subdir, not sure why we did that

* Sun Oct 28 2001 Havoc Pennington <hp@redhat.com>
- rebuild with new gnome-libs so that libcapplet has right cflags/libs
- pixbufflags patch to make the rebuild work
- compileflags patch to make control-center-single work

* Wed Aug 29 2001 Havoc Pennington <hp@redhat.com>
- fix #52831 (UI properties in Programs menu)

* Mon Aug 27 2001 Havoc Pennington <hp@redhat.com>
- Add po files from sources.redhat.com

* Thu Aug 23 2001 Havoc Pennington <hp@redhat.com>
- set the _XROOTCOLOR_PIXEL property, should fix
  bug #52141

* Wed Aug 22 2001 Yukihiro Nakai <ynakai@redhat.com>
- Update translation.
- Add CJK fontset patch

* Thu Aug 16 2001 Jonathan Blandford <jrb@redhat.com>
- New control-center-single to handle exiting, #51665

* Wed Aug 01 2001 Havoc Pennington <hp@redhat.com>
- remove .desktop file for gnomecc, so it won't appear 
  in panel menu, #49653

* Mon Jul 30 2001 Jonathan Blandford <jrb@redhat.com>
- allow to build without depending on control-center-devel

* Mon Jul 23 2001 Jonathan Blandford <jrb@redhat.com>
- Add BuildRequires

* Mon Jul 16 2001 Jonathan Blandford <jrb@redhat.com>
- New version of control-center-single

* Thu Jul 12 2001 Alexander Larsson <alexl@redhat.com>
- Change default background to the same as the nautilus one

* Mon Jul 09 2001 Havoc Pennington <hp@redhat.com>
- add hack to default to standalone control panels

* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
- Bump release + rebuild.

* Tue May 22 2001 Havoc Pennington <hp@redhat.com>
- putting in tree for David

* Tue May 22 2001 David Sainty <dsainty@redhat.com>
- improve DPMS patch for the try case, and enable patch

* Wed May  2 2001 Bill Nottingham <notting@redhat.com>
- add patch to use xscreensaver's DPMS stuff, require that version

* Fri Apr 20 2001  <jrb@redhat.com>
- New Version (1.4.0.1)

* Wed Apr  4 2001 Bill Nottingham <notting@redhat.com>
- kick the mixer once on startup if we aren't running esd

* Thu Mar 15 2001 Havoc Pennington <hp@redhat.com>
- translations

* Thu Mar 01 2001 Owen Taylor <otaylor@redhat.com>
- Rebuild for GTK+-1.2.9 include paths

* Fri Feb 23 2001 Trond Eivind Glomsr藷?<teg@redhat.com>
- langify
- don't define and use "ver" at the top of the file
- move changelog to sane location

* Thu Feb 08 2001 Elliot Lee <sopwith@redhat.com> 1.2.2-4
- Apply patch from bug #23782 to see how it works

* Fri Feb 02 2001 Elliot Lee <sopwith@redhat.com> 1.2.2-3
- Include fvwm2.desktop in WM's

* Sat Jan 27 2001 Akira TAGOH <tagoh@redhat.com>
- Added Japanese patch.

* Mon Dec 04 2000 Jonathan Blandford <jrb@redhat.com>
- Update release.

* Sun Aug 13 2000 Owen Taylor <otaylor@redhat.com>
- Again, fix problem with solid backgrounds in bg-properties capplet
  (patch got lost somewhere) 

* Fri Aug 11 2000 Jonathan Blandford <jrb@redhat.com>
- Up Epoch and release

* Thu Aug 10 2000 Owen Taylor <otaylor@redhat.com>
- Handle unreadable desktop files without crashing

* Mon Aug 07 2000 Owen Taylor <otaylor@redhat.com>
- Fix problem with backgrounds bigger than screen.

* Tue Aug 01 2000 Owen Taylor <otaylor@redhat.com>
- Fix problem when ~/.gtkrc does not already exist.
- Fix problem with solid backgrounds in bg-properties capplet

* Tue Jul 18 2000 Owen Taylor <otaylor@redhat.com>
- Sort of fix problem with people hitting OK while the 
  "Save Session" dialog is still up. (Session won't be saved, 
  but at least the selected entry will be correctly kept.)
- Fix history list in background properties capplet
- Fix problems with temporary files in theme-selector capplet

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Mon Jun 19 2000 Owen Taylor <otaylor@redhat.com>
- Require redhat-logos
- Some spec file and FHS fixes
- reposition embedded logo a bit

* Mon Jun 19 2000 Owen Taylor <otaylor@redhat.com>
- Add big change to use gdk-pixbuf for backgrounds and add
  the ability to emboss the background with a logo

* Mon Feb 28 2000 Preston Brown <pbrown@redhat.com>
- revert .so strip

* Thu Feb 03 2000 Preston Brown <pbrown@redhat.com>
- strip .so lib
- use configure macro

* Mon Sep 20 1999 Jonathan Blandford <jrb@redhat.com>
- changed to work with 1.0.40

* Fri Sep 17 1999 Jonathan Blandford <jrb@redhat.com>
- Added fixrevert bug to fix bug in theme selector.

* Sun Jun 13 1999 Jonathan Blandford <jrb@redhat.com>
- updated RPM to use new control-center.

* Wed Apr 07 1999 Michael Fulbright <drmike@redhat.com>
- fixed sound-properties to only disable sound when run with --init-settings-..
- removed debugging output from several capplets, fixed try behaviour of sm and
  gnome-edit capplets
- fixed bug in screensaver and background props
- added new icons

* Mon Apr 05 1999 Jonathan Blandford <jrb@redhat.com>
- added a patch to fix the close dialog
- added a patch to limit the number of bg's in the history.

* Fri Apr 02 1999 Jonathan Blandford <jrb@redhat.com>
- vesion 1.0.5
- removed all patches >10 other then dontstartesd.

* Thu Apr 01 1999 Michael Fulbright <drmike@redhat.com>
- removed UI props till it works better

* Wed Mar 31 1999 Michael Fulbright <drmike@redhat.com>
- make sure we DONT inadvertantly start esd by calling esd_open_...

* Tue Mar 30 1999 Michael Fulbright <drmike@redhat.com>
- changed default bg color to '#356390'

* Thu Mar 25 1999 Michael Fulbright <drmike@redhat.com>
- prime file selector path for browse in background-props if 
  "/usr/share/pixmaps/backgrounds/" exists.
- fix behavior of file selector when you delete/cancel/ok it

* Wed Mar 24 1999 Michael Fulbright <drmike@redhat.com>
- added patch to fix trying in theme selector 
- disabled crystal screensaver, it does evil things to preview in capplet

* Mon Mar 22 1999 Michael Fulbright <drmike@redhat.com>
- version 1.0.4, fixes problems with sndprops and theme props among
  other things.

* Thu Mar 18 1999 Michael Fulbright <drmike@redhat.com>
- fix sound-properties capplet so Try/Revert doesnt come on unless user
  changes something
- fixed theme-selector to not leave processes behind on Linux 2.2 kernels
- strip binaries

* Sun Mar 14 1999 Michael Fulbright <drmike@redhat.com>
- version 1.0.3
- added patch to make esd release after 30 sec of inactivity

* Wed Mar 10 1999 Michael Fulbright <drmike@redhat.com>
- version 1.0.2
- turned off sound by default

* Thu Mar 04 1999 Michael Fulbright <drmike@redhat.com>
- version 1.0.1

* Mon Feb 15 1999 Michael Fulbright <drmike@redhat.com>
- version 0.99.8.1
- added etc/CORBA/servers/* to file list

* Fri Feb 12 1999 Michael Fulbright <drmike@redhat.com>
- update to 0.99.8
- added /usr/lib/cappletConf.sh

* Mon Feb 08 1999 The Rasterman <raster@redhat.com>
- update to 0.99.5.1

* Wed Feb 03 1999 Michael Fulbright <drmike@redhat.com>
- update to 0.99.5

* Mon Jan 20 1999 Michael Fulbright <drmike@redhat.com>
- update to 0.99.3.1

* Mon Jan 18 1999 Michael Fulbright <drmike@redhat.com>
- update to 0.99.3
- seems like patch for non-standard xscreensaver placement was already in
  prestine sources(?)

* Wed Jan 06 1999 Jonathan Blandford <jrb@redhat.com>
- updated to 0.99.1
- temporary hack patch to get path to work to non-standard placement
  of xscreensaver binaries in RH 5.2

* Wed Dec 16 1998 Jonathan Blandford <jrb@redhat.com>
- Created for the new control-center branch

