[rpm] Remove cached files during uninstallation

This commit is contained in:
Slava Monich 2021-11-13 04:05:06 +02:00
parent fdca2d959e
commit 97eafa63a5

View file

@ -47,6 +47,12 @@ desktop-file-install --delete-original \
--dir %{buildroot}%{_datadir}/applications \ --dir %{buildroot}%{_datadir}/applications \
%{buildroot}%{_datadir}/applications/*.desktop %{buildroot}%{_datadir}/applications/*.desktop
%preun
if [ "$1" == 0 ] ; then \
getent passwd | grep -v '/nologin$' | \
while IFS=: read -r name pw uid gid comment home shell; \
do rm -fr "$home/.local/share/openrepos-books"; done; fi || :
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_bindir}/%{name} %{_bindir}/%{name}