sip-vl.spec 13 KB

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