%define plugins 3d addhelper animationaddon bench bicubic crashhandler cubeaddon extrawm fadedesktop firepaint gears group loginout maximumize mblur notification reflex scalefilter shelf showdesktop showmouse splash trailfocus wallpaper widget

Name: compiz-plugins-extra
Version: 0.8.8
Release: 2%{?_dist_release}
Summary: Additional Compiz plugins
Summary(ja): Compiz 追加プラグイン集
Group: User Interface/Desktops        
License: GPLv2+
URL: http://compiz.org
Source0: http://releases.compiz.org/0.8.8/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

# libdrm is not available on these arches
ExcludeArch: s390 s390x ppc64

BuildRequires: compiz-plugins-devel >= %{version}
BuildRequires: compiz-bcop >= 0.8.2
BuildRequires: perl(XML::Parser)
BuildRequires: mesa-libGLU-devel
BuildRequires: libXrender-devel
BuildRequires: libjpeg-devel
BuildRequires: GConf2
BuildRequires: gawk
BuildRequires: gettext

Requires: compiz-plugins
Obsoletes: compiz-fusion-extras < 0.8.0

Vendor: Project Vine
Distribution: Vine Linux

%description
This package contains additional plugins for Compiz

%package gnome
Summary: Compiz Plugins Extras gnome configuration
Summary(ja): Compiz 追加 GNOME 設定
Group: User Interface/Desktops
Requires: %{name} = %{version}
Requires(pre): GConf2
Requires(post): GConf2
Requires(preun): GConf2
Obsoletes: compiz-fusion-extras-gnome < 0.8.0


%description gnome
This package contains the GNOME configuration for
Compiz Plugins Extras


%prep
%setup -q


%build
%configure --enable-schemas
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

rm -f $RPM_BUILD_ROOT%{_libdir}/compiz/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/compiz/*.a

%find_lang %{name}


%post gnome
export GCONF_CONFIG_SOURCE=`%{_bindir}/gconftool-2 --get-default-source`
for p in in %{plugins}; do
    echo %{_sysconfdir}/gconf/schemas/compiz-$p.schemas ;done \
    | xargs %{_bindir}/gconftool-2 --makefile-install-rule >& /dev/null ||:

%pre gnome
if [ "$1" -gt 1 ]; then
  export GCONF_CONFIG_SOURCE=`%{_bindir}/gconftool-2 --get-default-source`
  for p in in %{plugins}; do
        echo %{_sysconfdir}/gconf/schemas/compiz-$p.schemas ;done \
        | xargs %{_bindir}/gconftool-2 --makefile-uninstall-rule >& /dev/null ||:
fi

%preun gnome
if [ "$1" -eq 0 ]; then
  export GCONF_CONFIG_SOURCE=`%{_bindir}/gconftool-2 --get-default-source`
  for p in in %{plugins}; do
        echo %{_sysconfdir}/gconf/schemas/compiz-$p.schemas ;done \
        | xargs %{_bindir}/gconftool-2 --makefile-uninstall-rule >& /dev/null ||:
fi


%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING AUTHORS
%{_libdir}/compiz/*.so
%{_datadir}/compiz/*.xml
%{_datadir}/compiz/*.png
%{_includedir}/compiz/compiz-animationaddon.h
%{_libdir}/pkgconfig/compiz-animationaddon.pc

%files gnome
%defattr(-,root,root,-)
%{_sysconfdir}/gconf/schemas/*.schemas

%changelog
* Sun Dec 29 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.8-2
- rebuild with VineSeed environment

* Sun Aug 14 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.8-1
- new upstream release

* Sat Sep 25 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.6-2
- rebuild with rpm-4.8.1 for pkg-config file

* Sun Apr 11 2010 Yoji TOYODA <bsymaato@sea.plala.or.jp> 0.8.6-1
- new upstream release

* Mon May 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.2-1
- update to 0.8.2
- compiz-fusion is merged in compiz
  - rename compiz-fusion-extras to compiz-plugins-extra
  - add Obsoletes: compiz-fusion-extras < 0.8.0

* Sat May 02 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.8-2
- fix pre/post scripts for speeding up gconf schema installation

* Sat Oct 11 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.8-1
- new upstream release

* Wed Jun 11 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.6-1
- new upstream release

* Mon May 19 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.4-1
- new upstream release

* Wed May 14 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.2-1
- initial build for Vine Linux

* Tue Mar 25 2008 Adel Gadllah <adel.gadllah@gmail.com> 0.7.2-2
- Fix scriptlet failure

* Mon Mar 24 2008 Adel Gadllah <adel.gadllah@gmail.com> 0.7.2-1
- Update to 0.7.2

* Sat Feb 09 2008 Adel Gadllah <adel.gadllah@gmail.com> 0.6.0-3
- Rebuild for gcc-4.3

* Fri Jan 04 2008 Adel Gadllah <adel.gadllah@gmail.com> 0.6.0-2
- Fix build with gcc43

* Mon Oct 22 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.6.0-1
- Update to 0.6.0

* Fri Oct 12 2007 Adel Gadllah <adel.gadllag@gmail.com> 0.5.2-9.6871d0
- Rebuild against new compiz-fusion to build missing plugins (RH #327441)

* Wed Oct 10 2007 Warren Togami <wtogami@redhat.com> 0.5.2-8.6871d0
- >= instead of = to allow compiz upgrade flexibility

* Sun Sep 23 2007 Adel Gadllah <adel.gadllag@gmail.com> 0.5.2-7.6871d0
- GConf schemas got renamed .. fix scripts to install them
- Fix changelog date

* Sat Sep 22 2007 Adel Gadllah <adel.gadllag@gmail.com> 0.5.2-6.6871d0
- Update to 0.6 branch (builds against current compiz)

* Sat Sep 15 2007 Adel Gadllah <adel.gadllag@gmail.com> 0.5.2-5
- Fix gconf schemas install (RH #53692)
- Some build fixes

* Fri Aug 24 2007 Adel Gadllah <adel.gadllag@gmail.com> 0.5.2-4
- Remove redundant buildrequires

* Fri Aug 24 2007 Adel Gadllah <adel.gadllag@gmail.com> 0.5.2-3
- BuildRequire gawk

* Wed Aug 22 2007 Adel Gadllah <adel.gadllag@gmail.com> 0.5.2-2
- Fix gconf schemas (un)installation

* Sat Aug 18 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.5.2-1
- Initial build


