sip-vl.spec 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. %{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
  2. %{!?python_inc:%global python_inc %(%{__python} -c "from distutils.sysconfig import get_python_inc; print get_python_inc(1)")}
  3. %define py_ver %(python -c 'import sys;print(sys.version[0:3])')
  4. %{!?python3:%global __python3 /usr/bin/python3}
  5. %{!?python3_inc:%global python3_inc %(%{__python3} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc(1))")}
  6. %{!?python3_sitearch: %global python3_sitearch %(python3 -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1))")}
  7. %{!?python3_sitelib: %global python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
  8. %{!?python3_version: %global python3_version %(python3 -c "import sys; sys.stdout.write(sys.version[:3])")}
  9. %global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
  10. # trim changelog included in binary rpms
  11. %global _changelog_trimtime %(date +%s -d "1 year ago")
  12. Name: sip
  13. Summary: Python/C++ Bindings Generator
  14. Summary(ja): Python/C++ インターフェイス生成ツール
  15. Version: 4.19.25
  16. Release: 1%{?_dist_release}
  17. Group: programming
  18. Vendor: Project Vine
  19. Distribution: Vine Linux
  20. # sipgen/parser.{c.h} is GPLv3+ with exceptions (bison)
  21. License: GPLv2 or GPLv3 and (GPLv3+ with exceptions)
  22. URL: https://www.riverbankcomputing.co.uk/software/sip/intro
  23. Source0: https://www.riverbankcomputing.com/static/Downloads/sip/%{version}/sip-%{version}%{?snap:.%{snap}}.tar.gz
  24. # extracted from sip.h, SIP_API_MAJOR_NR SIP_API_MINOR_NR defines
  25. Source1: macros.sip
  26. %global _sip_api_major 12
  27. %global _sip_api_minor 7
  28. %global _sip_api %{_sip_api_major}.%{_sip_api_minor}
  29. Source10: sip-wrapper.sh
  30. ## upstreamable patches
  31. # make install should not strip (by default), kills -debuginfo
  32. Patch50: sip-4.18-no_strip.patch
  33. # try not to rpath the world
  34. Patch51: sip-4.18-no_rpath.patch
  35. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  36. Provides: sip-api(%{_sip_api_major}) = %{_sip_api}
  37. Provides: sip-api(%{_sip_api_major})%{?_isa} = %{_sip_api}
  38. BuildRequires: python-rpm-macros
  39. BuildRequires: python3-devel
  40. BuildRequires: python3-rpm-macros
  41. BuildRequires: python-devel
  42. BuildRequires: python2-rpm-macros
  43. BuildRequires: sed
  44. %description
  45. SIP is a tool for generating bindings for C++ classes so that they can be
  46. accessed as normal Python classes. SIP takes many of its ideas from SWIG but,
  47. because it is specifically designed for C++ and Python, is able to generate
  48. tighter bindings. SIP is so called because it is a small SWIG.
  49. SIP was originally designed to generate Python bindings for KDE and so has
  50. explicit support for the signal slot mechanism used by the Qt/KDE class
  51. libraries. However, SIP can be used to generate Python bindings for any C++
  52. class library.
  53. %package devel
  54. Summary: Files needed to generate Python bindings for any C++ class library
  55. Summary(ja): Python/C++ インタフェース作成に必要なライブラリやヘッダファイル
  56. Group: programming
  57. Requires: %{name} = %{version}-%{release}
  58. Requires: %{name}-macros = %{version}-%{release}
  59. Requires: python-devel
  60. Provides: libsip-devel = %{version}-%{release}
  61. %description devel
  62. This package contains files needed to generate Python bindings for any C++
  63. classes library.
  64. %package pyqt5-sip
  65. Summary: %summary
  66. Group: programming
  67. Provides: python-pyqt5-sip-api(%{_sip_api_major}) = %{_sip_api}
  68. Provides: python-pyqt5-sip-api(%{_sip_api_major})%{?_isa} = %{_sip_api}
  69. %{?python_provide:%python_provide python-pyqt5-sip}
  70. %description pyqt5-sip
  71. %{summary}
  72. %package macros
  73. Summary: RPM macros for use when working with SIP
  74. Group: programming
  75. Requires: rpm
  76. # when arch->noarch happened
  77. Obsoletes: sip-macros < 4.15.5
  78. BuildArch: noarch
  79. %description macros
  80. This package contains RPM macros for use when working with SIP.
  81. It is used by both the sip-devel (python 2) and python3-sip-devel subpackages.
  82. %package -n python3-sip
  83. Summary: SIP - Python 3/C++ Bindings Generator
  84. Group: programming
  85. BuildRequires: python3-devel
  86. Provides: python3-sip-api(%{_sip_api_major}) = %{_sip_api}
  87. Provides: python3-sip-api(%{_sip_api_major})%{?_isa} = %{_sip_api}
  88. %description -n python3-sip
  89. This is the Python 3 build of SIP.
  90. SIP is a tool for generating bindings for C++ classes so that they can be
  91. accessed as normal Python 3 classes. SIP takes many of its ideas from SWIG but,
  92. because it is specifically designed for C++ and Python, is able to generate
  93. tighter bindings. SIP is so called because it is a small SWIG.
  94. SIP was originally designed to generate Python bindings for KDE and so has
  95. explicit support for the signal slot mechanism used by the Qt/KDE class
  96. libraries. However, SIP can be used to generate Python 3 bindings for any C++
  97. class library.
  98. %package -n python3-sip-devel
  99. Summary: Files needed to generate Python 3 bindings for any C++ class library
  100. Group: programming
  101. Requires: %{name}-macros = %{version}-%{release}
  102. Requires: python3-sip%{?_isa} = %{version}-%{release}
  103. Requires: python3-devel
  104. %description -n python3-sip-devel
  105. This package contains files needed to generate Python 3 bindings for any C++
  106. classes library.
  107. %package -n python3-pyqt5-sip
  108. Summary: SIP - Python 3/C++ Bindings Generator for pyqt5
  109. Group: programming
  110. BuildRequires: python3-devel
  111. Provides: python3-pyqt5-sip-api(%{_sip_api_major}) = %{_sip_api}
  112. Provides: python3-pyqt5-sip-api(%{_sip_api_major})%{?_isa} = %{_sip_api}
  113. %description -n python3-pyqt5-sip
  114. This is the Python 3 build of pyqt5-SIP.
  115. %debug_package
  116. %prep
  117. %setup -q
  118. %patch50 -p1 -b .no_strip
  119. %patch51 -p1 -b .no_rpath
  120. %build
  121. %ifarch x86_64 ppc
  122. OPT_FLAGS="%{optflags} -fPIC"
  123. %else
  124. OPT_FLAGS="%{optflags}"
  125. %endif
  126. mkdir %{_target_platform}-python3
  127. pushd %{_target_platform}-python3
  128. %{__python3} ../configure.py \
  129. -d %{python3_sitearch} \
  130. CXXFLAGS="${OPT_FLAGS}" CFLAGS="${OPT_FLAGS}" LFLAGS="%{?__global_ldflags}"
  131. make %{?_smp_mflags}
  132. popd
  133. mkdir %{_target_platform}
  134. pushd %{_target_platform}
  135. %{__python} ../configure.py \
  136. -d %{python_sitearch} \
  137. CFLAGS="${OPT_FLAGS}" CXXFLAGS="${OPT_FLAGS}" LFLAGS="%{?__global_ldflags}"
  138. make %{?_smp_mflags}
  139. popd
  140. mkdir %{_target_platform}-python2-pyqt5
  141. pushd %{_target_platform}-python2-pyqt5
  142. %{__python} ../configure.py \
  143. --sip-module=PyQt5.sip \
  144. -b %{_bindir} -d %{python_sitearch} -e %{_includedir}/python%{python_version} \
  145. CFLAGS+="%{optflags}" CXXFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}"
  146. make %{?_smp_mflags}
  147. popd
  148. mkdir %{_target_platform}-python3-pyqt5
  149. pushd %{_target_platform}-python3-pyqt5
  150. %{__python3} ../configure.py \
  151. --sip-module=PyQt5.sip \
  152. -b %{_bindir} -d %{python3_sitearch} -e %{_includedir}/python%{python3_version} \
  153. CXXFLAGS+="%{optflags}" CFLAGS+="%{optflags}" LFLAGS+="%{?__global_ldflags}"
  154. make %{?_smp_mflags}
  155. popd
  156. %install
  157. rm -rf %{buildroot}
  158. # Perform the Python 3 installation first, to avoid stomping over the Python 2
  159. # /usr/bin/sip:
  160. make install DESTDIR=%{buildroot} -C %{_target_platform}-python3
  161. make install DESTDIR=%{buildroot} -C %{_target_platform}-python3-pyqt5
  162. mkdir -p %{buildroot}%{_datadir}/python3-sip
  163. mv %{buildroot}%{_bindir}/sip %{buildroot}%{_bindir}/python3-sip
  164. ## toplevel __pycache__ creation is ... inconsistent
  165. ## rawhide makes one, f23 local builds do not, so let's *make* it consistent
  166. mkdir -p %{buildroot}%{python3_sitearch}/__pycache__/exclude_rpm_hack
  167. # Python 2 installation:
  168. make install DESTDIR=%{buildroot} -C %{_target_platform}
  169. make install DESTDIR=%{buildroot} -C %{_target_platform}-python2-pyqt5
  170. # sip-wrapper
  171. install %{SOURCE10} %{buildroot}%{_bindir}/sip-pyqt5
  172. sed -i -e 's|@SIP_MODULE@|PyQt5.sip|g' %{buildroot}%{_bindir}/sip-pyqt5
  173. mkdir -p %{buildroot}%{_datadir}/sip
  174. # Macros used by -devel subpackages:
  175. install -D -p -m644 %{SOURCE1} %{buildroot}%{rpm_macros_dir}/macros.sip
  176. %clean
  177. rm -rf $RPM_BUILD_ROOT
  178. %files
  179. %defattr(-, root, root, 755)
  180. %doc NEWS README
  181. %license LICENSE LICENSE-GPL2 LICENSE-GPL3
  182. %{python_sitearch}/sip.so
  183. %{_datadir}/sip/
  184. %{python_sitearch}/*.dist-info
  185. %files devel
  186. %{_bindir}/sip
  187. %{_bindir}/sip-pyqt5
  188. %{_bindir}/python3-sip
  189. %defattr(-, root, root, 755)
  190. %{python_inc}/sip.h
  191. %{python_sitearch}/sip*.py*
  192. %files pyqt5-sip
  193. %doc NEWS README
  194. %license LICENSE LICENSE-GPL2 LICENSE-GPL3
  195. %dir %{python_sitearch}/PyQt5/
  196. %{python_sitearch}/PyQt5/sip.*
  197. %{python_sitearch}/PyQt5_sip-%{version}.dist-info/
  198. %files macros
  199. %{rpm_macros_dir}/macros.sip
  200. %files -n python3-sip
  201. %doc NEWS README
  202. %license LICENSE LICENSE-GPL2 LICENSE-GPL3
  203. %{python3_sitearch}/sip.*
  204. %{python3_sitearch}/*.dist-info
  205. %files -n python3-sip-devel
  206. # Note that the "sip" binary is invoked by name in a few places higher up
  207. # in the KDE-Python stack; these will need changing to "python3-sip":
  208. %{python3_inc}/sip.h
  209. %{python3_sitearch}/sip*.py*
  210. %{python3_sitearch}/__pycache__/*
  211. %exclude %{python3_sitearch}/__pycache__/exclude_rpm_hack
  212. %files -n python3-pyqt5-sip
  213. %doc NEWS README
  214. %license LICENSE LICENSE-GPL2 LICENSE-GPL3
  215. %dir %{python3_sitearch}/PyQt5/
  216. %{python3_sitearch}/PyQt5/sip.*
  217. %{python3_sitearch}/PyQt5_sip-%{version}.dist-info/
  218. %changelog
  219. * Wed Apr 14 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.19.25-1
  220. - new upstream release.
  221. * Sat Aug 15 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.19.24-1
  222. - new upstream release.
  223. * Tue Oct 22 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.19.19-1
  224. - new upstream release.
  225. * Tue Jul 12 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.18-1
  226. - new upstream release.
  227. * Thu Jun 30 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.16.4-2
  228. - rebuild with gcc-5.4.0
  229. * Sat Nov 8 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.16.4-1
  230. - new upstream release
  231. * Mon May 05 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.15.5-1
  232. - new upstream release
  233. * Sun Dec 08 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.15.3-1
  234. - new upstream release
  235. * Sun Sep 08 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.14.7-1
  236. - new upstream release
  237. * Wed Jun 05 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.14.6-1
  238. - new upstream release
  239. * Sun Jul 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.13.3-1
  240. - new upstream release
  241. * Sat Feb 18 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.13.1-2
  242. - rebuild with python-2.7.2
  243. * Sat Jan 7 2012 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.13.1-1
  244. - new upstream release
  245. * Sun Jul 31 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.12.3-1
  246. - new upstream release
  247. * Sun Jan 30 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.12.1-1
  248. - new upstream release
  249. * Mon Oct 4 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 4.10.5-2
  250. - add gcc option "-fPIC" also on ppc
  251. * Sat Jul 24 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.10.5-1
  252. - new upstream release
  253. * Sun May 09 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.10.2-1
  254. - new upstream release
  255. * Wed Feb 03 2010 Shu KONNO <owa@bg.wakwak.com> 4.10-1
  256. - new upstream release
  257. * Wed Feb 03 2010 Shu KONNO <owa@bg.wakwak.com> 4.9.3-2
  258. - rebuilt with python-2.6.4
  259. * Wed Nov 25 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.9.3-1
  260. - new upstream release
  261. * Thu Oct 22 2009 Shu KONNO <owa@bg.wakwak.com> 4.9-1
  262. - new upstream release
  263. - added japanese summary
  264. - changed source url
  265. * Sat Aug 29 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.8.2-1
  266. - new upstream release
  267. - remove qt-devel dependency
  268. * Sun Jul 20 2008 Shu KONNO <owa@bg.wakwak.com> 4.7.1-1vl1
  269. - rebuilt with python-2.5.2
  270. - applied new versioning policy and spec in utf-8
  271. * Fri Nov 30 2007 Shu KONNO <owa@bg.wakwak.com> 4.7.1-0vl1
  272. - new upstream release
  273. - added gcc option "-fPIC" (if x86_64)
  274. * Wed Sep 5 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.7-0vl1
  275. - new upstream release
  276. - use qt qmake files
  277. * Sun May 27 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.4.5-0vl2
  278. - rebuilt with new toolchain
  279. * Sun Jun 11 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.4.5-0vl1
  280. - new upstream release
  281. - rebuilt with python 2.4.3
  282. - changed Group to Development/Languages
  283. * Sun Apr 03 2005 Shu KONNO <owa@bg.wakwak.com> 3.11.1-0vl2
  284. - Rebuild for python 2.4.1
  285. * Sat Jan 15 2005 Satoshi MACHINO <machino@vinelinux.org> 3.11.1-0vl1
  286. - built for VineLinux
  287. - new upstream version
  288. * Sat Dec 04 2004 Michael Scherer <misc@mandrake.org> 3.10.2-5mdk
  289. - Rebuild for new python
  290. * Wed Jun 9 2004 Götz Waschk <waschk@linux-mandrake.com> 3.10.2-4mdk
  291. - obsolete libsip10 too
  292. * Mon Jun 7 2004 Götz Waschk <waschk@linux-mandrake.com> 3.10.2-3mdk
  293. - drop library packages
  294. * Mon Jun 07 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 3.10.2-2mdk
  295. - fix build and install problems
  296. - drop .so.*, they no longer exist
  297. - use %%{py_ver} macro
  298. * Sat Jun 05 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 3.10.2-1mdk
  299. - 3.10.2
  300. * Fri Apr 23 2004 Götz Waschk <waschk@linux-mandrake.com> 3.10.1-1mdk
  301. - add sipconfig
  302. - major 11
  303. - add source URL
  304. - new version
  305. * Mon Sep 8 2003 Götz Waschk <waschk@linux-mandrake.com> 3.8-3mdk
  306. - fix buildrequires
  307. * Sun Sep 7 2003 Götz Waschk <waschk@linux-mandrake.com> 3.8-2mdk
  308. - fix buildrequires
  309. - move libsip.so to the lib package, as it's required by generated bindings
  310. - move sip to the devel package
  311. * Wed Aug 20 2003 Austin Acton <aacton@yorku.ca> 3.8-1mdk
  312. - 3.8
  313. * Sat Aug 9 2003 Austin Acton <aacton@yorku.ca> 3.6-8mdk
  314. - the one true fix (eat your heart out per oyvind :-) )
  315. * Fri Aug 08 2003 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 3.6-7mdk
  316. - really rebuild for new python (austin was the sucky one this time;)
  317. * Thu Aug 7 2003 Austin Acton <aacton@yorku.ca> 3.6-6mdk
  318. - python 2.3
  319. * Sat Jul 19 2003 Till Kamppeter <till@mandrakesoft.com> 3.6-5mdk
  320. - Rebuild
  321. * Fri Jun 20 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 3.6-4mdk
  322. - fix path to qt3 (lib64 issues)
  323. - use %%mklibname macro for -devel package
  324. * Tue May 27 2003 Austin Acton <aacton@yorku.ca> 3.6-3mdk
  325. - rebuild for rpm 4.2
  326. * Tue Apr 29 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 3.6-2mdk
  327. - added QPL to license
  328. * Tue Apr 29 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 3.6-1mdk
  329. - 3.6 (lib major 9)
  330. - cleanups
  331. - fix license
  332. - make --short-circuitable
  333. - use %%mklibname macro
  334. * Fri Jan 03 2003 Lenny Cartier <lenny@mandrakesoft.com> 3.5-1mdk
  335. - 3.5
  336. * Sat Aug 17 2002 Christian Belisle <cbelisle@mandrakesoft.com> 3.3.2-2mdk
  337. - fix Provides for libsip9.
  338. * Wed Jul 17 2002 Christian Belisle <cbelisle@mandrakesoft.com> 3.3.2-1mdk
  339. - 3.3.2
  340. - use the new sip's build script
  341. * Sat Jun 29 2002 Olivier Thauvin <thauvin@aerov.jussieu.fr> 3.2.4-1mdk
  342. - 3.2.4
  343. * Tue May 28 2002 Lenny Cartier <lenny@mandrakesoft.com> 3.2.2-2mdk
  344. - rebuild against new libstdc++
  345. * Mon May 13 2002 Lenny Cartier <lenny@mandrakesoft.com> 3.2.2-1mdk
  346. - 3.2.2
  347. * Tue May 07 2002 Lenny Cartier <lenny@mandrakesoft.com> 3.2.1-1mdk
  348. - 3.2.1
  349. * Mon Apr 08 2002 Christian Belisle <cbelisle@mandrakesoft.com> 3.1-1mdk
  350. - version 3.1 (lib major 8).
  351. - update URL.
  352. * Fri Jan 11 2002 Lenny Cartier <lenny@mandrakesoft.com> 3.0-3mdk
  353. - merge with RA <ralf_ahlbrink@web.de> mods :
  354. - added BuildRequires: libpython2.2-devel
  355. * Fri Nov 30 2001 Yves Duret <yduret@mandrakesoft.com> 3.0-1mdk
  356. - version 3.0 (lib major 7)
  357. * Fri Nov 30 2001 Yves Duret <yduret@mandrakesoft.com> 2.5-2mdk
  358. - rebuild against libpng3
  359. - %%makeinstall_std
  360. - std %%build step (macros..)
  361. - added %%dir %%{_includedir}/sip in -devel package
  362. * Mon Sep 03 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.5-1mdk
  363. - 2.5
  364. * Mon May 14 2001 Yves BAILLY <ybailly@mandrakesoft.com> 2.4-3mdk
  365. - fixed some errors in spec file (sorry, my first package)
  366. * Mon May 14 2001 Yves BAILLY <ybailly@mandrakesoft.com> 2.4-2mdk
  367. - fixed the Python dependency (>= 2.0 instead of = 2.0)
  368. * Mon May 14 2001 Yves BAILLY <ybailly@mandrakesoft.com> 2.4-1mdk
  369. - upgrade to version 2.4
  370. * Tue Mar 20 2001 David BAUDENS <baudens@mandrakesoft.com> 2.3-2mdk
  371. - Rebuild against Qt 2.3.0
  372. * Wed Feb 21 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.3-1mdk
  373. - updated to 2.3
  374. * Mon Feb 12 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.2-1mdk
  375. - used srpm from Gerard Vermeulen <gvermeul@labs.polycnrs-gre.fr>
  376. - built on Mandrake-7.2 following Mandrake RPM guidelines