Пакет seahorse: Specfile

%define _unpackaged_files_terminate_build 1
%define ver_major 2.26

%def_disable debug
%def_enable ldap
%def_enable hkp
%def_enable gnome_keyring
%def_enable pkcs11
%def_enable dbus
%def_enable libnotify
%def_enable ssh

%if_enabled hkp
%def_enable sharing
%endif

Name: seahorse
Version: %ver_major.1
Release: alt3

Summary: Seahorse is a GNOME frontend to GnuPG
License: %gpllgpl2plus
Group: Graphical desktop/GNOME
Url: http://www.gnome.org/projects/%name/
Packager: GNOME Maintainers Team <gnome@packages.altlinux.org>

Source: %gnome_ftp/%name/%ver_major/%name-%version.tar.bz2

Requires: gnupg2-gpg
Requires: lib%name = %version-%release
%{?_enable_ssh:Requires: openssh-clients}
%{?_enable_sharing:Requires: avahi-daemon}

BuildPreReq: rpm-build-gnome

# From configure.in
BuildPreReq: intltool >= 0.35
BuildPreReq: vala >= 0.3.5 libGConf-devel libgio-devel
BuildPreReq: gnome-doc-utils-xslt >= 0.3.2
BuildPreReq: libgtk+2-devel >= 2.10.0
BuildPreReq: libglade-devel
BuildPreReq: gnupg2-gpg
BuildPreReq: libgpgme-devel >= 1.0.0
BuildPreReq: libgpg-error-devel
%{?_enable_ldap:BuildPreReq: libldap-devel}
%{?_enable_hkp:BuildPreReq: libsoup-devel >= 2.4}
%{?_enable_gnome_keyring:BuildPreReq: libgnome-keyring-devel >= 2.25.4}
%{?_enable_pkcs11:BuildPreReq: libgnome-keyring-devel >= 2.25.4}
%{?_enable_sharing:BuildPreReq: libavahi-glib-devel >= 0.6 libavahi-devel }
%{?_enable_dbus:BuildPreReq: libdbus-glib-devel >= 0.35}
%{?_enable_libnotify:BuildPreReq: libnotify-devel >= 0.3}
%{?_enable_ssh:BuildPreReq: openssh openssh-clients}

BuildRequires: libSM-devel
BuildRequires: gtk-doc docbook-dtds gcc-c++ perl-XML-Parser
BuildRequires: rpm-build-licenses
BuildRequires: desktop-file-utils

%description
Seahorse is a graphical interface for managing and using encryption keys. 
Currently it supports PGP keys using for Gnu Privacy Guard. Its goal is to 
provide an easy to use Key Management Tool, along with an easy to use interface for encryption operations.

%package -n lib%name
Summary: Seahorse libraries
Group: Graphical desktop/GNOME

%description -n lib%name
Seahorse is a graphical interface for managing and using encryption
keys. This package contains Seahorse libraries. Note: to use Seahorse,
you should install seahorse package and/or Seahorse applet.

%package -n lib%name-devel
Summary: Seahorse development files
Group: Development/GNOME and GTK+
Requires: lib%name = %version-%release

%description -n lib%name-devel
This package contains files necessary to develop applications that use or
extend Seahorse encryption keys manager.

%package -n lib%name-devel-doc
Summary: Seahorse development files
Group: Development/GNOME and GTK+
BuildArch: noarch
Conflicts: lib%name < %version

%description -n lib%name-devel-doc
This package contains files necessary to develop applications that use or
extend Seahorse encryption keys manager.

%prep
%setup -q
rm -f m4/libtool.m4 m4/lt*.m4

%build
%autoreconf
export CFLAGS="$CFLAGS `pkg-config --cflags dbus-glib-1`"
export LDFLAGS="$LDFLAGS `pkg-config --libs dbus-glib-1`"
GNUPG=/usr/bin/gpg2; export GNUPG
%configure \
	%{subst_enable ldap} \
	%{subst_enable hkp} \
	%{subst_enable sharing} \
	%{subst_enable libnotify} \
	%{subst_enable ssh} \
	%{subst_enable debug} \
	%{subst_enable pkcs11} \
	--enable-tests \
	--disable-static \
	--disable-scrollkeeper \
	--disable-schemas-install \
	--disable-update-mime-database

