gmp-vl.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. #
  2. # Important for %{ix86}:
  3. # This rpm has to be build on a CPU with sse2 support like Pentium 4 !
  4. #
  5. %ifarch %{ix86}
  6. %define SSE2 1
  7. %else
  8. %define SSE2 0
  9. %endif
  10. # Don't you want to build a libraries using SSE2?
  11. %{?_without_sse2%define SSE2 0}
  12. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  13. Summary: A GNU arbitrary precision library.
  14. Summary(ja): GNU 多倍長演算ライブラリ
  15. Name: gmp
  16. Version: 4.3.2
  17. Release: 1%{?_dist_release}
  18. URL: http://gmplib.org/
  19. Source: ftp://ftp.gnu.org/pub/gnu/gmp/gmp-%{version}.tar.bz2
  20. Source2: gmp.h
  21. Source3: gmp-mparam.h
  22. Patch0: gmp-4.0.1-s390.patch
  23. License: LGPLv3+
  24. Group: System Environment/Libraries
  25. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  26. BuildRequires: autoconf libtool
  27. Obsoletes: gmp4
  28. Vendor: Project Vine
  29. Distribution: Vine Linux
  30. Packager: inagaki, kenta
  31. %description
  32. The gmp package contains GNU MP, a library for arbitrary precision
  33. arithmetic, signed integers operations, rational numbers and floating
  34. point numbers. GNU MP is designed for speed, for both small and very
  35. large operands. GNU MP is fast because it uses fullwords as the basic
  36. arithmetic type, it uses fast algorithms, it carefully optimizes
  37. assembly code for many CPUs' most common inner loops, and it generally
  38. emphasizes speed over simplicity/elegance in its operations.
  39. Install the gmp package if you need a fast arbitrary precision
  40. library.
  41. %package devel
  42. Summary: Development tools for the GNU MP arbitrary precision library.
  43. Group: Development/Libraries
  44. Requires: %{name} = %{version}-%{release}
  45. Requires(post): /sbin/install-info
  46. Requires(preun): /sbin/install-info
  47. Obsoletes: gmp4-devel
  48. %description devel
  49. The libraries, header files and documentation for using the GNU MP
  50. arbitrary precision library in applications.
  51. If you want to develop applications which will use the GNU MP library,
  52. you'll need to install the gmp-devel package. You'll also need to
  53. install the gmp package.
  54. %package static
  55. Summary: Development tools for the GNU MP arbitrary precision library
  56. Group: Development/Libraries
  57. Requires: %{name}-devel = %{version}-%{release}
  58. %description static
  59. The static libraries for using the GNU MP arbitrary precision library
  60. in applications.
  61. %package -n compat32-%{name}
  62. Summary: A GNU arbitrary precision library.
  63. Group: System Environment/Libraries
  64. Requires: %{name} = %{version}-%{release}
  65. %description -n compat32-%{name}
  66. The gmp package contains GNU MP, a library for arbitrary precision
  67. arithmetic, signed integers operations, rational numbers and floating
  68. point numbers. GNU MP is designed for speed, for both small and very
  69. large operands. GNU MP is fast because it uses fullwords as the basic
  70. arithmetic type, it uses fast algorithms, it carefully optimizes
  71. assembly code for many CPUs' most common inner loops, and it generally
  72. emphasizes speed over simplicity/elegance in its operations.
  73. Install the gmp package if you need a fast arbitrary precision
  74. library.
  75. %package -n compat32-%{name}-devel
  76. Summary: Development tools for the GNU MP arbitrary precision library.
  77. Group: Development/Libraries
  78. Requires: compat32-%{name} = %{version}-%{release}
  79. Requires: %{name}-devel = %{version}-%{release}
  80. %description -n compat32-%{name}-devel
  81. The libraries, header files and documentation for using the GNU MP
  82. arbitrary precision library in applications.
  83. If you want to develop applications which will use the GNU MP library,
  84. you'll need to install the gmp-devel package. You'll also need to
  85. install the gmp package.
  86. %package -n compat32-%{name}-static
  87. Summary: Development tools for the GNU MP arbitrary precision library
  88. Group: Development/Libraries
  89. Requires: compat32-%{name}-devel = %{version}-%{release}
  90. %description -n compat32-%{name}-static
  91. The static libraries for using the GNU MP arbitrary precision library
  92. in applications.
  93. %prep
  94. %setup -q
  95. %patch0 -p1
  96. %build
  97. autoreconf -if
  98. if as --help | grep -q execstack; then
  99. # the object files do not require an executable stack
  100. export CCAS="gcc -c -Wa,--noexecstack"
  101. fi
  102. mkdir base
  103. cd base
  104. ln -s ../configure .
  105. %configure --enable-mpbsd --enable-cxx
  106. perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool
  107. export LD_LIBRARY_PATH=`pwd`/.libs
  108. make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
  109. cd ..
  110. %if %{SSE2}
  111. %define _host pentium4-vine-linux
  112. mkdir build-sse2
  113. cd build-sse2
  114. ln -s ../configure .
  115. CFLAGS="%{optflags} -march=pentium4"
  116. %configure --enable-mpbsd --enable-cxx
  117. perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool
  118. export LD_LIBRARY_PATH=`pwd`/.libs
  119. make %{?_smp_mflags}
  120. unset CFLAGS
  121. cd ..
  122. %endif
  123. %install
  124. [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
  125. cd base
  126. export LD_LIBRARY_PATH=`pwd`/.libs
  127. make install DESTDIR=$RPM_BUILD_ROOT
  128. install -m 644 gmp-mparam.h ${RPM_BUILD_ROOT}%{_includedir}
  129. rm -f $RPM_BUILD_ROOT%{_libdir}/lib{gmp,mp,gmpxx}.la
  130. rm -f $RPM_BUILD_ROOT%{_infodir}/dir
  131. /sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
  132. ln -sf libgmpxx.so.4 $RPM_BUILD_ROOT%{_libdir}/libgmpxx.so
  133. cd ..
  134. %if %{SSE2}
  135. cd build-sse2
  136. export LD_LIBRARY_PATH=`pwd`/.libs
  137. mkdir $RPM_BUILD_ROOT%{_libdir}/sse2
  138. install -m 755 .libs/libgmp.so.3.* $RPM_BUILD_ROOT%{_libdir}/sse2
  139. cp -a .libs/libgmp.so.3 $RPM_BUILD_ROOT%{_libdir}/sse2
  140. chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmp.so.3
  141. install -m 755 .libs/libgmpxx.so.4.* $RPM_BUILD_ROOT%{_libdir}/sse2
  142. cp -a .libs/libgmpxx.so.4 $RPM_BUILD_ROOT%{_libdir}/sse2
  143. chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmpxx.so.4
  144. install -m 755 .libs/libmp.so.3.* $RPM_BUILD_ROOT%{_libdir}/sse2
  145. cp -a .libs/libmp.so.3 $RPM_BUILD_ROOT%{_libdir}/sse2
  146. chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libmp.so.3
  147. cd ..
  148. %endif
  149. # Rename gmp.h to gmp-<arch>.h and gmp-mparam.h to gmp-mparam-<arch>.h to
  150. # avoid file conflicts on multilib systems and install wrapper include files
  151. # gmp.h and gmp-mparam-<arch>.h
  152. basearch=%{_arch}
  153. # always use i386 for iX86
  154. %ifarch %{ix86}
  155. basearch=i386
  156. %endif
  157. # always use arm for arm*
  158. %ifarch %{arm}
  159. basearch=arm
  160. %endif
  161. # Rename files and install wrappers
  162. mv %{buildroot}/%{_includedir}/gmp.h %{buildroot}/%{_includedir}/gmp-${basearch}.h
  163. install -m644 %{SOURCE2} %{buildroot}/%{_includedir}/gmp.h
  164. mv %{buildroot}/%{_includedir}/gmp-mparam.h %{buildroot}/%{_includedir}/gmp-mparam-${basearch}.h
  165. install -m644 %{SOURCE3} %{buildroot}/%{_includedir}/gmp-mparam.h
  166. %check
  167. %ifnarch ppc
  168. cd base
  169. export LD_LIBRARY_PATH=`pwd`/.libs
  170. make %{?_smp_mflags} check
  171. cd ..
  172. %endif
  173. %if %{SSE2}
  174. cd build-sse2
  175. export LD_LIBRARY_PATH=`pwd`/.libs
  176. make %{?_smp_mflags} check
  177. cd ..
  178. %endif
  179. %post -p /sbin/ldconfig
  180. %postun -p /sbin/ldconfig
  181. %post devel
  182. /sbin/install-info %{_infodir}/gmp.info.gz %{_infodir}/dir
  183. %preun devel
  184. if [ "$1" = 0 ]; then
  185. /sbin/install-info --delete %{_infodir}/gmp.info.gz %{_infodir}/dir
  186. fi
  187. %post -n compat32-%{name} -p /sbin/ldconfig
  188. %postun -n compat32-%{name} -p /sbin/ldconfig
  189. %clean
  190. [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
  191. %files
  192. %defattr(-,root,root,-)
  193. %doc COPYING COPYING.LIB NEWS README
  194. %{_libdir}/libgmp.so.*
  195. %{_libdir}/libmp.so.*
  196. %{_libdir}/libgmpxx.so.*
  197. %if %{SSE2}
  198. %{_libdir}/sse2/*
  199. %endif
  200. %files devel
  201. %defattr(-,root,root,-)
  202. %{_libdir}/libmp.so
  203. %{_libdir}/libgmp.so
  204. %{_libdir}/libgmpxx.so
  205. #{_libdir}/libmpfr.a
  206. %{_includedir}/*.h
  207. %{_infodir}/gmp.info*
  208. #{_infodir}/mpfr.info*
  209. %files static
  210. %defattr(-,root,root,-)
  211. %doc README
  212. %{_libdir}/libmp.a
  213. %{_libdir}/libgmp.a
  214. %{_libdir}/libgmpxx.a
  215. # compat32
  216. %if %{build_compat32}
  217. %files -n compat32-%{name}
  218. %defattr(-,root,root,-)
  219. %{_libdir}/libgmp.so.*
  220. %{_libdir}/libmp.so.*
  221. %{_libdir}/libgmpxx.so.*
  222. %if %{SSE2}
  223. %{_libdir}/sse2/*
  224. %endif
  225. %files -n compat32-%{name}-devel
  226. %defattr(-,root,root,-)
  227. %{_libdir}/libmp.so
  228. %{_libdir}/libgmp.so
  229. %{_libdir}/libgmpxx.so
  230. #{_libdir}/libmpfr.a
  231. %files -n compat32-%{name}-static
  232. %defattr(-,root,root,-)
  233. %doc README
  234. %{_libdir}/libmp.a
  235. %{_libdir}/libgmp.a
  236. %{_libdir}/libgmpxx.a
  237. %endif
  238. %changelog
  239. * Tue Apr 19 2011 NAKAMURA Kenta <kenta@vinelinux.org> 4.3.2-1
  240. - new upstream release
  241. * Sun Apr 17 2011 Shu KONNO <owa@bg.wakwak.com> 4.3.1-2
  242. - rebuilt with rpm-4.8.1-3
  243. * Sat Nov 28 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.3.1-1
  244. - new upstream release
  245. - split static libraries to subpackage
  246. * Sun Jun 28 2009 NAKAMURA Kenta <kenta@vinelinux.org> 4.2.2-5
  247. - added compat32 package for x86_64 arch support
  248. - run autoreconf to get autotools right
  249. * Mon May 19 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-4
  250. - applied new versioning policy
  251. - added Patch3 from upstream
  252. * Wed Oct 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-3vl2
  253. - remove --enable-mpfr
  254. (mpfr has been splitted since gmp 4.2)
  255. * Wed Oct 24 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.2.2-3vl1
  256. - new upstream release
  257. * Mon Sep 24 2007 Ivana Varekova <varekova@redhat.com> 4.2.2-3
  258. - fix libgmpxx.so link
  259. * Thu Sep 20 2007 Ivana Varekova <varekova@redhat.com> 4.2.2-2
  260. - fix check tag
  261. * Thu Nov 2 2006 Thomas Woerner <twoerner@redhat.com> 4.1.4-10
  262. - fixed arch order in gmp.h and gmp-mparam.h wrapper for all architectures
  263. - re-include libraries using SSE2 on x86 arch
  264. - updated URL
  265. * Wed May 09 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1.4-6vl2
  266. - rebuilt with new toolchain
  267. * Sat Feb 11 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.1.4-6vl1
  268. - new upstream release
  269. * Mon Apr 18 2005 Thomas Woerner <twoerner@redhat.com> 4.1.4-6
  270. - fixed __setfpucw call in mpfr-test.h
  271. * Sun Sep 26 2004 Florian La Roche <Florian.LaRoche@redhat.de>
  272. - disable ppc64 patch, now fixed upstream
  273. * Wed Mar 31 2004 Thomas Woerner <twoerner@redhat.com> 4.1.2-14
  274. - dropped RPATH (#118506)
  275. - exclude libraries using SSE2 in default settings.
  276. * Fri Mar 12 2004 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 4.1.2-13vl1
  277. - modified for Vine
  278. * Mon Jan 20 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1-1vl3
  279. - added Obsoletes: gmp4(-devel)
  280. * Wed Jan 15 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 4.1-1vl2
  281. - rebuilt against new toolchain
  282. * Fri May 31 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org>
  283. - modified for Vine
  284. * Sat May 25 2002 Florian La Roche <Florian.LaRoche@redhat.de>
  285. - update to version 4.1
  286. - patch s390 gmp-mparam.h to match other archs.
  287. * Thu May 23 2002 Tim Powers <timp@redhat.com>
  288. - automated rebuild
  289. * Mon Mar 11 2002 Trond Eivind Glomsrød <teg@redhat.com> 4.0.1-3
  290. - Use standard %%configure macro and edit %%{_tmppath}
  291. * Tue Feb 26 2002 Trond Eivind Glomsrød <teg@redhat.com> 4.0.1-2
  292. - Rebuild
  293. * Tue Jan 22 2002 Florian La Roche <Florian.LaRoche@redhat.de>
  294. - update to 4.0.1
  295. - bzip2 src
  296. * Wed Jan 09 2002 Tim Powers <timp@redhat.com>
  297. - automated rebuild
  298. * Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
  299. - Bump release + rebuild.
  300. * Mon Feb 05 2001 Philipp Knirsch <pknirsch@redhat.de>
  301. - Fixed bugzilla bug #25515 where GMP wouldn't work on IA64 as IA64 is not
  302. correctly identified as a 64 bit platform.
  303. * Mon Dec 18 2000 Preston Brown <pbrown@redhat.com>
  304. - include bsd mp library
  305. * Tue Oct 17 2000 Florian La Roche <Florian.LaRoche@redhat.de>
  306. - update to 3.1.1
  307. * Sun Sep 3 2000 Florian La Roche <Florian.LaRoche@redhat.com>
  308. - update to 3.1
  309. * Sat Aug 19 2000 Preston Brown <pbrown@redhat.com>
  310. - devel subpackage depends on main package so that .so symlink is OK.
  311. * Thu Jul 13 2000 Prospector <bugzilla@redhat.com>
  312. - automatic rebuild
  313. * Sat Jun 3 2000 Nalin Dahyabhai <nalin@redhat.com>
  314. - switch to the configure and makeinstall macros
  315. - FHS-compliance fixing
  316. - move docs to non-devel package
  317. * Fri Apr 28 2000 Bill Nottingham <notting@redhat.com>
  318. - libtoolize for ia64
  319. * Fri Apr 28 2000 Florian La Roche <Florian.LaRoche@redhat.com>
  320. - update to 3.0.1
  321. * Thu Apr 27 2000 Jakub Jelinek <jakub@redhat.com>
  322. - sparc64 fixes for 3.0
  323. * Wed Apr 26 2000 Florian La Roche <Florian.LaRoche@redhat.com>
  324. - update to 3.0
  325. * Mon Feb 14 2000 Matt Wilson <msw@redhat.com>
  326. - #include <string.h> in files that use string functions
  327. * Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
  328. - fix description and summary
  329. * Mon Dec 06 1999 Michael K. Johnson <johnsonm@redhat.com>
  330. - s/GPL/LGPL/
  331. - build as non-root (#7604)
  332. * Mon Sep 06 1999 Jakub Jelinek <jj@ultra.linux.cz>
  333. - merge in some debian gmp fixes
  334. - Ulrich Drepper's __gmp_scale2 fix
  335. - my mpf_set_q fix
  336. - sparc64 fixes
  337. * Wed Apr 28 1999 Cristian Gafton <gafton@redhat.com>
  338. - add sparc patch for PIC handling
  339. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  340. - auto rebuild in the new build environment (release 8)
  341. * Thu Feb 11 1999 Michael Johnson <johnsonm@redhat.com>
  342. - include the private header file gmp-mparam.h because several
  343. apps seem to assume that they are building against the gmp
  344. source tree and require it. Sigh.
  345. * Tue Jan 12 1999 Michael K. Johnson <johnsonm@redhat.com>
  346. - libtoolize to work on arm
  347. * Thu Sep 10 1998 Cristian Gafton <gafton@redhat.com>
  348. - yet another touch of the spec file
  349. * Wed Sep 2 1998 Michael Fulbright <msf@redhat.com>
  350. - looked over before inclusion in RH 5.2
  351. * Sat May 24 1998 Dick Porter <dick@cymru.net>
  352. - Patch Makefile.in, not Makefile
  353. - Don't specify i586, let configure decide the arch
  354. * Sat Jan 24 1998 Marc Ewing <marc@redhat.com>
  355. - started with package from Toshio Kuratomi <toshiok@cats.ucsc.edu>
  356. - cleaned up file list
  357. - fixed up install-info support