Name:           ccsm
Version:        0.8.4
Release:        3%{?_dist_release}
Summary:        Plugin and configuration tool - Compiz Fusion Project
Summary(ja):    プラグインおよび設定ツール - Compiz Fusion プロジェクト
Group:          User Interface/Desktops
License:        GPLv2+
URL:            http://www.opencompositing.org

Source0:        http://releases.compiz-fusion.org/%{version}/%{name}-%{version}.tar.bz2
Patch101:       ccsm-removeshebangs.patch
# libdrm is not available on these arches

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
ExcludeArch:    s390 s390x ppc64
BuildArch:      noarch
BuildRequires:  python-devel, gettext, desktop-file-utils
Requires:       compizconfig-python >= %{version}
Requires:       libcompizconfig >= %{version}
Requires:       pygtk2, python-sexy

Vendor: Project Vine
Distribution: Vine Linux

%description
The Compiz Project brings 3D desktop visual effects that improve
usability of the X Window System and provide increased productivity
though plugins and themes contributed by the community giving a
rich desktop experience.

This package contains a gui configuration tool to configure Compiz
plugins and the composite window manager.

%prep
%setup -q 
%patch101 -p1 -b .ccsm-removeshebangs

%build
#configure 
#make %{?_smp_mflags}
python setup.py build

%install
rm -rf $RPM_BUILD_ROOT
#make install DESTDIR=$RPM_BUILD_ROOT
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT
desktop-file-install \
      --vendor="" \
      --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
      --remove-category="Compiz" \
      $RPM_BUILD_ROOT%{_datadir}/applications/ccsm.desktop

%find_lang %{name}

rm -f $RPM_BUILD_ROOT%{python_sitelib}/*.egg-info

%post
if [ -x /usr/bin/gtk-update-icon-cache ]; then
        /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
fi

%postun
if [ -x /usr/bin/gtk-update-icon-cache ]; then
        /usr/bin/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
fi

%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING VERSION
%{_bindir}/ccsm
%{_datadir}/applications/ccsm.desktop
%{_datadir}/ccsm/
%{_datadir}/icons/hicolor/*/apps/ccsm.*
%{python_sitelib}/ccm/


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

* Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.4-2
- rebuild with python-2.7.2

* Sat Nov 06 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.8.4-1
- new upstream release

* Wed Feb 03 2010 Shu KONNO <owa@bg.wakwak.com> 0.8.2-2
- rebuilt with python-2.6.4

* Mon May 04 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.8.2-1
- new upstream release

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

* Wed Jul 23 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.6-3
- remove vendor prefix from desktop filename.

* Mon Jul 21 2008 Shu KONNO <owa@bg.wakwak.com> 0.7.6-2
- rebuilt with python-2.5.2

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

* 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

* Sat Mar 29 2008 Mohd Izhar Firdaus Ismail <mohd.izhar.firdaus@gmail.com> 0.7.2-1
- 0.7.2 update

* Sat Dec 8 2007 Mohd Izhar Firdaus Ismail <mohd.izhar.firdaus@gmail.com> 0.6.0-5
- added installed but unpackaged file ccsm-0.6.0-py2.5.egg-info

* Sun Nov 25 2007 Mohd Izhar Firdaus Ismail <mohd.izhar.firdaus@gmail.com> 0.6.0-4
- changed requires to allow flexible upgrade of compizconfig-python and libcompizconfig 

* Tue Aug 21 2007 Mohd Izhar Firdaus Ismail <mohd.izhar.firdaus@gmail.com> 0.6.0-3
- fixed issue with remove shebangs patch

* Tue Aug 21 2007 Mohd Izhar Firdaus Ismail <mohd.izhar.firdaus@gmail.com> 0.6.0-1
- official upstream 0.6.0 tarball release
- owns directory
- removed shebangs from ccm
- fixed desktop entry

* Sun Aug 19 2007 Mohd Izhar Firdaus Ismail <mohd.izhar.firdaus@gmail.com> 0.6.0-0.3.20071018gita7fa7d
- removed unneeded BuildReqs

* Sat Aug 18 2007 Mohd Izhar Firdaus Ismail <mohd.izhar.firdaus@gmail.com> 0.6.0-0.2.20071018gita7fa7d
- 0.6.0 branch

* Sat Jun 30 2007 Mohd Izhar Firdaus Ismail <mohd.izhar.firdaus@gmail.com> 0.0.1-0.3.20070630git
- 20070630git
- Added BuildReq gettext
- Added Require compizconfig-python
- added require pygtk2

* Sun Jun 24 2007 Mohd Izhar Firdaus Ismail <mohd.izhar.firdaus@gmail.com> 0.0.1-20070622git
- Initial specfile, borrowing descriptions from Trevino ubuntu debs