Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

# $Id: gjots2.spec,v 1.15 2009/08/13 12:35:04 rvokal Exp $
#   Copyright (C) 2002-2005 Robert Hepple 
#
#   This program 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 2 of the
#   License, or (at your option) any later version.
#
#   This program 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 program; if not, write to the Free Software
#   Foundation, Inc., 59 Temple Place - Suite 330, Boston,
#   MA 02111-1307, USA.

Summary: A note jotter - Organise your ideas, notes, facts in a hierarchy
Name: gjots2
Version: 2.3.9
Release: 1%{?dist}
URL: http://bhepple.freeshell.org/gjots
Source: http://bhepple.freeshell.org/gjots/%{name}-%{version}.tgz
Patch0: gjots2-2.3.7-sitelib.patch
License: GPLv2+
Group: Applications/Productivity
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python desktop-file-utils

Requires: python >= 2.3, pygtk2 >= 2.4.0, gnome-python2-gnome
Requires: libglade2 >= 2.4, gnome-python2-gconf >= 2.6.0

%description

gjots2 ("gee-jots" or, if you prefer, "gyachts"!) is a way to marshall
and organise your text notes in a convenient, hierachical way. I use
it for all my notes on Unix, my personal bits and pieces, recipes and
even PINs and passwords (encrypted with ccrypt(1)).

You can also use it to "mind-map" your compositions - write down all
your thoughts and then start to organise them into a tree. By
manipulating the tree you can easily reorder your thoughts and
structure them appropriately.

%prep
%{!?python_sitelib: echo "We need python_sitelib!"; exit -1}

%setup -q
%patch0 -p1 -b .lib

iconv -f iso-8859-1 -t utf-8 -o man.tmp share/man/man1/docbook2gjots.1 && mv man.tmp share/man/man1/docbook2gjots.1
iconv -f iso-8859-1 -t utf-8 -o man.tmp share/man/man1/gjots2docbook.1 && mv man.tmp share/man/man1/gjots2docbook.1
iconv -f iso-8859-1 -t utf-8 -o man.tmp share/man/man1/gjots2html.1 && mv man.tmp share/man/man1/gjots2html.1

%build
%install

# typically:
#	buildroot=/var/tmp/root-gjots2-2.3.7
#	_datadir=/usr/share
#	_bindir=/usr/bin
#	_libdir=/usr/lib

%{__rm} -rf %{buildroot}
%{__install} -d -m0755  \
                        %{buildroot}%{_datadir}/applications \
                        %{buildroot}%{_datadir}/%{name} \
                        %{buildroot}%{_datadir}/pixmaps \
                        %{buildroot}%{_datadir}/man/man1 \
                        %{buildroot}%{python_sitelib}/%{name} \
                        %{buildroot}%{_bindir} \
						%{buildroot}%{_datadir}/locale/en_US/LC_MESSAGES \
						%{buildroot}%{_datadir}/locale/fr/LC_MESSAGES \
						%{buildroot}%{_datadir}/locale/no/LC_MESSAGES \
						%{buildroot}%{_datadir}/locale/nb/LC_MESSAGES \
						%{buildroot}%{_datadir}/locale/ru/LC_MESSAGES \
						%{buildroot}%{_datadir}/locale/cs/LC_MESSAGES