%make_build

%install
%make_install install DESTDIR=%buildroot

%find_lang %name --with-gnome

%post
%gconf2_install %name

%preun
if [ $1 = 0 ]; then
%gconf2_uninstall %name
fi

%files -n lib%name 
%_libdir/libcryptui.so.*
#%_bindir/cryptui-test-keyset
#%_bindir/cryptui-test-ui
%dir %_libdir/%name
%_libdir/%name/%name-ssh-askpass
%_libdir/%name/xloadimage

%files -f %name.lang
%_bindir/%name
%attr(711,root,root) %_bindir/%name-daemon
%dir %_datadir/%name
%_datadir/%name/*
%_datadir/dbus-1/services/*.service
%_iconsdir/hicolor/*/apps/%{name}*.*
%_pixmapsdir/%{name}*
%_desktopdir/*.desktop
%_man1dir/*
%_sysconfdir/xdg/autostart/seahorse-daemon.desktop
%config %gconf_schemasdir/seahorse.schemas
%doc AUTHORS ChangeLog COPYING COPYING-DOCS COPYING-LIBCRYPTUI NEWS README THANKS TODO HACKING

%files -n lib%name-devel
%_includedir/*
%_libdir/*.so
%_pkgconfigdir/*.pc

%files -n lib%name-devel-doc
%_datadir/gtk-doc/html/*

%changelog
* Wed May 06 2009 Yuri N. Sedunov <aris@altlinux.org> 2.26.1-alt3
- requires gnupg2-gpg not gnupg2

* Thu Apr 30 2009 Yuri N. Sedunov <aris@altlinux.org> 2.26.1-alt2
- use gnupg2
- requires avahi-daemon if sharing enabled

* Sun Apr 12 2009 Yuri N. Sedunov <aris@altlinux.org> 2.26.1-alt1
- 2.26.1

* Mon Mar 16 2009 Yuri N. Sedunov <aris@altlinux.org> 2.26.0-alt1
- 2.26.0

* Tue Mar 10 2009 Yuri N. Sedunov <aris@altlinux.org> 2.25.92-alt1
- 2.25.92
- removed obsolete %%post{,un} scripts
- updated buildreqs
- enabled ldap support
- new libseahorse-devel-doc noarch subpackage

* Tue Sep 30 2008 Alexey Shabalin <shaba@altlinux.ru> 2.24.0-alt1
- 2.24.0

* Tue Jul 01 2008 Alexey Shabalin <shaba@altlinux.ru> 2.22.3-alt1
- new version (2.22.3)

* Mon Jun 02 2008 Alexey Shabalin <shaba@altlinux.ru> 2.22.2-alt1
- new version (2.22.2)
- cleanup configure options

* Thu Apr 10 2008 Igor Vlasenko <viy@altlinux.ru> 2.22.1-alt1.qa1
- NMU (by repocop): the following fixes applied:
 * desktop-mime-entry for seahorse
 * update_menus for seahorse

* Tue Apr 08 2008 Alexey Shabalin <shaba@altlinux.ru> 2.22.1-alt1
- new version (2.22.1)

* Sun Mar 23 2008 Alexey Shabalin <shaba@altlinux.ru> 2.22.0-alt1.1
- build for Sisyphus

* Tue Mar 18 2008 Alexey Shabalin <shaba@altlinux.ru> 2.22.0-alt1
- new version (2.22.0)

* Mon Feb 04 2008 Alexey Shabalin <shaba@altlinux.ru> 2.20.3-alt1
- new version (2.20.3)
- add Packager
- update License
- fix files (for find_lang)

* Mon Dec 03 2007 Alexey Shabalin <shaba@altlinux.ru> 2.20.1-alt1
- new version (2.20.1)
- add package epiphany-extension-seahorse (build with firefox gecko), but disabled build default
- move found %%name.lang to main package

* Fri Jul 27 2007 Alexey Rusakov <ktirf@altlinux.org> 1.0.1-alt2
- added libSM-devel to buildreqs
- use macros from rpm-build-gnome

* Mon Apr 30 2007 Alexey Rusakov <ktirf@altlinux.org> 1.0.1-alt1
- new version (1.0.1)
- updated dependencies

* Wed Mar 14 2007 Alexey Rusakov <ktirf@altlinux.org> 1.0-alt1
- new version (1.0)
- enabled cryptui tests building

* Thu Mar 01 2007 Alexey Rusakov <ktirf@altlinux.org> 0.9.92-alt1
- new version 0.9.92 (with rpmrb script)

* Sat Feb 17 2007 Alexey Rusakov <ktirf@altlinux.org> 0.9.91-alt1
- new version 0.9.91 (with rpmrb script)

* Sat Jan 27 2007 Alexey Rusakov <ktirf@altlinux.org> 0.9.10-alt4
- Another replacement of %%_libexecdir with %%_libdir.

* Fri Jan 26 2007 Alexey Rusakov <ktirf@altlinux.org> 0.9.10-alt3
- %%_libdir instead of %%_libexecdir in libseahorse, to fix building on x86_64.

* Sun Jan 07 2007 Alexey Rusakov <ktirf@altlinux.org> 0.9.10-alt2
- added def_enable debug, enabled by default.
- minor update of buildreqs.
- fixed insufficient buildreqs and reqs (openssh-clients was missed out)

* Fri Jan 05 2007 Alexey Rusakov <ktirf@altlinux.org> 0.9.10-alt1
- new version (0.9.10)

* Tue Jan 02 2007 Alexey Rusakov <ktirf@altlinux.org> 0.9.9-alt2
- no more manual setup of seahorse-agent necessary, the appropriate script is
  installed to /etc/X11/profile.d/ directory.
- seahorse-agent replaces gpg-agent functionality, a warning about this is put
  into %%post script.

* Sun Dec 24 2006 Alexey Rusakov <ktirf@altlinux.org> 0.9.9-alt1
- new version (0.9.9)
- removed a patch that fixes linking, as it is not correct anymore (wonder why
  it still applies)
- files list updated
- enabled _unpackaged_files_terminate_build macro

* Thu Apr 20 2006 Alexey Rusakov <ktirf@altlinux.ru> 0.9.1-alt1
- new version

* Mon Apr 03 2006 Alexey Rusakov <ktirf@altlinux.ru> 0.9.0-alt1
- new version (0.9.0)
- removed Debian menu support
- updated dependencies
- introduced many switches, to control various Seahorse features.
- for backporters: older gedit is supported again.

* Tue Jan 17 2006 Alexey Rusakov <ktirf@altlinux.ru> 0.8-alt1
- new version

* Tue Oct 25 2005 Sir Raorn <raorn@altlinux.ru> 0.7.9-alt2
- Fix gedit requirements

* Sat Aug 27 2005 Sir Raorn <raorn@altlinux.ru> 0.7.9-alt1
- [0.7.9]

* Mon May 23 2005 Sir Raorn <raorn@altlinux.ru> 0.7.8-alt1
- [0.7.8]

* Tue Oct 19 2004 ALT QA Team Robot <qa-robot@altlinux.org> 0.6.3-alt1.1
- Updated build dependencies (libgpgme-compat-devel).

* Wed May 12 2004 Sir Raorn <raorn@altlinux.ru> 0.6.3-alt1
- [0.6.3]

* Tue Jun 12 2001 AEN <aen@logic.ru> 0.5.0-alt1
- 0.5.0
- russian po-file fixed

* Tue Jan 30 2001 Dmitry V. Levin <ldv@fandra.org> 0.4.9-ipl1mdk
- RE adaptions.

* Mon Jan 29 2001 Lenny Cartier <lenny@mandrakesoft.com> 0.4.9-1mdk
- updated to 0.4.9

* Fri Sep 15 2000 Lenny Cartier <lenny@mandrakesoft.com> 0.3.6-2mdk
- macros
- bm
- menu

* Mon Apr 03 2000 Lenny Cartier <lenny@mandrakesoft.com> 0.3.6-1mdk
- fix group
- used srpm provided by Vincent Danen <vdanen@linux-mandrake.com>

* Sun Mar 19 2000 Vincent Danen <vdanen@linux-mandrake.com>
- 0.3.6
- specfile changes for spec-helper

* Fri Feb 11 2000 Vincent Danen <vdanen@linux-mandrake.com>
- initial specfile
- bzip sources
- bzip manpages