Blob Blame History Raw
Name:           ptrash
Version:        1.0.1
Release:        1%{?dist}
Summary:        Move file(s) to ~/.trash directory

Group:          Applications/System
License:        GPLv2+
URL:            http://pjp.dgplug.org/tools/
Source0:        http://pjp.dgplug.org/tools/%{name}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires(post): info      
Requires(preun): info

%description
Ptrash moves the named file(s) to the ~/.trash directory. Trash is located
under the home directory of a user. It is a simple console based utility,
I wrote after deleting some files, which I couldn't retrieve back.
Ptrash can also restore file(s) back to there original location. It has really
proved very handy to me.


%prep
%setup -q


%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir


%post
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/%{name}.info || :


%preun
if [ $1 = 0 ]; then
    /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README COPYING
%_bindir/ptrash
%_infodir/*
%_mandir/man1/*


%changelog

* Wed Jul  1 2009 _pjp_ <pj.pandit@yahoo.co.in> - 1.0.1-1
- Fixed a small bug that showed up while trashing a file under ~/.trash
  directory.

* Tue Jul 22 2008 _pjp_ <pj.pandit@yahoo.co.in> - 1.0-1
- Initial RPM release of ptrash-1.0