Name:		screenkey
Version:	0.2
Release:	3%{?_dist_release}
Summary:	A screen-cast tool to show your keys and based on key-mon project

Group:		Applications/System
License:	GPLv3+
URL:		https://launchpad.net/screenkey
Source0:	http://launchpad.net/screenkey/v%{version}/v%{version}/+download/screenkey-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch

BuildRequires:	python-devel
Requires:	python, python-xlib
# for glib.get_user_cache_dir()
Requires:	pygobject >= 2.18

Distribution:	Vine Linux
Vendor:		Project Vine
Packager:	iwaim

%description
A screen-cast tool to show your keys inspired by Screenflick and based on
the key-mon project.

%prep
%setup -q

%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p %{buildroot}%{_defaultdocdir}/%{name}-%{version}
find build/lib* -name '*.py' -exec sed -i "1{/^#!/d}" {} \; && \
%{__python} setup.py install -O1 --skip-build --root %{buildroot}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc
%{_bindir}/screenkey
%{_prefix}/share/applications/screenkey.desktop
#%{python_sitearch}/Screenkey
#%{python_sitearch}/*egg-info
%{python_sitelib}/Screenkey
%{python_sitelib}/*egg-info

%changelog
* Wed Feb 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.2-3
- rebuild with python-2.7.2

* Wed Oct 27 2010 Shu KONNO <owa@bg.wakwak.com> 0.2-2
- fixed python path (if x86_64)
- added BuildArch: noarch

* Wed Oct 20 2010 IWAI, Masaharu <iwai@alib.jp> 0.2-1
- build for Vine Linux: based upstream spec file

* Mon Jun 14 2010 Ivan Makfinsky <ivan.makfinsky@endosys.com> - 0.2-3
- Rebase, this is dev code.

* Fri Jun 11 2010 Ivan Makfinsky <ivan.makfinsky@endosys.com> - 0.1.1-7
- Updated spec file with proper macros.

* Thu Jun 10 2010 Ivan Makfinsky <ivan.makfinsky@endosys.com> - 0.1.1-6
- Added fork method so that it properly backgrounds itself.

* Wed Jun 09 2010 Ivan Makfinsky <ivan.makfinsky@endosys.com> - 0.1.1-5
- Corrected build deps. Added python-devel. Corrected python-sitearch in files.

* Tue Jun 08 2010 Ivan Makfinsky <ivan.makfinsky@endosys.com> - 0.1.1-1
- Initial Build