diff --git a/bleachbit.spec b/bleachbit.spec index 49aeff6..5a94606 100644 --- a/bleachbit.spec +++ b/bleachbit.spec @@ -30,27 +30,26 @@ history list of many common programs. %prep %setup -q -#do not install in /usr/local -sed -i 's/\/local//' Makefile +# Do not install in `/usr/local/`. +sed 's|/local||' --in-place ./Makefile -# fix appdata location -sed -i 's/$(datadir)\/appdata/$(datadir)\/metainfo/g' Makefile +# Fix appdata location. +sed 's|$(datadir)/appdata|$(datadir)/metainfo|g' --in-place ./Makefile -# Disable update notifications -sed -i -e '\@online_update_notification_enabled@s/^.*$/online_update_notification_enabled = False/g' \ -bleachbit/Common.py && egrep online_update_notification_enabled[[:space:]]=[[:space:]]False bleachbit/Common.py +# Disable update notifications, since package will be updated by DNF or Packagekit. +sed 's/online_update_notification_enabled = True/online_update_notification_enabled = False/g' --in-place ./bleachbit/__init__.py # Drop deprecated line in desktop file. -sed -i '/Encoding/d' bleachbit.desktop +sed '/Encoding/d' --in-place ./bleachbit.desktop # Drop env shebangs as files in %%_datadir usually don't need this. -find bleachbit/ -type f -name '*.py' -exec sed -i '1{\@^#!/usr/bin/env python@d}' {} + +find ./bleachbit/ -type f -name '*.py' -exec sed '1{\@^#!/usr/bin/env python@d}' --in-place '{}' + -# fix makefile to explicitly use python2 -sed -i 's/python/python2/g' Makefile +# Fix Makefile to explicitly use python2. +sed 's/python/python2/g' --in-place ./Makefile %build -make -C po local +make --directory ./po/ local %{__python2} setup.py build %install @@ -61,8 +60,8 @@ make -C po local %find_lang %{name} %check -#make -C cleaners tests -#{__python2} tests/TestUnix.py +#make --directory ./cleaners/ tests +#%%{__python2} tests/TestUnix.py desktop-file-validate %{buildroot}%{_datadir}/applications/bleachbit.desktop appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml