[rpm] Remove cached files during uninstallation
This commit is contained in:
parent
fdca2d959e
commit
97eafa63a5
1 changed files with 6 additions and 0 deletions
|
@ -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}
|
||||||
|
|
Loading…
Reference in a new issue