# Basic Information
Name:		seahorse-plugins
Version:	2.30.1
Release:	4%{?_dist_release}
License:	GPL-2
Group:		Applications/Accessories
Source0:	http://ftp.gnome.org/pub/GNOME/sources/%{name}/2.30/%{name}-%{version}.tar.bz2
Patch1:		seahorse-plugins-2.30.1-git20110607.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	yasumichi

Summary:	plugins and utilities for encryption in GNOME
Summary(ja):	GNOMEにおける暗号化のためのプラグインとユーティリティ

# Dependency
Requires:	GConf2
Requires:	glib2
Requires:	gtk3 >= 3.0.0
Requires:	gnupg
Requires:	gpgme
Requires:	libgnome-keyring
Requires:	dbus-glib
Requires:	libnotify
Requires:	evolution-data-server
Requires:	seahorse
Requires(post,postun):	shared-mime-info

BuildRequires:	gnome-doc-utils
BuildRequires:	pkgconfig
BuildRequires:	GConf2-devel
BuildRequires:	glib2-devel
BuildRequires:	gtk3-devel >= 3.0.0
BuildRequires:	gnupg
BuildRequires:	gpgme-devel
BuildRequires:	libgnome-keyring-devel
BuildRequires:	dbus-glib-devel
BuildRequires:	libcryptui-devel
BuildRequires:	libnotify-devel
BuildRequires:	evolution-data-server

Provides: %{name}-gedit < 2.30.1-3
Obsoletes: %{name}-gedit < 2.30.1-3

%description
Seahorse is integrated into the GNOME Desktop Environment and allows users to 
perform operations from their regular applications, like nautilus .
The effective use of this package, please install the following packages.

* seahorse-plugins-applet
* seahorse-plugins-nautilus

%description -l ja
SeahorseがGNOMEデスクトップ環境に統合され、Nautilusのようなユーザが
よく使うアプリケーションから操作を実行することができます。
このパッケージの有効利用には、以下のパッケージをインストールしてください。

* seahorse-plugins-applet
* seahorse-plugins-nautilus

#
# sub package: applet
# 
%package applet
Summary:	Applet for GnomePanel  to encrypt/decrypt/sign text easily
Summary(ja):	テキストを簡単に暗号化/復号化/署名するためのGNOMEパネルアプレット
Group:		Applications/Accessories
Requires:       %{name} = %{version}-%{release}
Requires:	libbonoboui
Requires:	gnome-panel-libs
BuildRequires:	libbonoboui-devel
BuildRequires:	gnome-panel-devel

%description applet
Encryption Applet performs the various encryption operations using standard
OpenPGP methods. You will need to have already created an OpenPGP key with
Encryption Key Manager and imported the public keys of those you want to
encrypt to or verify signatures of.

%description applet -l ja
暗号化アプレットは、標準的なOpenPGP手法を使って様々な暗号化の操作を行えます。
あなたは暗号鍵マネージャによってOpenPGP鍵を既に作成し、暗号化や署名の検証を
行いたい相手の公開鍵をインポートしている必要があります。

#
# sub package: gedit
#
#%package gedit
#Summary:	Adds functionality to Gedit to encrypt/decrypt/sign text
#Summary:	geditにテキストを暗号化/復号化/署名するための機能を追加します。
#Group:		Applications/Accessories
#Requires:       %{name} = %{version}-%{release}
#Requires:	gedit
#BuildRequires:	gedit-devel

#%description gedit
#The Text Encryption plugin adds functionality to Gedit, the GNOME text
#editor, to encrypt/decrypt/sign text

#%description gedit -l ja
#テキスト暗号化プラグインは、GNOMEテキストエディタGeditにテキストを
#暗号化/復号化/署名するための機能を追加します。

#
# sub package: nautilus
#
%package nautilus
Summary:	Contains code for calling seahorse-tool from Nautilus
Summary(ja):	Nautilusから、seahorse-toolを呼ぶためのコードが含まれています。
Group:		Applications/Accessories
Requires:       %{name} = %{version}-%{release}
Requires:	nautilus
BuildRequires:	nautilus-devel

%description nautilus
Encryption and Keyrings integrates with Nautilus.  You can encrypt, decrypt,
sign and verify files as well as import public keys from the file manager
window without launching Encryption and Keyrings.

%description nautilus -l ja
パスワードと暗号化が、Nautilusに統合されます。パスワードと暗号化を起動する
ことなく、ファイルマネージャからファイルの暗号化、復号化、署名及び公開鍵の
インポートを行うことができます。

#
# script section
#
%prep
%setup -q
%patch1 -p1 -b .git20110607

%build
libtoolize --force --copy
autoreconf 
%configure \
	--with-gtk=3.0 \
	--disable-gedit \
	--disable-update-mime-database \
	--disable-epiphany \
	--disable-applet
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf ${RPM_BUILD_ROOT}

export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
%{__make} install DESTDIR=${RPM_BUILD_ROOT}
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL

%find_lang %{name}

# treat not install file
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';'

