File gnome-subtitles.spec of Package gnome-subtitles
##
# spec file for package gnome-subtitles
#
# Copyright (c) Damien Carbery <daymobrew users.sourceforge.net>
# Henrique Malheiro <henrique.malheiro gmail.com>
# Pedro Castro <noup users.sourceforge.net>
#
#
%define mydist %(echo asdasdasd)
%define dist %(test -f /etc/redhat-release && echo .fc`rpm -qf --qf='%{VERSION}' /etc/redhat-release`)
%define OnSuSE %(test -f /etc/SuSE-release && echo 1 || echo 0)
%define OnFedora %(test -f /etc/redhat-release && echo 1 || echo 0)
Name: gnome-subtitles
Summary: Video subtitling for the GNOME desktop
Version: 0.7.2
Release: 1%dist
%if %OnSuSE
Distribution: SuSE 10.2
%endif
%if %OnFedora
Distribution: Fedora 8
%endif
Group: Applications/Multimedia
License: GPL
URL: http://gnome-subtitles.sf.net/
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
#Patch1: gnome-subtitles-01-pkgconfig.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Prereq: /sbin/ldconfig
BuildRequires: %mydist >= 1
Requires: mono-core >= 1.0
Requires: mono-locale-extras
Requires: gtk2 >= 2.8
Requires: gtk-sharp2 >= 2.8
Requires: gnome-sharp >= 2.8
Requires: gstreamer >= 0.10
Requires: gstreamer-plugins-base >= 0.10
Requires: gconf2
%if %OnSuSE
Requires: glade-sharp2 >= 2.8
Requires: gnome-sharp2 >= 2.8
%endif
BuildRequires: mono-devel >= 1.0
BuildRequires: gtk2-devel >= 2.8
BuildRequires: gtk-sharp2 >= 2.8
BuildRequires: gnome-doc-utils >= 0.3.2
%if 0%{?suse_version} > 1010
BuildRequires: gnome-doc-utils-devel >= 0.3.2
%endif
BuildRequires: perl-XML-Parser
BuildRequires: scrollkeeper >= 0.3.14
%if %OnSuSE
#BuildRequires: gconf-sharp2 >= 2.8
BuildRequires: gstreamer-devel >= 0.10
BuildRequires: gstreamer-plugins-base-devel >= 0.10
%endif
%if %OnFedora
BuildRequires: gstreamer-devel >= 0.10
BuildRequires: gstreamer-plugins-base-devel >= 0.10
%endif
%if %OnSuSE
BuildRequires: glade-sharp2 >= 2.8
BuildRequires: gnome-sharp2 >= 2.8
%endif
%description
Gnome Subtitles is a subtitle editor for the GNOME desktop. It supports the most
common subtitle formats and allows for subtitle editing, conversion and
synchronization.
%prep
%setup -q
#%patch1 -p1
%build
# Set _libdir otherwise it becomes /usr/lib64 on SuSE x64.
%define _libdir %{_prefix}/lib
%if %OnSuSE
./configure --prefix=%{_prefix} --bindir=%{_bindir} --libdir=%{_libdir} --datadir=%{_datadir} --sysconfdir=%{_sysconfdir} --disable-scrollkeeper
%else
#./configure --prefix=/usr --bindir=/usr/bin --libdir=/usr/lib #--datadir=/usr/share --sysconfdir=%{_sysconfdir} --disable-scrollkeeper
./configure --prefix=%{_prefix} --bindir=%{_bindir} --libdir=%{_libdir} \
--datadir=%{_datadir} --sysconfdir=%{_sysconfdir} --mandir=%{_mandir} \
--disable-scrollkeeper
%endif
make
%install
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
make DESTDIR=$RPM_BUILD_ROOT install
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
%clean
rm -rf $RPM_BUILD_ROOT
%post
%if %OnSuSE
export GC2=/opt/gnome/bin/gconftool-2
%else
export GC2=/usr/bin/gconftool-2
%endif
/sbin/ldconfig
export GCONF_CONFIG_SOURCE=`$GC2 --get-default-source`
$GC2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/gnome-subtitles.schemas > /dev/null
%postun
/sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/%{name}
%{_libdir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/man/man1/%{name}.1.gz
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/gnome/help/gnome-subtitles/
%{_datadir}/locale
%{_datadir}/omf/gnome-subtitles
%{_sysconfdir}/gconf/schemas/%{name}.schemas
#%doc README NEWS AUTHORS COPYING CREDITS TODO
%doc README NEWS AUTHORS COPYING CREDITS
%changelog
* Mon Nov 05 2007 - Damien Carbery <daymobrew users.sourceforge.net>
- Bump to 0.7. Add gstreamer010/-devel and gstreamer010-plugins-base/-devel
dependencies.
* Sun Apr 22 2007 - Damien Carbery <daymobrew users.sourceforge.net>
- Bump to 0.4 and add man page to %files.
* Tue Mar 27 2007 - Damien Carbery <daymobrew users.sourceforge.net>
- Bump to 0.3 and add GConf code to %install and %post.
* Thu Dec 14 2006 - Henrique Malheiro <henrique.malheiro@gmail.com>
- Updated the application icon extension from svg to png.
- Updated the build requirements for fedora core 6 to include gtk-sharp2-devel
and gnome-sharp-devel.
- Added the dist tag for using the same spec file for both distributions, fedora
core 5 and fedora core 6 and removed the distribution tag for fedora. This
will be useful for Fedora Core Extras.
* Wed Dec 13 2006 - Pedro Castro <noup users.sourceforge.net>
- Updated the website URL.
- Updated for release 0.1.
* Tue Oct 31 2006 - Damien Carbery <daymobrew users.sourceforge.net>
- Merged with the SUSE Linux spec file.
* Tue Oct 31 2006 - Henrique Malheiro <henrique.malheiro gmail.com>
- Adapted spec file for the new 0.0.3 version of gnome-subtitles.
- Modified build architecture to noarch. Configure macro had to be replaced by
a custom configure.
- Corrected the path to the executable in the files section.
- Added new doc files to the files section.
* Sun Oct 22 2006 - Henrique Malheiro <henrique.malheiro gmail.com>
- Initial version of the spec file, written for the 0.0.2 version of gnome-subtitles.