%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?pyver: %global pyver %(%{__python} -c "import sys ; print sys.version[:3]")} %define rev r199 Summary: Command line interface to the freedesktop.org trashcan Name: trash-cli Version: 0.11.0 Release: 1.%{rev}%{?dist} License: GPLv2 Group: System Environment/Base URL : http://code.google.com/p/trash-cli/ Source0: http://pypi.python.org/packages/source/t/trash-cli/trash-cli-%{version}.dev-%{rev}.tar.gz BuildArch: noarch BuildRequires: python-setuptools-devel dos2unix BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description trash-cli provides the following commands to manage the trash: o trash-put trashes files and directories. o trash-empty empty the trashcan(s). o trash-list list trashed file. o trash-restore restore a trashed file. %prep %setup -q -n %{name}-%{version}.dev-%{rev} for f in HISTORY.txt new-user-interface/*.txt ; do dos2unix -k $f done for f in filesystem.py cli/restore.py cli/util.py ; do dos2unix -k trashcli/$f done for f in cli/restore.py cli/util.py filesystem.py trash.py ; do %{__sed} -i -e '1d' trashcli/$f done %build %{__python} setup.py build %install %{__rm} -rf %{buildroot} %{__python} setup.py install -O1 --skip-build --root %{buildroot} %{__install} -d $(dirname %{buildroot}%{_mandir}) %{__mv} %{buildroot}/usr/man %{buildroot}%{_mandir} %clean %{__rm} -rf %{buildroot} #check #can't run test in a simple manner %files %defattr(-, root, root, -) %doc AUTHORS COPYING docs HISTORY.txt new-user-interface README.txt TEST.txt THANKS %{_bindir}/trash-* %{_bindir}/restore-trash %{_bindir}/volume-of %{python_sitelib}/trashcli %{python_sitelib}/trash_cli-*-py%{pyver}.egg-info %{_mandir}/man1/trash-*.1* %changelog * Sat Mar 14 2009 Terje Rosten - 0.11.0-1.r199 - initial build