2017-03-29 05:08:55 +00:00
|
|
|
%bcond_without check
|
2016-12-11 12:42:00 +00:00
|
|
|
|
2021-01-24 10:32:35 +00:00
|
|
|
%global gnupg2_min_ver 2.2.24
|
|
|
|
%global libgpg_error_min_ver 1.36
|
2005-08-08 20:49:45 +00:00
|
|
|
|
2016-07-25 09:59:35 +00:00
|
|
|
Name: gpgme
|
|
|
|
Summary: GnuPG Made Easy - high level crypto API
|
2021-12-29 18:02:23 +00:00
|
|
|
Version: 1.16.0
|
2021-12-29 17:58:01 +00:00
|
|
|
Release: %autorelease
|
2004-11-08 04:29:10 +00:00
|
|
|
|
2021-12-29 18:02:23 +00:00
|
|
|
# MIT: src/cJSON.{c,h} (used by gpgme-json)
|
|
|
|
License: LGPLv2+ and MIT
|
2016-12-10 16:58:06 +00:00
|
|
|
URL: https://gnupg.org/related_software/gpgme/
|
2019-07-29 16:46:56 +00:00
|
|
|
Source0: https://gnupg.org/ftp/gcrypt/gpgme/gpgme-%{version}.tar.bz2
|
2016-07-25 09:59:35 +00:00
|
|
|
Source2: gpgme-multilib.h
|
2006-05-11 19:34:16 +00:00
|
|
|
|
2021-12-29 18:02:23 +00:00
|
|
|
# Fix build with glibc >=2.34
|
|
|
|
Patch0001: https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=patch;h=4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e#/0001-core-Support-closefrom-also-for-glibc.patch
|
|
|
|
|
2017-01-18 17:36:42 +00:00
|
|
|
## downstream patches
|
2017-03-29 05:08:55 +00:00
|
|
|
# Don't add extra libs/cflags in gpgme-config/cmake equivalent
|
|
|
|
Patch1001: 0001-don-t-add-extra-libraries-for-linking.patch
|
2017-01-18 17:36:42 +00:00
|
|
|
# add -D_FILE_OFFSET_BITS... to gpgme-config, upstreamable
|
2017-03-29 05:08:55 +00:00
|
|
|
Patch1002: gpgme-1.3.2-largefile.patch
|
|
|
|
# Let's fix stupid AX_PYTHON_DEVEL
|
|
|
|
Patch1003: 0001-fix-stupid-ax_python_devel.patch
|
2017-01-18 17:36:42 +00:00
|
|
|
|
2019-08-10 11:54:09 +00:00
|
|
|
#BuildRequires: autoconf
|
|
|
|
#BuildRequires: automake
|
2021-01-24 10:32:35 +00:00
|
|
|
BuildRequires: make
|
2016-07-25 09:59:35 +00:00
|
|
|
BuildRequires: gcc
|
2016-12-10 17:31:09 +00:00
|
|
|
BuildRequires: gcc-c++
|
2016-07-25 09:59:35 +00:00
|
|
|
BuildRequires: gawk
|
|
|
|
BuildRequires: gnupg2 >= %{gnupg2_min_ver}
|
|
|
|
BuildRequires: gnupg2-smime
|
2016-07-25 11:30:03 +00:00
|
|
|
BuildRequires: libgpg-error-devel >= %{libgpg_error_min_ver}
|
2018-04-19 07:07:32 +00:00
|
|
|
BuildRequires: libassuan-devel >= 2.4.2
|
2005-02-01 19:47:28 +00:00
|
|
|
|
2016-09-21 14:48:37 +00:00
|
|
|
# For python bindings
|
|
|
|
BuildRequires: swig
|
|
|
|
|
2016-07-13 12:13:26 +00:00
|
|
|
# to remove RPATH
|
2016-07-25 09:59:35 +00:00
|
|
|
BuildRequires: chrpath
|
2016-07-13 12:13:26 +00:00
|
|
|
|
2017-08-07 08:47:02 +00:00
|
|
|
# For AutoReq cmake-filesystem
|
|
|
|
BuildRequires: cmake
|
|
|
|
|
2016-07-25 09:59:35 +00:00
|
|
|
Requires: gnupg2 >= %{gnupg2_min_ver}
|
2004-11-08 04:29:10 +00:00
|
|
|
|
2012-02-03 13:02:18 +00:00
|
|
|
# On the following architectures workaround multiarch conflict of -devel packages:
|
|
|
|
%define multilib_arches %{ix86} x86_64 ia64 ppc ppc64 s390 s390x %{sparc}
|
|
|
|
|
2004-11-08 04:29:10 +00:00
|
|
|
%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.
|
|
|
|
|
2005-02-01 19:47:28 +00:00
|
|
|
%package devel
|
2017-03-29 05:08:55 +00:00
|
|
|
Summary: Development headers and libraries for %{name}
|
|
|
|
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
Requires: libgpg-error-devel%{?_isa} >= %{libgpg_error_min_ver}
|
2016-07-13 12:13:26 +00:00
|
|
|
|
2005-08-08 20:49:45 +00:00
|
|
|
%description devel
|
2016-07-13 12:13:26 +00:00
|
|
|
%{summary}.
|
2004-11-08 04:29:10 +00:00
|
|
|
|
2017-01-01 14:05:31 +00:00
|
|
|
%package -n %{name}pp
|
2016-12-11 12:24:04 +00:00
|
|
|
Summary: C++ bindings/wrapper for GPGME
|
2017-01-01 14:05:31 +00:00
|
|
|
Obsoletes: gpgme-pp < 1.8.0-7
|
|
|
|
Provides: gpgme-pp = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
Provides: gpgme-pp%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
2016-12-11 12:24:04 +00:00
|
|
|
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
|
2017-01-01 14:05:31 +00:00
|
|
|
%description -n %{name}pp
|
2016-12-11 12:24:04 +00:00
|
|
|
%{summary}.
|
|
|
|
|
2017-01-01 14:05:31 +00:00
|
|
|
%package -n %{name}pp-devel
|
2016-12-11 12:24:04 +00:00
|
|
|
Summary: Development libraries and header files for %{name}-pp
|
2017-01-01 14:05:31 +00:00
|
|
|
Obsoletes: gpgme-pp-devel < 1.8.0-7
|
|
|
|
Provides: gpgme-pp-devel = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
Provides: gpgme-pp-devel%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
Requires: %{name}pp%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
Requires: %{name}-devel%{?_isa}
|
2016-12-11 12:24:04 +00:00
|
|
|
# For automatic provides
|
|
|
|
BuildRequires: cmake
|
|
|
|
|
2017-01-01 14:05:31 +00:00
|
|
|
%description -n %{name}pp-devel
|
2016-12-11 12:24:04 +00:00
|
|
|
%{summary}
|
|
|
|
|
|
|
|
%package -n q%{name}
|
|
|
|
Summary: Qt API bindings/wrapper for GPGME
|
2017-01-01 14:05:31 +00:00
|
|
|
Requires: %{name}pp%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
2016-12-11 12:24:04 +00:00
|
|
|
BuildRequires: pkgconfig(Qt5Core)
|
|
|
|
BuildRequires: pkgconfig(Qt5Test)
|
|
|
|
|
|
|
|
%description -n q%{name}
|
|
|
|
%{summary}.
|
|
|
|
|
|
|
|
%package -n q%{name}-devel
|
|
|
|
Summary: Development libraries and header files for %{name}
|
2017-01-16 21:17:25 +00:00
|
|
|
# before libqgpgme.so symlink was moved to avoid conflict
|
|
|
|
Conflicts: kdepimlibs-devel < 4.14.10-17
|
2016-12-11 12:24:04 +00:00
|
|
|
Requires: q%{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
2017-01-01 14:05:31 +00:00
|
|
|
Requires: %{name}pp-devel%{?_isa}
|
2016-12-11 12:24:04 +00:00
|
|
|
# For automatic provides
|
|
|
|
BuildRequires: cmake
|
|
|
|
|
|
|
|
%description -n q%{name}-devel
|
|
|
|
%{summary}.
|
|
|
|
|
2016-12-11 12:41:06 +00:00
|
|
|
%package -n python3-gpg
|
2016-09-21 14:48:37 +00:00
|
|
|
Summary: %{name} bindings for Python 3
|
2016-12-11 12:41:06 +00:00
|
|
|
%{?python_provide:%python_provide python3-gpg}
|
2016-09-21 14:48:37 +00:00
|
|
|
BuildRequires: python3-devel
|
2016-12-10 17:31:09 +00:00
|
|
|
Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
2017-11-07 11:07:59 +00:00
|
|
|
Obsoletes: platform-python-gpg < %{version}-%{release}
|
2016-09-21 14:48:37 +00:00
|
|
|
|
2016-12-11 12:48:15 +00:00
|
|
|
%description -n python3-gpg
|
2016-09-21 14:48:37 +00:00
|
|
|
%{summary}.
|
2004-11-08 04:29:10 +00:00
|
|
|
|
|
|
|
%prep
|
2016-07-25 09:59:35 +00:00
|
|
|
%autosetup -p1
|
2006-05-11 19:34:16 +00:00
|
|
|
|
2008-01-04 16:48:27 +00:00
|
|
|
## HACK ALERT
|
|
|
|
# The config script already suppresses the -L if it's /usr/lib, so cheat and
|
|
|
|
# set it to a value which we know will be suppressed.
|
2009-06-21 03:03:55 +00:00
|
|
|
sed -i -e 's|^libdir=@libdir@$|libdir=@exec_prefix@/lib|g' src/gpgme-config.in
|
2004-11-08 04:29:10 +00:00
|
|
|
|
2020-02-13 10:44:10 +00:00
|
|
|
# The build machinery does not support Python 3.9+ yet
|
|
|
|
# https://github.com/gpg/gpgme/pull/4
|
|
|
|
sed -i 's/3.8/%{python3_version}/g' configure
|
|
|
|
|
2004-11-08 04:29:10 +00:00
|
|
|
%build
|
2019-08-10 11:54:09 +00:00
|
|
|
# People neeed to learn that you can't run autogen.sh anymore
|
|
|
|
#./autogen.sh
|
2016-12-11 12:24:04 +00:00
|
|
|
%configure --disable-static --disable-silent-rules --enable-languages=cpp,qt,python
|
2016-07-13 12:13:26 +00:00
|
|
|
%make_build
|
2004-11-08 04:29:10 +00:00
|
|
|
|
|
|
|
%install
|
2016-07-13 12:13:26 +00:00
|
|
|
%make_install
|
2005-02-01 19:47:28 +00:00
|
|
|
|
2007-02-03 21:13:51 +00:00
|
|
|
# unpackaged files
|
2016-07-13 12:13:26 +00:00
|
|
|
rm -fv %{buildroot}%{_infodir}/dir
|
|
|
|
rm -fv %{buildroot}%{_libdir}/lib*.la
|
2004-11-08 04:29:10 +00:00
|
|
|
|
2012-02-03 13:02:18 +00:00
|
|
|
# Hack to resolve multiarch conflict (#341351)
|
|
|
|
%ifarch %{multilib_arches}
|
2016-07-13 12:13:26 +00:00
|
|
|
mv %{buildroot}%{_bindir}/gpgme-config{,.%{_target_cpu}}
|
2012-04-23 01:07:19 +00:00
|
|
|
cat > gpgme-config-multilib.sh <<__END__
|
2012-02-03 13:02:18 +00:00
|
|
|
#!/bin/sh
|
|
|
|
exec %{_bindir}/gpgme-config.\$(arch) \$@
|
|
|
|
__END__
|
2016-07-13 12:13:26 +00:00
|
|
|
install -D -p gpgme-config-multilib.sh %{buildroot}%{_bindir}/gpgme-config
|
|
|
|
mv %{buildroot}%{_includedir}/gpgme.h \
|
|
|
|
%{buildroot}%{_includedir}/gpgme-%{__isa_bits}.h
|
|
|
|
install -m644 -p -D %{SOURCE2} %{buildroot}%{_includedir}/gpgme.h
|
2012-02-03 13:02:18 +00:00
|
|
|
%endif
|
2016-07-13 12:13:26 +00:00
|
|
|
chrpath -d %{buildroot}%{_bindir}/%{name}-tool
|
2021-06-02 11:56:15 +00:00
|
|
|
chrpath -d %{buildroot}%{_bindir}/%{name}-json
|
2016-12-11 12:24:04 +00:00
|
|
|
chrpath -d %{buildroot}%{_libdir}/lib%{name}pp.so*
|
|
|
|
chrpath -d %{buildroot}%{_libdir}/libq%{name}.so*
|
2012-04-22 23:59:14 +00:00
|
|
|
|
2016-12-10 16:58:06 +00:00
|
|
|
# autofoo installs useless stuff for uninstall
|
2016-12-10 18:08:57 +00:00
|
|
|
rm -vf %{buildroot}%{python2_sitelib}/gpg/install_files.txt
|
|
|
|
rm -vf %{buildroot}%{python3_sitelib}/gpg/install_files.txt
|
2016-12-10 16:58:06 +00:00
|
|
|
|
2017-03-29 05:08:55 +00:00
|
|
|
%if %{with check}
|
2017-03-04 22:52:34 +00:00
|
|
|
%check
|
2018-04-20 13:57:24 +00:00
|
|
|
make check
|
2016-12-11 12:42:00 +00:00
|
|
|
%endif
|
2004-11-08 04:29:10 +00:00
|
|
|
|
2012-04-22 23:59:14 +00:00
|
|
|
%files
|
2021-12-29 18:02:23 +00:00
|
|
|
%license COPYING* LICENSES
|
2019-08-03 12:28:26 +00:00
|
|
|
%doc AUTHORS NEWS README*
|
2018-04-19 08:04:15 +00:00
|
|
|
%{_bindir}/%{name}-json
|
2016-07-13 12:13:26 +00:00
|
|
|
%{_libdir}/lib%{name}.so.11*
|
2012-04-22 23:59:14 +00:00
|
|
|
|
2004-11-08 04:29:10 +00:00
|
|
|
%files devel
|
2016-07-13 12:13:26 +00:00
|
|
|
%{_bindir}/%{name}-config
|
|
|
|
%{_bindir}/%{name}-tool
|
2012-02-03 13:02:18 +00:00
|
|
|
%ifarch %{multilib_arches}
|
2016-12-10 16:58:06 +00:00
|
|
|
%{_bindir}/%{name}-config.%{_target_cpu}
|
|
|
|
%{_includedir}/%{name}-%{__isa_bits}.h
|
2012-02-03 13:02:18 +00:00
|
|
|
%endif
|
2016-12-10 16:58:06 +00:00
|
|
|
%{_includedir}/%{name}.h
|
|
|
|
%{_libdir}/lib%{name}.so
|
|
|
|
%{_datadir}/aclocal/%{name}.m4
|
|
|
|
%{_infodir}/%{name}.info*
|
2019-08-03 12:28:26 +00:00
|
|
|
%{_libdir}/pkgconfig/%{name}*.pc
|
2004-11-08 04:29:10 +00:00
|
|
|
|
2017-01-01 14:05:31 +00:00
|
|
|
%files -n %{name}pp
|
2016-12-11 12:24:04 +00:00
|
|
|
%doc lang/cpp/README
|
2021-01-24 10:44:33 +00:00
|
|
|
%{_libdir}/lib%{name}pp.so.6*
|
2016-12-11 12:24:04 +00:00
|
|
|
|
2017-01-01 14:05:31 +00:00
|
|
|
%files -n %{name}pp-devel
|
2016-12-11 12:24:04 +00:00
|
|
|
%{_includedir}/%{name}++/
|
|
|
|
%{_libdir}/lib%{name}pp.so
|
|
|
|
%{_libdir}/cmake/Gpgmepp/
|
|
|
|
|
|
|
|
%files -n q%{name}
|
|
|
|
%doc lang/qt/README
|
2021-01-24 10:44:33 +00:00
|
|
|
%{_libdir}/libq%{name}.so.7*
|
2016-12-11 12:24:04 +00:00
|
|
|
|
|
|
|
%files -n q%{name}-devel
|
|
|
|
%{_includedir}/q%{name}/
|
|
|
|
%{_includedir}/QGpgME/
|
|
|
|
%{_libdir}/libq%{name}.so
|
|
|
|
%{_libdir}/cmake/QGpgme/
|
|
|
|
|
2016-12-11 12:41:06 +00:00
|
|
|
%files -n python3-gpg
|
2016-12-10 17:20:40 +00:00
|
|
|
%doc lang/python/README
|
2016-12-10 16:58:06 +00:00
|
|
|
%{python3_sitearch}/gpg-*.egg-info
|
|
|
|
%{python3_sitearch}/gpg/
|
2016-09-21 14:48:37 +00:00
|
|
|
|
2004-11-08 04:29:10 +00:00
|
|
|
%changelog
|
2021-12-29 17:58:01 +00:00
|
|
|
%autochangelog
|