sip-vl.spec 15 KB

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