avogadro-vl.spec 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. %define _qt4_version %(pkg-config --modversion --silence-errors Qt 2>/dev/null || echo 4.7.2)
  2. %define _qt4_prefix %(pkg-config --variable prefix --silence-errors Qt 2>/dev/null || echo %{_libdir}/qt-%{qt4_ver})
  3. %define ENABLE_TESTS -DENABLE_TESTS:BOOL=ON
  4. Name: avogadro
  5. Summary: An advanced molecular editor for chemical purposes
  6. Version: 1.0.1
  7. Release: 11%{?_dist_release}
  8. Group: Applications/Editors
  9. License: GPLv2
  10. URL: http://avogadro.openmolecules.net/
  11. Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
  12. # fix FTBFS with SIP 4.11 (Gentoo#335644)
  13. # patch submitted: http://bugs.gentoo.org/attachment.cgi?id=247308 (upstream is
  14. # CCed on the Gentoo bug)
  15. Patch0: avogadro-1.0.1-sip411.patch
  16. # fix crash with current SIP and Python 2.7 (#642248)
  17. Patch1: avogadro-1.0.1-pycapsule.patch
  18. BuildRequires: cmake >= 2.6.0
  19. BuildRequires: qt4-devel >= 4.5.1
  20. BuildRequires: qt4-tools
  21. BuildRequires: eigen2-devel >= 2.0.3
  22. BuildRequires: openbabel-devel >= 2.2.2
  23. BuildRequires: libboost-devel >= 1.35
  24. BuildRequires: libboost-python >= 1.35
  25. BuildRequires: glew-devel >= 1.5.0
  26. BuildRequires: desktop-file-utils
  27. BuildRequires: docbook-utils
  28. BuildRequires: sip-devel >= 4.11
  29. BuildRequires: numpy
  30. Requires: %{name}-libs = %{version}-%{release}
  31. %description
  32. An advanced molecular editor designed for
  33. cross-platform use in computational chemistry,
  34. molecular modeling, bioinformatics, materials science,
  35. and related areas, which offers flexible rendering and
  36. a powerful plugin architecture.
  37. %package libs
  38. Summary: Shared libraries for Avogadro
  39. Summary(ja): Avogadro の共用ライブラリ
  40. Group: System Environment/Libraries
  41. Requires: sip
  42. %description libs
  43. This package contains the shared libraries for the
  44. molecular editor Avogadro.
  45. %package devel
  46. Summary: Development files for Avogadro
  47. Summary(ja): Avogadro の開発用ファイル
  48. Group: Development/Libraries
  49. Requires: %{name}-libs = %{version}-%{release}
  50. Requires: qt4-devel = %{_qt4_version}
  51. Requires: eigen2-devel >= 2.0.3
  52. Requires: glew-devel >= 1.5.0
  53. %description devel
  54. This package contains files to develop applications using
  55. Avogadros libraries.
  56. %prep
  57. %setup -q
  58. %patch0 -p1 -b .sip411
  59. %patch1 -p1 -b .pycapsule
  60. # nuke unpatched copy, use working version included in cmake instead -- Rex
  61. rm -f cmake/modules/FindPythonLibs.cmake
  62. %build
  63. mkdir -p %{_target_platform}
  64. pushd %{_target_platform}
  65. cmake -Wno-dev \
  66. -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
  67. -DBIN_INSTALL_DIR:PATH=bin \
  68. -DLIB_INSTALL_DIR:PATH=%{_lib} \
  69. -DENABLE_GLSL:BOOL=ON \
  70. -DENABLE_PYTHON:BOOL=ON \
  71. %{?ENABLE_TESTS} ..
  72. popd
  73. make %{?_smp_mflags} -C %{_target_platform}
  74. %install
  75. rm -rf $RPM_BUILD_ROOT
  76. make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}
  77. %check
  78. desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/avogadro.desktop
  79. # all of these currently require an active X session, so will fail
  80. # in mock
  81. %{?ENABLE_TESTS:make test -C %{_target_platform} ||:}
  82. %post libs -p /sbin/ldconfig
  83. %postun libs -p /sbin/ldconfig
  84. %files
  85. %defattr(-,root,root,-)
  86. %doc AUTHORS ChangeLog COPYING
  87. %{_bindir}/avogadro
  88. %{_bindir}/avopkg
  89. # TODO: %lang'ify stuff under %%{_datadir}/avogadro/i18n/
  90. %{_datadir}/avogadro/
  91. %{_datadir}/pixmaps/avogadro-icon.png
  92. %{_datadir}/applications/avogadro.desktop
  93. %{_mandir}/man1/avogadro.1*
  94. %{_mandir}/man1/avopkg.1*
  95. %files devel
  96. %defattr(-,root,root,-)
  97. %{_includedir}/avogadro/
  98. %{_libdir}/libavogadro.so
  99. %{_libdir}/avogadro/*.cmake
  100. %{_libdir}/avogadro/1_0/*.cmake
  101. # these look like dups of system copies?, take a closer look and/or ask upstream -- Rex
  102. %{_libdir}/avogadro/1_0/cmake/
  103. %{_qt4_prefix}/mkspecs/features/avogadro.prf
  104. %files libs
  105. %defattr(-,root,root,-)
  106. %{python_sitelib}/Avogadro.so
  107. %{_datadir}/libavogadro/
  108. %{_libdir}/libavogadro.so.1*
  109. %dir %{_libdir}/avogadro/
  110. %dir %{_libdir}/avogadro/1_0/
  111. %{_libdir}/avogadro/1_0/colors/
  112. %{_libdir}/avogadro/1_0/extensions/
  113. %{_libdir}/avogadro/1_0/engines/
  114. %{_libdir}/avogadro/1_0/tools/
  115. %changelog
  116. * Tue Sep 04 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.0.1-11
  117. - rebuild with qt4-4.8.2
  118. * Sun Feb 19 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.0.1-10
  119. - rebuild with python-2.7.2
  120. * Tue Jan 10 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 1.0.1-9
  121. - rebuild with qt4-4.8.0 and glew-1.7.0
  122. * Wed Mar 9 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.0.1-8
  123. - rebuilt with qt4-4.7.2
  124. - BR: qt4-tools instead of qt4-designer
  125. * Sun Feb 27 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.0.1-7
  126. - added BR: libboost-python
  127. - added R: glew-devel, eigen2-devel to devel package
  128. * Wed Feb 23 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.0.1-6
  129. - rebuilt with qt4-4.7.1
  130. - added Patch0 and 1 from Fedora
  131. * Tue Jan 18 2011 Shu KONNO <owa@bg.wakwak.com> - 1.0.1-5
  132. - rebuilt with libboost-1.45.0
  133. * Fri Aug 20 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.0.1-4
  134. - Initial build for Vine Linux
  135. * Wed Aug 04 2010 Rahul Sundaram <sundaram@fedoraproject.org> - 1.0.1-3
  136. - Rebuild for Boost soname bump
  137. - Update to match current guidelines
  138. * Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 1.0.1-2
  139. - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
  140. * Mon May 24 2010 Rex Dieter <rdieter@fedoraproject.org> - 1.0.1-1
  141. - avogadro-1.0.1
  142. - -devel: move cmake-related files here
  143. - -devel: Req: qt4-devel
  144. - %%files: track lib sonames
  145. - %%check section
  146. * Wed Feb 10 2010 Kevin Kofler <Kevin@tigcc.ticalc.org> - 1.0.0-6
  147. - reenable plugin builds and libs subpackage
  148. - fix their build with sip 4.10
  149. * Fri Jan 08 2010 Sebastian Dziallas <sebastian@when.com> - 1.0.0-5
  150. - disable plugin builds and libs subpackage
  151. * Thu Jan 07 2010 Rex Dieter <rdieter@fedoraproject.org> - 1.0.0-4
  152. - rebuild (sip)
  153. * Mon Nov 23 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.0.0-3
  154. - rebuild (for qt-4.6.0-rc1, f13+)
  155. * Mon Nov 16 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.0.0-2
  156. - -libs: Requires: sip-api(%%_sip_api_major) >= %%_sip_api (#538124)
  157. - Requires: %%{name}-libs ...
  158. * Thu Oct 29 2009 Sebastian Dziallas <sebastian@when.com> 1.0.0-1
  159. - update to new upstream release
  160. * Tue Oct 20 2009 Rex Dieter <rdieter@fedoraproject.org> 0.9.8-3
  161. - rebuild (eigen2)
  162. * Sat Sep 26 2009 Sebastian Dziallas <sebastian@when.com> 0.9.8-2
  163. - fix typo in file list
  164. * Sat Sep 26 2009 Sebastian Dziallas <sebastian@when.com> 0.9.8-1
  165. - update to new upstream release
  166. - enable python and glsl support again
  167. * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-2
  168. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  169. * Sat Jun 06 2009 Sebastian Dziallas <sebastian@when.com> 0.9.6-1
  170. - new upstream release to fix issue with qt 4.5.0 and earlier
  171. * Wed Jun 03 2009 Sebastian Dziallas <sebastian@when.com> 0.9.5-3
  172. - remove remaining python parts
  173. - fix files section finally
  174. * Wed Jun 03 2009 Sebastian Dziallas <sebastian@when.com> 0.9.5-2
  175. - disable python and glsl for now
  176. - fix files section
  177. * Wed Jun 03 2009 Sebastian Dziallas <sebastian@when.com> 0.9.5-1
  178. - update to new release
  179. * Tue May 12 2009 Sebastian Dziallas <sebastian@when.com> 0.9.4-1
  180. - update to new release
  181. * Fri Apr 10 2009 Sebastian Dziallas <sebastian@when.com> 0.9.3-1
  182. - update to new release
  183. * Sat Mar 21 2009 Sebastian Dziallas <sebastian@when.com> 0.9.2-2
  184. - get desktop file properly installed
  185. * Sat Mar 14 2009 Sebastian Dziallas <sebastian@when.com> 0.9.2-1
  186. - update to new release
  187. * Wed Feb 25 2009 Sebastian Dziallas <sebastian@when.com> 0.9.1-1
  188. - update to new release
  189. * Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-2
  190. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  191. * Thu Jan 22 2009 Sebastian Dziallas <sebastian@when.com> 0.9.0-1
  192. - update to new release
  193. * Sun Sep 14 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-6
  194. - add handbook to docs
  195. * Sun Sep 14 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-5
  196. - add build requirements and fix group names
  197. * Wed Aug 13 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-4
  198. - fix typos
  199. * Sat Aug 9 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-3
  200. - reorganize spec file
  201. * Sat Aug 9 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-2
  202. - rename shared library package and structure spec file
  203. * Sun Aug 3 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-1
  204. - initial pacakging release based on PackMan release