File gaupol.spec of Package gaupol
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: gaupol
Summary: GTK Subtittle editor
Version: 0.17.1
Release: %{release}
License: GPL
Group: Productivity/Multimedia/Video/Editors and Convertors
Url: http://home.gna.org/gaupol/
Source0: %{name}-%{version}.tar.bz2
# PATCH-FIX-OPENSUSE gaupol-0.17.1-desktop.patch prusnak@suse.cz -- add desktop category
Patch0: %{name}-0.17.1-desktop.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%{py_requires}
BuildRequires: python-devel
BuildRequires: python-gtk >= 2.16
BuildRequires: python-enchant >= 1.4.0
BuildRequires: python-xml
BuildRequires: intltool
BuildRequires: fdupes
BuildRequires: update-desktop-files
Requires: python-gtk >= 2.16
Requires: python-enchant >= 1.4.0
%description
Gaupol is an editor for text-based subtitle files. It supports multiple subtitle
file formats and provides means of correcting texts and timing subtitles to match
video. The user interface is designed with attention to batch processing of
multiple documents and convenience of translating.
Gaupol should run on all Unix-like (GNU/Linux, *BSD, etc.) operating systems and
on Windows. Technically it should be able to run on Mac as well, but that has
not been tested nor made convenient. Gaupol's user interface is based on the GTK+
toolkit and has been designed to best fit the GNOME desktop environment.
Authors:
--------
Osmo Salomaa <otsaloma@cc.hut.fi>
%prep
%setup -q
%patch0
%build
export CFLAGS="$RPM_OPT_FLAGS"
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES
rm -f $RPM_BUILD_ROOT%{_datadir}/gaupol/extensions/bookmarks/bookmarks.pyc
rm -f $RPM_BUILD_ROOT%{_datadir}/gaupol/extensions/side-pane/side-pane.pyc
%suse_update_desktop_file -i %{name}
# adapt to compressed manpage
sed -i 's|gaupol.1|gaupol.1.gz|;s|^.*usr/share/applications$||;s|^.*usr/share/icons$||' INSTALLED_FILES
%find_lang %{name}
grep -v '^.*usr/share/locale/' INSTALLED_FILES > FILES
cat %{name}.lang >> FILES
# create symlinks for man pages
%fdupes -s $RPM_BUILD_ROOT/%_mandir
# create hardlinks for the rest
%fdupes $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files -f FILES
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING CREDITS INSTALL NEWS PKG-INFO README TODO
%changelog