File subdownloader.spec of Package subdownloader

Name:          subdownloader
License:       GPLv3 or Later
Group:         Productivity/Multimedia/Video/Editors and Convertors
Summary:       Tool for automatic download/upload subtitles of videofiles
Version:       2.0.9.3
Release:       1
URL:           http://subdownloader.net/
Source:        %{name}-%{version}.tar.bz2
Patch0:        %{name}-desktop.patch
BuildRoot:     %{_tmppath}/%{name}-%{version}-build
%py_requires
BuildRequires: python update-desktop-files
Requires:      python-qt4

%description
SubDownloader is a Free Open Source tool written in Python
for automatic download/upload subtitles for videofiles
(DIVX,MPEG,AVI,VOB,etc) and DVDs using fast hashing.

%prep
%setup -q -n %{name}
%patch0

%build
# compile scripts
python -mcompileall .

%install
mkdir -p $RPM_BUILD_ROOT%{py_sitedir}/%{name}
chmod +x run.py
cp -a *.py* FileManagement cli gui languages modules $RPM_BUILD_ROOT%{py_sitedir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_bindir}
ln -s %{py_sitedir}/%{name}/run.py $RPM_BUILD_ROOT%{_bindir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_datadir}
rm -f locale/*/LC_MESSAGES/*.po*
cp -a locale $RPM_BUILD_ROOT%{_datadir}/locale
install -D -m 0644 %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
install -D -m 0644 gui/images/%{name}.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png
%suse_update_desktop_file -i %{name}
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %name.lang
%defattr(-,root,root)
%doc ChangeLog README
%doc %{_mandir}/man1/*
%{_bindir}/%{name}
%dir %{py_sitedir}/%{name}
%{py_sitedir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png

%changelog
openSUSE Build Service is sponsored by