5575e8e3e9
- gpgme-include_functional.patch: include <functional> where needed, fix GCC7 build OBS-URL: https://build.opensuse.org/request/show/455178 OBS-URL: https://build.opensuse.org/package/show/Base:System/gpgme?expand=0&rev=80
321 lines
9.8 KiB
RPMSpec
321 lines
9.8 KiB
RPMSpec
#
|
|
# spec file for package gpgme
|
|
#
|
|
# Copyright (c) 2017 SUSE LINUX 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/
|
|
#
|
|
|
|
|
|
%define with_cpp 1
|
|
%define with_python2 1
|
|
%define with_python3 0
|
|
%define with_qt 0%{?suse_version} >= 1330
|
|
Name: gpgme
|
|
Version: 1.8.0
|
|
Release: 0
|
|
Summary: Programmatic library interface to GnuPG
|
|
License: LGPL-2.1+ and GPL-3.0+
|
|
Group: Productivity/Security
|
|
Url: http://www.gnupg.org/related_software/gpgme/
|
|
Source: ftp://ftp.gnupg.org/gcrypt/gpgme/%{name}-%{version}.tar.bz2
|
|
Source1: ftp://ftp.gnupg.org/gcrypt/gpgme/%{name}-%{version}.tar.bz2.sig
|
|
Source2: baselibs.conf
|
|
Source3: gpgme.keyring
|
|
# used to have a fixed timestamp
|
|
Source99: %{name}.changes
|
|
#PATCH-FIX-UPSTREAM: remove-a-forgotten-instance-of-libsuffix.diff - Fix cmake files (or it will break KDE software building)
|
|
Patch1: remove-a-forgotten-instance-of-libsuffix.diff
|
|
Patch2: gpgme-include_functional.patch
|
|
BuildRequires: gpg2 >= 2.0.10
|
|
BuildRequires: libassuan-devel >= 2.0.2
|
|
BuildRequires: libgpg-error-devel >= 1.17
|
|
BuildRequires: pkgconfig
|
|
Requires(post): %{install_info_prereq}
|
|
Requires(preun): %{install_info_prereq}
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%if 0%{with_python2}
|
|
BuildRequires: python-devel >= 2.7
|
|
BuildRequires: swig
|
|
%endif # with_python2
|
|
%if 0%{with_python3}
|
|
BuildRequires: python3-devel >= 3.4
|
|
BuildRequires: swig
|
|
%endif # with_python3
|
|
%if 0%{with_cpp}
|
|
BuildRequires: gcc-c++
|
|
%endif # with_cpp
|
|
%if 0%{with_qt}
|
|
BuildRequires: pkgconfig(Qt5Core)
|
|
BuildRequires: pkgconfig(Qt5Test)
|
|
%endif # with_qt
|
|
|
|
%description
|
|
GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
|
|
easier for applications. It provides a high-level crypto API for
|
|
encryption, decryption, signing, signature verification, and key
|
|
management. It uses GnuPG as its back-end.
|
|
|
|
%package -n libgpgme11
|
|
Summary: Programmatic library interface to GnuPG
|
|
Group: Development/Libraries/C and C++
|
|
Requires: gpg2
|
|
|
|
%description -n libgpgme11
|
|
GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
|
|
easier for applications. It provides a high-level crypto API for
|
|
encryption, decryption, signing, signature verification, and key
|
|
management. It uses GnuPG as its back-end.
|
|
|
|
%package -n libgpgme-devel
|
|
Summary: Development files for GPGME, a C library for accessing GnuPG
|
|
Group: Development/Libraries/C and C++
|
|
Requires: glibc-devel
|
|
Requires: libgpg-error-devel
|
|
Requires: libgpgme11 = %{version}
|
|
Provides: gpgme-devel = %{version}
|
|
Obsoletes: gpgme-devel < %{version}
|
|
%requires_ge libassuan-devel
|
|
|
|
%description -n libgpgme-devel
|
|
GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
|
|
easier for applications. It provides a high-level crypto API for
|
|
encryption, decryption, signing, signature verification, and key
|
|
management.
|
|
|
|
This subpackage contains the headers needed for building applications
|
|
making use of libgpgme.
|
|
|
|
%if 0%{with_cpp}
|
|
%package -n libgpgmepp6
|
|
Summary: Programmatic C++ library interface to GnuPG
|
|
Group: Development/Libraries/C and C++
|
|
Requires: gpg2
|
|
|
|
%description -n libgpgmepp6
|
|
GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
|
|
easier for applications. It provides a high-level crypto API for
|
|
encryption, decryption, signing, signature verification, and key
|
|
management.
|
|
|
|
This package contains the C++ bindings.
|
|
|
|
%package -n libgpgmepp-devel
|
|
Summary: Development files for libgpgmepp, a C++ library for accessing GnuPG
|
|
Group: Development/Libraries/C and C++
|
|
Requires: glibc-devel
|
|
Requires: libgpg-error-devel
|
|
Requires: libgpgme-devel = %{version}
|
|
Requires: libgpgmepp6 = %{version}
|
|
%requires_ge libassuan-devel
|
|
|
|
%description -n libgpgmepp-devel
|
|
GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
|
|
easier for applications. It provides a high-level crypto API for
|
|
encryption, decryption, signing, signature verification, and key
|
|
management.
|
|
|
|
This subpackage contains the headers needed for building applications
|
|
making use of libgpgmepp.
|
|
|
|
%endif # with_cpp
|
|
|
|
%if 0%{with_python2}
|
|
%package -n python-gpg
|
|
Summary: Python 2 bindings for GPGME, a library for accessing GnuPG
|
|
Group: Development/Libraries/Python
|
|
|
|
%description -n python-gpg
|
|
GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
|
|
easier for applications. It provides a high-level crypto API for
|
|
encryption, decryption, signing, signature verification, and key
|
|
management.
|
|
|
|
This package contains the bindings to use the library from Python 2 applications.
|
|
%endif # with_python2
|
|
|
|
%if 0%{with_python3}
|
|
%package -n python3-gpg
|
|
Summary: Python 3 bindings for GPGME, a library for accessing GnuPG
|
|
Group: Development/Libraries/Python
|
|
|
|
%description -n python3-gpg
|
|
GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
|
|
easier for applications. It provides a high-level crypto API for
|
|
encryption, decryption, signing, signature verification, and key
|
|
management.
|
|
|
|
This package contains the bindings to use the library from Python 3 applications.
|
|
%endif # with_python3
|
|
|
|
%if 0%{with_qt}
|
|
%package -n libqgpgme7
|
|
Summary: Programmatic Qt library interface to GnuPG
|
|
Group: Development/Libraries/C and C++
|
|
Requires: gpg2
|
|
|
|
%description -n libqgpgme7
|
|
GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
|
|
easier for applications. It provides a high-level crypto API for
|
|
encryption, decryption, signing, signature verification, and key
|
|
management.
|
|
|
|
This package contains the Qt bindings.
|
|
|
|
%package -n libqgpgme-devel
|
|
Summary: Development files for libqgpgme, a Qt library for accessing GnuPG
|
|
Group: Development/Libraries/C and C++
|
|
Requires: libgpgme-devel = %{version}
|
|
Requires: libgpgmepp-devel = %{version}
|
|
Requires: libqgpgme7 = %{version}
|
|
|
|
%description -n libqgpgme-devel
|
|
GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
|
|
easier for applications. It provides a high-level crypto API for
|
|
encryption, decryption, signing, signature verification, and key
|
|
management.
|
|
|
|
This package contains the bindings to use the library in Qt C++ applications.
|
|
|
|
%endif # with_qt
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%build
|
|
build_timestamp=$(date -u +%{Y}-%{m}-%{dT}%{H}:%{M}+0000 -r %{SOURCE99})
|
|
languages="cl"
|
|
%if 0%{with_cpp}
|
|
languages="${languages} cpp"
|
|
%if %{with_qt}
|
|
languages="${languages} qt"
|
|
%endif # with_qt
|
|
%endif # with_cpp
|
|
%if 0%{with_python2}
|
|
languages="${languages} python2"
|
|
%endif # with_python2
|
|
%if 0%{with_python3}
|
|
languages="${languages} python3"
|
|
%endif # with_python3
|
|
%configure \
|
|
--disable-static \
|
|
--disable-fd-passing \
|
|
--enable-languages="${languages}" \
|
|
--enable-build-timestamp="${build_timestamp}"
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
make %{?_smp_mflags} DESTDIR=%{buildroot} install
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
|
%if 0%{with_cpp}
|
|
chmod -x %{buildroot}%{_libdir}/cmake/Gpgmepp/*.cmake
|
|
%endif # with_cpp
|
|
%if 0%{with_python2}
|
|
find %{buildroot}%{python_sitearch}/gpg-*.egg-info -delete -print
|
|
find %{buildroot}%{python_sitearch}/gpg -type f -name "*.pyc" -delete -print
|
|
rm -v %{buildroot}%{python_sitelib}/gpg/install_files.txt
|
|
%endif # with_python2
|
|
%if 0%{with_python3}
|
|
find %{buildroot}%{python3_sitearch}/gpg-*.egg-info -delete -print
|
|
rm -v %{buildroot}%{python3_sitelib}/gpg/install_files.txt
|
|
find %{buildroot}%{python3_sitearch}/gpg -type f -name "*.pyc" -delete -print
|
|
%endif # with_python3
|
|
|
|
%check
|
|
%if ! 0%{?qemu_user_space_build}
|
|
make %{?_smp_mflags} check
|
|
%endif
|
|
|
|
%post -n libgpgme11 -p /sbin/ldconfig
|
|
%postun -n libgpgme11 -p /sbin/ldconfig
|
|
%if 0%{with_cpp}
|
|
%post -n libgpgmepp6 -p /sbin/ldconfig
|
|
%postun -n libgpgmepp6 -p /sbin/ldconfig
|
|
%endif # with_cpp
|
|
|
|
%if 0%{with_qt}
|
|
%post -n libqgpgme7 -p /sbin/ldconfig
|
|
%postun -n libqgpgme7 -p /sbin/ldconfig
|
|
%endif # with_qt
|
|
|
|
%post
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/gpgme.info.gz
|
|
|
|
%preun
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/gpgme.info.gz
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc AUTHORS COPYING COPYING.LESSER ChangeLog ChangeLog-2011 README NEWS THANKS TODO VERSION
|
|
%{_bindir}/gpgme-tool
|
|
%{_datadir}/common-lisp
|
|
%{_datadir}/common-lisp/source
|
|
%{_infodir}/gpgme*
|
|
|
|
%files -n libgpgme11
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libgpgme.so.*
|
|
|
|
%files -n libgpgme-devel
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libgpgme.so
|
|
%{_bindir}/gpgme-config
|
|
%{_datadir}/aclocal/gpgme.m4
|
|
%{_includedir}/gpgme.h
|
|
|
|
%if 0%{with_cpp}
|
|
%files -n libgpgmepp6
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libgpgmepp.so.*
|
|
|
|
%files -n libgpgmepp-devel
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libgpgmepp.so
|
|
%{_includedir}/gpgme++
|
|
%dir %{_libdir}/cmake
|
|
%dir %{_libdir}/cmake/Gpgmepp
|
|
%{_libdir}/cmake/Gpgmepp/GpgmeppConfig*.cmake
|
|
%endif # with_cpp
|
|
|
|
%if 0%{with_python2}
|
|
%files -n python-gpg
|
|
%defattr(-,root,root)
|
|
%{python_sitelib}/gpg
|
|
%{python_sitearch}/gpg
|
|
%endif # with_python2
|
|
|
|
%if 0%{with_python3}
|
|
%files -n python3-gpg
|
|
%defattr(-,root,root)
|
|
%{python3_sitelib}/gpg
|
|
%{python3_sitearch}/gpg
|
|
%endif # with_python3
|
|
|
|
%if 0%{with_qt}
|
|
%files -n libqgpgme7
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libqgpgme.so.*
|
|
|
|
%files -n libqgpgme-devel
|
|
%defattr(-,root,root)
|
|
%{_includedir}/qgpgme/
|
|
%{_includedir}/QGpgME/
|
|
%dir %{_libdir}/cmake
|
|
%dir %{_libdir}/cmake/QGpgme
|
|
%{_libdir}/cmake/QGpgme/*.cmake
|
|
%{_libdir}/libqgpgme.so
|
|
%endif # with_qt
|
|
|
|
%changelog
|