diff --git a/man-db.spec b/man-db.spec index 009260b..889e92a 100644 --- a/man-db.spec +++ b/man-db.spec @@ -75,18 +75,18 @@ install -D -p -m 0644 init/systemd/man-db.conf $RPM_BUILD_ROOT/usr/lib/tmpfiles. %find_lang %{name} %find_lang %{name}-gnulib -# clear the old cache -%post -%{__rm} -rf %{cache}/* - -%preun # stop and disable timer from previous builds +%pre rpm -q systemd > /dev/null if [ "$?" -eq 0 ]; then systemctl stop man-db.timer systemctl -q disable man-db.timer fi +# clear the old cache +%post +%{__rm} -rf %{cache}/* + %files -f %{name}.lang -f %{name}-gnulib.lang %{!?_licensedir:%global license %%doc} %license docs/COPYING