%define plugins animation colorfilter expo ezoom jpeg mag mousepoll neg opacify put resizeinfo ring scaleaddon session shift snap staticswitcher text thumbnail vpswitch wall winrules workarounds

Name: compiz-plugins
Version: 0.8.8
Release: 2%{?_dist_release}
Summary: Collection of Compiz plugins
Summary(ja): Compiz プラグイン集
Group: User Interface/Desktops        
License: GPLv2+       
URL: http://compiz.org            

Source0: http://releases.compiz.org/0.8.8/%{name}-main-%{version}.tar.bz2
# Upstream commit 46960f12a9d213e5f0e841557e2ed2f7ea18cc79
Patch2: compiz-0.7.8-x_to_glx_workaround.patch
# Upstream commit 319c3c40ebd0b37c8132ecf60d02154e94299832
Patch3: compiz-plugin-0.8.2-fix-initialize.patch


BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

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

BuildRequires: compiz-devel >= %{version}
BuildRequires: compiz-bcop >= 0.8.2
BuildRequires: gettext
BuildRequires: cairo-devel
BuildRequires: pango-devel
BuildRequires: perl(XML::Parser)
BuildRequires: mesa-libGLU-devel
BuildRequires: libXrender-devel
BuildRequires: GConf2
BuildRequires: libjpeg-devel
BuildRequires: protobuf-devel
BuildRequires: gawk
Requires: compiz
Obsoletes: beryl-plugins
Obsoletes: compiz-fusion < 0.8.0
Provides: compiz-fusion = %{version}

Vendor: Project Vine
Distribution: Vine Linux

%description
This package contains Compiz plugins (a.k.a. CompizFusion)


%package gnome
Summary: Compiz gnome configuration
Summary(ja): Compiz gnome configuration
Group: User Interface/Desktops
Requires: %{name} = %{version}
Requires(pre): GConf2
Requires(post): GConf2
Requires(preun): GConf2
Obsoletes: compiz-fusion-gnome < 0.8.0

%description gnome
This package contains the GNOME configuration for Compiz

%package devel
Group: Development/Libraries
Summary: Development files for Compiz
Summary(ja): Development files for Compiz
Requires: compiz-devel
Requires: %{name} = %{version}
Requires: cairo-devel
Requires: pango-devel
Obsoletes: compiz-fusion-devel < 0.8.0

%description devel
This package contain development files required for developing other plugins


%prep
%setup -q -n %{name}-main-%{version}
## %patch2 -p1 -b .xglx
## %patch3 -p1 -b .fix-init-var

%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}-main


%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}-main.lang
%defattr(-,root,root,-)
%doc COPYING AUTHORS
%{_libdir}/compiz/*.so
%{_datadir}/compiz/*.xml
%{_datadir}/compiz/filters/
%{_datadir}/compiz/Oxygen/
%{_datadir}/compiz/Gnome/

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

%files devel
%defattr(-,root,root,-)
%{_includedir}/compiz/
%{_libdir}/pkgconfig/compiz-*


%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
- add BuildRequires: protobuf-devel

* 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 <bsyamato@sea.plala.or.jp> 0.8.6-1
- new upstream release
- drop Patch2, Patch3

* 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 to compiz-plugins
  - add Obsoletes: compiz-fusion < 0.8.0
  - add Provides: compiz-fusion = %%{version}
- add Patch3 from upstream

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

* Thu Apr 30 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.8-2
- add Patch1: fix winrules plugin from upstream
- add Patch2: fix broken drawing in some windows
- add Patch3: fix CVS-2008-6514

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

* Fri Jul 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

* Sat May 10 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-14
- Rebuild for gcc-4.3

* Sun Jan 06 2008 Adel Gadllah <adel.gadllah@gmail.com> 0.6.0-13
- Readded accidently dropped memoryleak fix

* Thu Jan 03 2008 Adel Gadllah <adel.gadllah@gmail.com> 0.6.0-12
- Fix build with gcc43

* Sun Dec 30 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.6.0-11
- Fix stupid typo in the patch

* Thu Dec 27 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.6.0-10
- Plug small memory leak

* Thu Dec 27 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.6.0-9
- Don't break legacy apps that want to unfullscreen themselves

* Tue Dec 25 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.6.0-8
- Fix fullscreen for flash windows when legacy fullscreen is 
  enabled.

* Sat Dec 01 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.6.0-7
- Adding the patch isn't enough .. we have to apply it ;)

* Sat Dec 01 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.6.0-6
- Backport upstream openoffice menu fix

* Sun Oct 28 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.6.0-5
- Rediff patch

* Sun Oct 28 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.6.0-4
- Fix previous patch

* Sat Oct 27 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.6.0-3
- Apply patch from upstream to fix RH #354601

* Mon Oct 22 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.6.0-2
- Obsolete beryl-plugins

* 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-10.09b700
- Fix BuildRequries to build missing plugins (RH #327411)
- Mock isn't broken but the Buildrequires ... remove hack

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

* Sun Sep 23 2007 Adel Gadllah <adel.gadllag@gmail.com> 0.5.2-8.09b700
- Fix changelog date

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

* Wed Sep 19 2007 Adel Gadllah <adel.gadllag@gmail.com> 0.5.2-6
- Add animation to plugin list

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

* 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