# Copyright 2014-2020 Chris Caron # # This is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # This file is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # more details. # # You should have received a copy of the GNU General Public License along # with this file. If not, see http://www.gnu.org/licenses/. ############################################################################### Packager: Chris Caron Summary: Provides NZBGet Scheduler for tidying up a media library of orphan files. Group: Administration/Resources Name: nzbget-script-tidyit Version: 0.9.0 License: GPLv3 Release: 1%{?dist} Source: https://github.com/caronc/nzbget-tidyit/archive/v%{version}.tar.gz URL: http://nzbget.net/forum/viewtopic.php?f=8&t=1975 Provides: nzbget-script-tidyit BuildArch: noarch Requires: nzbget %if 0%{?rhel} && 0%{?rhel} <= 7 Requires: python-nzbget %else Requires: python%{python3_pkgversion}-nzbget %endif %description TidyIt integrates itself with NZBGet's scheduling and is used to preform basic house cleaning on a media library. TidyIt removes orphaned meta information, empty directories and unused content. It's the perfect OCD tool for those who want to eliminate any unnessisary bloat on their filesystem and media library. %prep %setup -q -n nzbget-tidyit-%{version} # Tidy %if 0%{?rhel} && 0%{?rhel} <= 7 sed -i -e 's|#!\(/usr\)\?/bin/python[23]\?|#!/usr/bin/python2|g' TidyIt.py sed -i -e 's|#!\(/usr\)\?/bin/env python[23]\?|#!/usr/bin/python2|g' TidyIt.py %else sed -i -e 's|#!\(/usr\)\?/bin/python[23]\?|#!/usr/bin/python3|g' TidyIt.py sed -i -e 's|#!\(/usr\)\?/bin/env python[23]\?|#!/usr/bin/python3|g' TidyIt.py %endif %install %{__rm} -rf %{buildroot} %{__install} -Dp -m 0755 TidyIt.py \ %{buildroot}%{_datadir}/nzbget/scripts/TidyIt.py %files %defattr(-,root,root) %doc LICENSE README.md %{_datadir}/nzbget/scripts/TidyIt.py* %changelog * Tue Sep 8 2020 Chris Caron 0.9.0-1 - updated to v0.9.0 * Fri Sep 25 2015 Chris Caron 0.4.0-1 - updated to v0.4.0 * Sat May 30 2015 Chris Caron 0.0.3-1 - initial release