openbabel-vl.spec 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. %define perl_vendorarch %(eval "`perl -V:installvendorarch`"; echo $installvendorarch)
  2. %define perl_archlib %(eval "`perl -V:archlib`"; echo $archlib)
  3. %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
  4. %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
  5. %define ruby_arch %(ruby -rrbconfig -e 'puts Config::CONFIG["archdir"]')
  6. Name: openbabel
  7. Version: 2.2.3
  8. Release: 3%{?_dist_release}
  9. Summary: Chemistry software file format converter
  10. Summary(ja): 化学ソフトデータファイル変換プログラム
  11. License: GPL
  12. Group: Applications/Edutainment
  13. URL: http://openbabel.sourceforge.net/
  14. Source: http://dl.sourceforge.net/sourceforge/openbabel/%{name}-%{version}.tar.gz
  15. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  16. BuildRequires: inchi-devel
  17. BuildRequires: libtool
  18. BuildRequires: libxml2-devel
  19. BuildRequires: perl
  20. BuildRequires: python
  21. BuildRequires: python-devel
  22. BuildRequires: ruby
  23. BuildRequires: ruby-devel
  24. BuildRequires: swig
  25. #TODO: enable when GUI is functional
  26. #BuildRequires: wxGTK-devel
  27. BuildRequires: zlib-devel
  28. Distribution: Vine Linux
  29. Vendor: Project Vine
  30. Packager: inagaki
  31. %description
  32. Open Babel is a free, open-source version of the Babel chemistry file
  33. translation program. Open Babel is a project designed to pick up where
  34. Babel left off, as a cross-platform program and library designed to
  35. interconvert between many file formats used in molecular modeling,
  36. computational chemistry, and many related areas.
  37. Open Babel includes two components, a command-line utility and a C++
  38. library. The command-line utility is intended to be used as a replacement
  39. for the original babel program, to translate between various chemical file
  40. formats. The C++ library includes all of the file-translation code as well
  41. as a wide variety of utilities to foster development of other open source
  42. scientific software.
  43. %package devel
  44. Summary: Development tools for programs which will use the Open Babel library
  45. Summary(ja): %{name}の開発用ヘッダファイル
  46. Group: Development/Libraries
  47. Requires: %{name} = %{version}-%{release}
  48. Requires: pkgconfig
  49. %description devel
  50. The %{name}-devel package includes the header files and libraries
  51. necessary for developing programs using the Open Babel library.
  52. If you are going to develop programs which will use this library
  53. you should install %{name}-devel. You'll also need to have the
  54. %{name} package installed.
  55. %description devel -l ja
  56. %{name}の開発用ヘッダファイル
  57. %package -n perl-%{name}
  58. Summary: Perl wrapper for the Open Babel library
  59. Summary(ja): Open Babel ライブラリの Perl ラッパー
  60. Group: Development/Libraries
  61. Requires: perl > %(eval "`%{__perl} -V:version`"; echo $version)
  62. Obsoletes: %{name}-perl < 2.2.0
  63. Provides: %{name}-perl = %{version}-%{release}
  64. %description -n perl-%{name}
  65. Perl wrapper for the Open Babel library.
  66. %description -n perl-%{name} -l ja
  67. Open Babel ライブラリの Perl ラッパーです.
  68. %package -n python-%{name}
  69. Group: Development/Libraries
  70. Summary: Python wrapper for the Open Babel library
  71. Summary(ja): Open Babel ライブラリの Python ラッパー
  72. Obsoletes: %{name}-python < 2.2.0
  73. Provides: %{name}-python = %{version}-%{release}
  74. %description -n python-%{name}
  75. Python wrapper for the Open Babel library.
  76. %description -n python-%{name} -l ja
  77. Open Babel ライブラリの Python ラッパー
  78. %package -n ruby-%{name}
  79. Summary: Ruby wrapper for the Open Babel library
  80. Summary(ja): Open Babel ライブラリの Ruby ラッパー
  81. Group: Development/Libraries
  82. Requires: ruby >= 1.8
  83. Requires: %{name} = %{version}-%{release}
  84. %description -n ruby-%{name}
  85. Open Babel ライブラリの Ruby ラッパー
  86. %prep
  87. %setup -q
  88. chmod 644 src/formats/{mmcif,fchk}format.cpp
  89. %build
  90. autoreconf --force --install
  91. %configure --enable-shared=yes --enable-static=no --disable-inchi
  92. make %{?_smp_mflags}
  93. pushd scripts/perl
  94. LD_LIBRARY_PATH=../../src/.libs perl Makefile.PL INSTALLDIRS="vendor"
  95. make %{?_smp_mflags} OPTIMIZE="$RPM_OPT_FLAGS"
  96. popd
  97. pushd scripts/python
  98. python setup.py build
  99. popd
  100. pushd scripts/ruby
  101. ruby extconf.rb --with-openbabel-include=../../include --with-openbabel-lib=../../src/.libs
  102. make %{?_smp_mflags}
  103. popd
  104. %install
  105. rm -rf $RPM_BUILD_ROOT
  106. make install DESTDIR=$RPM_BUILD_ROOT
  107. rm -f $RPM_BUILD_ROOT%{_libdir}{,/%{name}}/*.la
  108. pushd scripts/perl
  109. make install DESTDIR=$RPM_BUILD_ROOT
  110. popd
  111. rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
  112. rm -f $RPM_BUILD_ROOT%{perl_vendorarch}/*/Chemistry/OpenBabel/{.packlist,OpenBabel.bs}
  113. chmod 755 $RPM_BUILD_ROOT%{perl_vendorarch}/*/Chemistry/OpenBabel/OpenBabel.so
  114. pushd scripts/python
  115. python setup.py install --skip-build --root $RPM_BUILD_ROOT
  116. python setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
  117. popd
  118. pushd scripts/ruby
  119. make install sitearchdir=${RPM_BUILD_ROOT}%{ruby_arch}
  120. popd
  121. %clean
  122. rm -rf $RPM_BUILD_ROOT
  123. %post -p /sbin/ldconfig
  124. %postun -p /sbin/ldconfig
  125. %files
  126. %defattr(-,root,root,-)
  127. %doc AUTHORS COPYING ChangeLog README THANKS
  128. %doc doc/*.html
  129. %doc doc/README* doc/babel*.inc doc/dioxin.*
  130. %{_bindir}/*
  131. %{_mandir}/man1/*
  132. %{_datadir}/%{name}
  133. %{_libdir}/libopenbabel.so.*
  134. %{_libdir}/%{name}
  135. %files devel
  136. %defattr(-,root,root,-)
  137. %{_includedir}/%{name}-2.0
  138. %{_libdir}/libopenbabel.so
  139. %{_libdir}/pkgconfig/*.pc
  140. %files -n perl-%{name}
  141. %defattr(-,root,root,-)
  142. %{perl_vendorarch}/Chemistry/OpenBabel.pm
  143. %dir %{perl_vendorarch}/*/Chemistry/OpenBabel
  144. %{perl_vendorarch}/*/Chemistry/OpenBabel/OpenBabel.so
  145. %files -n python-%{name}
  146. %defattr(-,root,root,-)
  147. %{python_sitearch}/_openbabel.so
  148. %{python_sitearch}/openbabel.py*
  149. %{python_sitearch}/pybel.py*
  150. %files -n ruby-%{name}
  151. %defattr(-,root,root,-)
  152. %{ruby_arch}/openbabel.so
  153. %changelog
  154. * Tue Feb 02 2010 Shu KONNO <owa@bg.wakwak.com> 2.2.3-3
  155. - rebuild with python-2.6
  156. * Fri Nov 13 2009 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.2.3-2
  157. - <BTS:0789> ruby binding install path changed to Config::CONFIG["archdir"]
  158. * Wed Aug 26 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.2.3-1
  159. - applied new versioning policy, spec in UTF-8
  160. - using system inchi package
  161. - added ruby-%{name} package
  162. * Mon May 14 2007 Susumu Tanimura <arumiant@gmail.com> 2.1.0-0vl1
  163. - Updated to 2.1.0
  164. * Tue May 1 2007 Susumu Tanimura <arumiant@gmail.com> 2.0.2-5vl1
  165. - built for VineLinux
  166. * Tue Oct 03 2006 Dominik Mierzejewski <rpm@greysector.net> 2.0.2-5
  167. - rebuilt for unwind info generation, broken in gcc-4.1.1-21
  168. * Wed Sep 20 2006 Dominik Mierzejewski <rpm@greysector.net> 2.0.2-4
  169. - .pyo files no longer ghosted
  170. - fix chicken-and-egg problem when building perl and python bindings
  171. * Tue Aug 29 2006 Dominik Mierzejewski <rpm@greysector.net> 2.0.2-3
  172. - simplified autotools invocation
  173. - mass rebuild
  174. * Mon Aug 07 2006 Dominik Mierzejewski <rpm@greysector.net> 2.0.2-2
  175. - simplified file lists and permissions
  176. - removed weird character from inchi summary and description
  177. - added missing pkgconfig Req: for -devel
  178. * Sat Aug 05 2006 Dominik Mierzejewski <rpm@greysector.net> 2.0.2-1
  179. - updated to 2.0.2
  180. - dropped GCC4 fix (upstream'd)
  181. - split off inchi package
  182. - added python and perl bindings packages
  183. * Sat Jan 07 2006 Dominik Mierzejewski <rpm@greysector.net> 2.0.0-1
  184. - updated to 2.0.0
  185. - fix compilation with GCC4
  186. - FE compliance
  187. * Thu Feb 10 2005 Dominik Mierzejewski <rpm@greysector.net> 1.100.2-1
  188. - rebuilt for Fedora 3
  189. * Tue Jan 18 2005 ALT QA Team Robot <qa-robot@altlinux.org> 1.100.2-alt1.1
  190. - Rebuilt with libstdc++.so.6.
  191. * Wed Mar 03 2004 Michael Shigorin <mike@altlinux.ru> 1.100.2-alt1
  192. - 1.100.2
  193. * Wed Dec 17 2003 Michael Shigorin <mike@altlinux.ru> 1.100.1-alt2
  194. - removed *.la
  195. - don't package static library by default
  196. * Mon Sep 22 2003 Michael Shigorin <mike@altlinux.ru> 1.100.1-alt1
  197. - 1.100.1
  198. - #2994 fixed; thanks to Alex Ott (ott@) for a pointer
  199. - spec cleanup (underlibification fixup)
  200. * Mon Jun 30 2003 Michael Shigorin <mike@altlinux.ru> 1.100.0-alt1
  201. - built for ALT Linux
  202. - based on Mandrake Cooker spec by:
  203. * Lenny Cartier <lenny@mandrakesoft.com>
  204. * Austin Acton <aacton@yorku.ca>
  205. - spec cleanup