File enigmail.spec of Package enigmail

#
# spec file for package enigmail
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#               2014 Wolfgang Rosenauer <wr@rosenauer.org>
#
# 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:           enigmail
Version:        1.7.2
Release:        0
Summary:        OpenPGP addon for Thunderbird and SeaMonkey
License:        MPL-1.1 or GPL-2.0+
Group:          Productivity/Networking/Email/Clients
Url:            http://www.enigmail.net/
Source0:        enigmail-%{version}.tar.gz
Source1:        enigmail-%{version}.tar.gz.asc
Source2:        enigmail.keyring
BuildRequires:  perl
BuildRequires:  python
BuildRequires:  unzip
BuildRequires:  zip
%if %suse_version > 1220
BuildRequires:  gpg-offline
%endif
Requires:       /usr/bin/gpg
Requires:       pinentry-gui
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This package contains the Enigmail OpenPGP Addon for Thunderbird and SeaMonkey.

%prep
%if 0%{?gpg_verify:1}
%gpg_verify %{S:1}
%endif
%setup -n enigmail -q

%build
./configure CFLAGS="%{optflags}"
# parallel build not supported
make

%install
# Thunderbird location
_enig_dir=$RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/\{3550f703-e582-4d05-9a08-453d09bdfdc6\}/\{847b3a00-7ab1-11d4-8f02-006008948af5\}
mkdir -p $_enig_dir
(cd $_enig_dir; unzip $RPM_BUILD_DIR/enigmail/build/enigmail-*.xpi)
#rm $_enig_dir/*.xpi
# SeaMonkey location
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/\{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a\}
(cd $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/\{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a\}; \
  ln -s ../\{3550f703-e582-4d05-9a08-453d09bdfdc6\}/\{847b3a00-7ab1-11d4-8f02-006008948af5\} )

%files
%defattr(-,root,root)
%{_libdir}/mozilla/

%changelog
openSUSE Build Service is sponsored by