gpgme-vl.spec 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. %define _gnupg_ver 2.4.3
  2. %define _libgpg_error_ver 1.36
  3. %define _unpackaged_files_terminate_build 1
  4. Summary: GPGME - GnuPG Made Easy
  5. Summary(ja): GPGME - GnuPG Made Easy
  6. Name: gpgme
  7. Version: 1.22.0
  8. Release: 2%{?_dist_release}
  9. Group: system
  10. Vendor: Project Vine
  11. Distribution: Vine Linux
  12. License: LGPL
  13. URL: https://gnupg.org/software/gpgme/index.html
  14. Source: https://gnupg.org/ftp/gcrypt/gpgme/%{name}-%{version}.tar.bz2
  15. ## downstream patches
  16. # Don't add extra libs/cflags in gpgme-config/cmake equivalent
  17. Patch1001: 0001-don-t-add-extra-libraries-for-linking.patch
  18. # add -D_FILE_OFFSET_BITS... to gpgme-config, upstreamable
  19. Patch1002: gpgme-1.3.2-largefile.patch
  20. # Let's fix stupid AX_PYTHON_DEVEL
  21. Patch1003: 0001-fix-stupid-ax_python_devel.patch
  22. # Allow extra options to be passed to setup.py during installation
  23. Patch1004: 0002-setup_py_extra_opts.patch
  24. ## temporary downstream fixes
  25. # Skip lang/qt/tests/t-remarks on gnupg 2.4+
  26. Patch3001: 1001-qt-skip-test-remarks-for-gnupg2-2.4.patch
  27. # fix FTBFS caused by include path order, for <= 1.22.0
  28. Patch3002: gpgme-1.22.0-ftbfs-aee18a2a.patch
  29. Patch3003: gpgme-1.22.0-ftbfs-d23528ca.patch
  30. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  31. BuildRequires: gnupg2 >= %{_gnupg_ver}
  32. BuildRequires: libgpg-error-devel >= %{_libgpg_error_ver}
  33. BuildRequires: libassuan-devel >= 2.4.2
  34. BuildRequires: chrpath
  35. BuildRequires: swig
  36. BuildRequires: python-rpm-macros
  37. BuildRequires: python3-devel
  38. BuildRequires: python3-setuptools
  39. BuildRequires: python3-rpm-macros
  40. Requires: gnupg2 >= %{_gnupg_ver}
  41. Requires: libgpg-error >= %{_libgpg_error_ver}
  42. Obsoletes: gpgme10
  43. Provides: gpgme10
  44. %description
  45. GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier
  46. for applications. It provides a High-Level Crypto API for encryption,
  47. decryption, signing, signature verification and key management. Currently it
  48. uses GnuPG as it's backend but the API isn't restricted to this engine; in
  49. fact it is planned to add other backends to it.
  50. %description -l ja
  51. GnuPG Made Easy (GPGME) は、アプリケーションがより簡単に GnuPG にアクセスでき
  52. るように設計されたライブラリです。暗号化や復号、署名、署名の検証、鍵の管理の
  53. ための高レベルの暗号 API を提供します。
  54. 現在のところ、バックエンドとして GnuPG を使用しますが、API はこのエンジンに限
  55. 定されません。実際、他のバックエンドを追加することが計画されています。
  56. %package devel
  57. Summary: GnuPG Made Easy (GPGME) Header files and libraries for development
  58. Summary(ja): GnuPG Made Easy (GPGME) 開発用ヘッダーファイル・ライブラリ
  59. Group: programming
  60. Requires: %{name} = %{version}
  61. Requires: libgpg-error-devel >= 0.5
  62. Requires: libassuan-devel >= 2.0.2
  63. Obsoletes: %{name} < 0.3.16-0vl2
  64. Obsoletes: gpgme10-devel
  65. Provides: gpgme10-devel
  66. %description devel
  67. GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier
  68. for applications.
  69. Install this package if you want to develop applications that will use the
  70. gpgme library.
  71. %description -l ja devel
  72. GnuPG Made Easy (GPGME) は、アプリケーションがより簡単に GnuPG にアクセスでき
  73. るように設計されたライブラリです。
  74. GPGME ライブラリを使用するアプリケーションを開発するのであれば、このパッケー
  75. ジをインストールしてください。
  76. %package -n python3-gpg
  77. Summary: %{name} bindings for Python 3
  78. Group: programming
  79. %{?python_provide:%python_provide python3-gpg}
  80. Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
  81. %description -n python3-gpg
  82. %{summary}.
  83. %prep
  84. %autosetup -p1
  85. ## HACK ALERT
  86. # The config script already suppresses the -L if it's /usr/lib, so cheat and
  87. # set it to a value which we know will be suppressed.
  88. sed -i -e 's|^libdir=@libdir@$|libdir=@exec_prefix@/lib|g' src/gpgme-config.in
  89. # The build machinery does not support Python 3.9+ yet
  90. # https://github.com/gpg/gpgme/pull/4
  91. sed -i 's/3.8/%{python3_version}/g' configure
  92. %build
  93. # Since 1.16.0, we need to explicitly pass -D_LARGEFILE_SOURCE and
  94. # -D_FILE_OFFSET_BITS=64 for the QT binding to build successfully on 32-bit
  95. # platforms.
  96. export CFLAGS='%{optflags} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
  97. export CXXFLAGS='%{optflags} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
  98. # Explicit new lines in C(XX)FLAGS can break naive build scripts
  99. export CFLAGS="$(echo ${CFLAGS} | tr '\n\\' ' ')"
  100. export CXXFLAGS="$(echo ${CXXFLAGS} | tr '\n\\' ' ')"
  101. export SETUPTOOLS_USE_DISTUTILS=local
  102. %configure \
  103. --disable-static \
  104. --disable-silent-rules \
  105. --enable-languages=cpp,python \
  106. --disable-gpgsm-test
  107. %make_build
  108. %install
  109. %__rm -rf %{buildroot}
  110. # When using distutils from setuptools 60+, ./setup.py install use
  111. # the .egg format. This forces setuptools to use .egg-info format.
  112. # SETUP_PY_EXTRA_OPTS is introduced by the Patch1004 above.
  113. export SETUPTOOLS_USE_DISTUTILS=local
  114. export SETUP_PY_EXTRA_OPTS="--single-version-externally-managed --root=/"
  115. %make_install
  116. # remove unneeded files
  117. %__rm -rf %{buildroot}%{_datadir}/common-lisp
  118. %__rm -f %{buildroot}%{_libdir}/*.la
  119. %__rm -f %{buildroot}%{_infodir}/dir
  120. chrpath -d %{buildroot}%{_bindir}/%{name}-tool
  121. chrpath -d %{buildroot}%{_bindir}/%{name}-json
  122. chrpath -d %{buildroot}%{_libdir}/lib%{name}*.so*
  123. # autofoo installs useless stuff for uninstall
  124. rm -vf %{buildroot}%{python2_sitelib}/gpg/install_files.txt
  125. rm -vf %{buildroot}%{python3_sitelib}/gpg/install_files.txt
  126. %clean
  127. %__rm -rf %{buildroot}
  128. %files
  129. %defattr(-,root,root)
  130. %license COPYING*
  131. %doc AUTHORS ChangeLog NEWS README* THANKS TODO VERSION
  132. %{_bindir}/gpgme-json
  133. %{_libdir}/libgpgme*.so.*
  134. %files devel
  135. %defattr(-,root,root)
  136. %{_bindir}/gpgme-config
  137. %{_bindir}/gpgme-tool
  138. %{_libdir}/libgpgme*.so
  139. %{_libdir}/cmake/*
  140. %{_libdir}/pkgconfig/*
  141. %{_datadir}/aclocal/gpgme.m4
  142. %{_includedir}/*
  143. %{_infodir}/*
  144. %files -n python3-gpg
  145. %doc lang/python/README
  146. %{python3_sitearch}/gpg-*.egg-info
  147. %{python3_sitearch}/gpg/
  148. %changelog
  149. * Thu Oct 19 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.22.0-2
  150. - fixed cmake files.
  151. * Thu Oct 19 2023 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.22.0-1
  152. - new upstream release.
  153. - dropped python2 support.
  154. - dropped install-info scriptlets.
  155. - dropped ldconfig scriptlets.
  156. * Thu Feb 11 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.15.1-1
  157. - new upstream release.
  158. * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.14.0-1
  159. - new upstream release.
  160. * Thu Mar 26 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.13.1-1
  161. - new upstream release.
  162. * Fri Nov 30 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.12.0-2
  163. - enabled python{2,3} bindings.
  164. * Mon Nov 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.12.0-1
  165. - new upstream release.
  166. * Fri Jul 11 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.3-1
  167. - new upstream release.
  168. * Tue Apr 5 2011 IWAI, Masaharu <iwai@alib.jp> 1.3.0-1
  169. - new upstream release
  170. - add BuildRequires: libassuan-devel >= 2
  171. - add Requires: libassuan-devel >= 2 for devel subpackage
  172. - update GnuPG min version
  173. * Sun Aug 15 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.8-1
  174. - new upstream release
  175. * Fri Sep 26 2008 Shu KONNO <owa@bg.wakwak.com> 1.1.4-2vl5
  176. - removed *.la
  177. - spec in utf-8
  178. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 1.1.4-1vl5
  179. - applied new versioning policy
  180. * Fri Mar 09 2007 KAZUKI SHIMURA <kazukipma.ccnw.ne.jp> 1.1.4-0vl1
  181. - upstream release
  182. - add new macros: %%_gnupg_ver, %%_libgpg_error_ver
  183. - update %%_gnupg_ver to 1.3.0
  184. - update %%_libgpg_error_ver to 1.4
  185. * Tue Sep 27 2005 KAZUKI SHIMURA <kazukipma.ccnw.ne.jp> 1.0.3-0vl1
  186. - upstream release
  187. * Sat Mar 12 2005 KAZUKI SHIMURA <kazukipma.ccnw.ne.jp> 1.0.2-0vl3
  188. - add Obsoletes/Provides: gpgme10{,-devel}
  189. * Sun Feb 13 2005 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 1.0.2-0vl2
  190. - fix spec file's encoding from iso-2022-jp to euc-jp
  191. - add PreReq: ldconfig
  192. - add PreReq: install-info (devel)
  193. - change group to System Environment/Libraries (main)
  194. - add poor Japanese description
  195. * Tue Feb 01 2005 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 1.0.2-0vl1
  196. - upstream release
  197. - change license from GPL to LGPL
  198. - update {Build,}Requires for GnuPG (>= 1.2.2)
  199. - add (Build)Requires: libgpg-error(-devel) >= 0.5
  200. - add docs
  201. - run ldconfig at post/postun
  202. - separate devel package
  203. - Requires: libgpg-error-devel
  204. - Obsoletes: gpgme <= 0.3.16
  205. * Sun Apr 25 2004 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 0.3.16-0vl1
  206. - update to 0.3.16
  207. - s/Copyright/License/
  208. - update URL
  209. * Fri Mar 7 2003 IWAI Masaharu <iwai@alib.jp> 0.3.15-0vl1
  210. - update to 0.3.15
  211. - update {Build,}Requires for GnuPG
  212. * Mon Sep 23 2002 IWAI Masaharu <iwai@alib.jp> 0.3.11-0vl1
  213. - update to 0.3.11
  214. - added {Build,}Requires: gnupg = 1.0.7
  215. - added info files
  216. - added %%post and %%preun section for info files
  217. - fixed %%install section (executing rm command)
  218. * Thu May 24 2001 Daisuke SUZUKI <daisuke@linux.or.jp> 0.2.1-0vl1
  219. - initial release