%clean
%{__rm} -rf ${RPM_BUILD_ROOT}

%post
/sbin/ldconfig
%{_bindir}/scrollkeeper-update -q ||:
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule \
    %{_sysconfdir}/gconf/schemas/seahorse-plugins.schemas > /dev/null ||:
update-mime-database %{_datadir}/mime/

#%post gedit
#export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
#gconftool-2 --makefile-install-rule \
#    %{_sysconfdir}/gconf/schemas/seahorse-gedit.schemas > /dev/null ||:

%pre
if [ "$1" -gt 1 ]; then
  export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  gconftool-2 --makefile-uninstall-rule \
      %{_sysconfdir}/gconf/schemas/seahorse-plugins.schemas > /dev/null ||:
fi

#%pre gedit
#if [ "$1" -gt 1 ]; then
#  export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
#  gconftool-2 --makefile-uninstall-rule \
#      %{_sysconfdir}/gconf/schemas/seahorse-gedit.schemas > /dev/null ||:
#fi

%preun
if [ "$1" -eq 0 ]; then
  export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
  gconftool-2 --makefile-uninstall-rule \
      %{_sysconfdir}/gconf/schemas/seahorse-plugins.schemas > /dev/null ||:
fi

#%preun gedit
#if [ "$1" -eq 0 ]; then
#  export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
#  gconftool-2 --makefile-uninstall-rule \
#      %{_sysconfdir}/gconf/schemas/seahorse-gedit.schemas > /dev/null ||:
#fi

%postun
/sbin/ldconfig
%{_bindir}/scrollkeeper-update -q ||:
update-mime-database %{_datadir}/mime/


%files -f %{name}.lang
%defattr(-,root,root)
%doc COPYING ChangeLog NEWS README
%{_sysconfdir}/gconf/schemas/seahorse-plugins.schemas
%{_bindir}/seahorse-preferences
%{_bindir}/seahorse-tool
%{_datadir}/applications/seahorse-pgp-encrypted.desktop
%{_datadir}/applications/seahorse-pgp-keys.desktop
%{_datadir}/applications/seahorse-pgp-preferences.desktop
%{_datadir}/applications/seahorse-pgp-signature.desktop
%{_datadir}/gnome/help/seahorse-plugins/
%{_datadir}/man/man1/seahorse-tool.1.gz
%{_datadir}/mime/packages/seahorse.xml
%{_datadir}/omf/seahorse-plugins/
%{_datadir}/pixmaps/seahorse-plugins/
%{_datadir}/seahorse-plugins/ui/

%exclude %{_datadir}/pixmaps/seahorse-plugins/22x22/seahorse-applet-*.png
%exclude %{_datadir}/pixmaps/seahorse-plugins/48x48/seahorse-applet*.png
%exclude %{_datadir}/pixmaps/seahorse-plugins/scalable/seahorse-applet*.svg

%files applet
%defattr(-, root, root)
#%{_libdir}/bonobo/servers/GNOME_SeahorseApplet.server
#%{_libdir}/seahorse/seahorse-applet
#%{_datadir}/gnome-2.0/ui/GNOME_SeahorseApplet.xml
#%{_datadir}/gnome/help/seahorse-applet/
%{_datadir}/icons/hicolor/48x48/apps/seahorse-applet.png
%{_datadir}/icons/hicolor/scalable/apps/seahorse-applet.svg
#%{_datadir}/omf/seahorse-applet/
%{_datadir}/pixmaps/seahorse-applet.svg
%{_datadir}/pixmaps/seahorse-plugins/22x22/seahorse-applet-*.png
%{_datadir}/pixmaps/seahorse-plugins/48x48/seahorse-applet*.png
%{_datadir}/pixmaps/seahorse-plugins/scalable/seahorse-applet*.svg
#%{_datadir}/seahorse-plugins/ui/seahorse-applet-preferences.xml

#%files gedit
#%defattr(-, root, root)
#%{_sysconfdir}/gconf/schemas/seahorse-gedit.schemas
#%{_libdir}/gedit-2/plugins/libseahorse-pgp.so
#%{_libdir}/gedit-2/plugins/seahorse-pgp.gedit-plugin

%files nautilus
%defattr(-, root, root)
%{_libdir}/nautilus/extensions-3.0/libnautilus-seahorse.so

%changelog
* Mon Aug 22 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.1-4
- rebuild package

* Wed Aug 17 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.30.1-3
- delete Patch0
- add Patch1 (seahorse-plugins-2.30.1-git20110607.patch)
- change BuildRequires: gtk3-devel instead of gtk2-devel
- change BuildRequires: libcryptui-devel instead of seahorse-devel
- remove -gedit sub package

* Sun Apr 17 2011 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.30.1-2
- rebuild with rpm-4.8.1
- update R,BR
- add Patch0 from https://bugzilla.gnome.org/show_bug.cgi?id=600804

* Fri Jun 18 2010 Yasumichi Akahoshi <yasumichi@vinelinux.org> 2.30.1-1
- initial build for Vine Linux

