File pybliographer.spec of Package pybliographer

#
# spec file for package pybliographer
#
# Copyright (c) 2011 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/
#

Name:           pybliographer
BuildRequires:  libtool
BuildRequires:  python-bibtex
BuildRequires:  python-devel
BuildRequires:  python-gnome-devel
BuildRequires:  scrollkeeper
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
Summary:        A Tool for Bibliographic Databases
License:        GPL-2.0+
Group:          Productivity/Publishing/Other
Version:        1.2.13
Release:        0
Source:         http://ftp1.sourceforge.net/sourceforge/pybliographer/pybliographer-%{version}.tar.gz
Patch0:         pybliographer-1.1.93-destdir.patch
Patch1:         pybliographer-1.2.1-check.patch
# PATCH-FIX-UPSTREAM pybliographer-pot.patch sbrabec@suse.cz -- Fixed pot file generation.
Patch2:         pybliographer-pot.patch
Requires:       python-xml python-orbit python-gnome
Requires:       python-bibtex >= 1.2.2
Requires:       python-gtk >= 2.4.0
PreReq:         filesystem /usr/bin/touch
# Package was renamed in 2000 from pybliog 1.0.5
Provides:       pybliog = 1.0.5
Obsoletes:      pybliog < 1.0.5
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            http://pybliographer.org/
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch:      noarch
%endif

%description
Pybliographer is a tool for managing bibliographic databases. It
currently supports the following formats:

* BibTeX (quite complete)

* Medline (read-only)

* Ovid files (from ovid.com)

* Refer and EndNote (read only)

* SGML DocBook (write only)

Pybliographer can be used for searching, editing, reformatting, etc. In
fact, it's a simple framework that provides easy to use python classes
and functions, and therefore can be extended to any usage (generating
HTML pages according to bibliographic searches, etc).

In addition to the scripting environment, a graphical GNOME interface
is available. It provides powerful editing capabilities, in addition to
a nice hierarchical search mechanism.

%prep
%setup -q
%patch2
translation-update-upstream
%patch0
%patch1 -p 1

%build
libtoolize --force
autoreconf -f -i
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{_prefix} --libdir=%{_libdir} --disable-depchecks
make

%install
make DESTDIR=$RPM_BUILD_ROOT install
# install -d $RPM_BUILD_ROOT%{_prefix}/share/gnome/apps/Applications
# install -m644 *.desktop \
#   $RPM_BUILD_ROOT%{_prefix}/share/gnome/apps/Applications
[ -d $RPM_BUILD_ROOT%{_prefix}/share/locale/no ] && {
  install -d $RPM_BUILD_ROOT%{_prefix}/share/locale/nb/LC_MESSAGES
  cp $RPM_BUILD_ROOT%{_prefix}/share/locale/no/LC_MESSAGES/*.mo \
    $RPM_BUILD_ROOT%{_prefix}/share/locale/nb/LC_MESSAGES
  rm -fr $RPM_BUILD_ROOT%{_prefix}/share/locale/no
}
mv $RPM_BUILD_ROOT/usr/share/locale/sr{@Latn,@latin}
rm -f $RPM_BUILD_ROOT/usr/share/applications/mimeinfo.cache
%suse_update_desktop_file  pybliographic Database
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-, root, root)
%{_bindir}/*
%{_datadir}/applications/*.desktop
%doc %{_datadir}/gnome/help/pybliographer
%dir %{_datadir}/mime-info
%{_datadir}/mime-info/pybliographic.*
%dir %{_datadir}/omf/pybliographer
%{_datadir}/omf/pybliographer/pybliographer-C.omf
%{_datadir}/pixmaps/pybliographic*
%{_datadir}/pybliographer

%changelog