%{__install} -m0755 bin/gjots2 bin/gjots2docbook bin/gjots2html bin/gjots2emacs bin/gjots2html.py bin/docbook2gjots bin/gjots2lpr %{buildroot}%{_bindir}/
%{__install} -m0755 lib/*.py %{buildroot}%{python_sitelib}/%{name}/
%{__install} -m0644 gjots.glade3 %{buildroot}%{_datadir}/%{name}
%{__install} -m0644 gjots.png %{buildroot}%{_datadir}/%{name}
%{__install} -m0644 gjots.png %{buildroot}%{_datadir}/pixmaps/
%{__install} -m0644 gjots2-hide-all.png %{buildroot}%{_datadir}/%{name}
%{__install} -m0644 gjots2-merge-items.png %{buildroot}%{_datadir}/%{name}
%{__install} -m0644 gjots2-new-child.png %{buildroot}%{_datadir}/%{name}
%{__install} -m0644 gjots2-new-page.png %{buildroot}%{_datadir}/%{name}
%{__install} -m0644 gjots2-show-all.png %{buildroot}%{_datadir}/%{name}
%{__install} -m0644 gjots2-split-item.png %{buildroot}%{_datadir}/%{name}
desktop-file-install --vendor fedora                            \
        --dir ${RPM_BUILD_ROOT}%{_datadir}/applications         \
                --add-category X-Fedora                         \
                        %{name}.desktop

%{__install} -m0644 share/man/man1/gjots2.1 %{buildroot}%{_datadir}/man/man1
%{__install} -m0644 share/man/man1/gjots2html.1 %{buildroot}%{_datadir}/man/man1
%{__install} -m0644 share/man/man1/gjots2docbook.1 %{buildroot}%{_datadir}/man/man1
%{__install} -m0644 share/man/man1/docbook2gjots.1 %{buildroot}%{_datadir}/man/man1
%{__install} -m0644 po/en_US/LC_MESSAGES/gjots2.mo %{buildroot}%{_datadir}/locale/en_US/LC_MESSAGES
%{__install} -m0644 po/fr/LC_MESSAGES/gjots2.mo %{buildroot}%{_datadir}/locale/fr/LC_MESSAGES
%{__install} -m0644 po/no/LC_MESSAGES/gjots2.mo %{buildroot}%{_datadir}/locale/no/LC_MESSAGES
%{__install} -m0644 po/nb/LC_MESSAGES/gjots2.mo %{buildroot}%{_datadir}/locale/nb/LC_MESSAGES
%{__install} -m0644 po/ru/LC_MESSAGES/gjots2.mo %{buildroot}%{_datadir}/locale/ru/LC_MESSAGES
%{__install} -m0644 po/cs/LC_MESSAGES/gjots2.mo %{buildroot}%{_datadir}/locale/cs/LC_MESSAGES
%find_lang %{name}

%clean
%{__rm} -rf %{buildroot}


%files -f gjots2.lang
%defattr(-,root,root)
%doc AUTHORS INSTALL README COPYING ChangeLog gjots2.gjots gjots2.en_US.gjots gjots2.fr.gjots gjots2.nb.gjots gjots2.no.gjots gjots2.ru.gjots
%dir %{python_sitelib}/%{name}
%{python_sitelib}/%{name}/*.py
%{python_sitelib}/%{name}/*.pyc
%{python_sitelib}/%{name}/*.pyo
%{_bindir}/gjots2
%{_bindir}/gjots2html*
%{_bindir}/gjots2docbook
%{_bindir}/docbook2gjots
%{_bindir}/gjots2emacs
%{_bindir}/gjots2lpr
      
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%{_datadir}/pixmaps/gjots.png
%{_datadir}/applications/fedora-gjots2.desktop
%{_mandir}/man1/%{name}*
%{_mandir}/man1/docbook2gjots*

%changelog
* Thu Aug 13 2009 Radek Vokal <rvokal@redhat.com> 2.3.9-1
- upgrade to 2.3.9, adds Undo/Redo support

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.3.8-2
- Rebuild for Python 2.6

* Fri Nov  7 2008 Radek Vokál <rvokal@redhat.com> 2.3.8-1
- update to 2.3.8
- fix for gpg encrypted file handling  (#464476)
- fixed vulnerability when processing a gpg password  (#464510)

* Mon Sep  1 2008 Radek Vokál <rvokal@redhat.com> 2.3.7-1
- fix requires
- update to 2.3.7

* Fri Aug 29 2008 Michael Schwendt <mschwendt@fedoraproject.org> 2.3.4-10
- fix python_sitelib install
- BR python and readd pyc/pyo files

* Mon Jul 21 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.3.4-9
- fix license tag

* Tue May  6 2008 Radek Vokál <rvokal@redhat.com> 2.3.4-8
- rebuilt

* Mon Dec 11 2006 Radek Vokal <rvokal@redhat.com> 2.3.4-7
- rebuilt against new python

* Thu Sep  7 2006 Radek Vokal <rvokal@redhat.com> 2.3.4-6
- don't ghost pyo files (#205377)

* Tue May 02 2006 Radek Vokál <rvokal@redhat.com> 2.3.4-5
- new menu icon (#190221)

* Thu Mar 30 2006 Radek Vokál <rvokal@redhat.com> 2.3.4-4
- BuildRequires: desktop-file-utils

* Tue Mar 28 2006 Radek Vokál <rvokal@redhat.com> 2.3.4-3
- move libs to python_sitelib

* Fri Mar 17 2006 Radek Vokál <rvokal@redhat.com> 2.3.4-2
- convert man pages to UTF-8
- add file list

* Wed Mar 15 2006 Radek Vokál <rvokal@redhat.com> 2.3.4-1
- initial build for Fedora Core