1 |
|
2 |
%define major 1 |
3 |
%define libname %mklibname %name %major |
4 |
|
5 |
Name: avogadro |
6 |
Summary: An advanced molecular editor for chemical purposes |
7 |
Group: System/Libraries |
8 |
Version: 1.0.3 |
9 |
Release: %mkrel 3 |
10 |
License: GPLv2 |
11 |
URL: http://avogadro.openmolecules.net/ |
12 |
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 |
13 |
Patch0: avogadro-1.0.3-mga-fix_qmake_mkspecs_installation.patch |
14 |
BuildRequires: cmake >= 2.6.0 |
15 |
BuildRequires: qt4-devel |
16 |
BuildRequires: qt4-linguist |
17 |
BuildRequires: eigen2 >= 2.0.9 |
18 |
BuildRequires: openbabel-devel >= 2.2.3 |
19 |
BuildRequires: boost-devel >= 1.35 |
20 |
BuildRequires: glew-devel >= 1.5.0 |
21 |
BuildRequires: docbook-utils-pdf |
22 |
BuildRequires: python-sip |
23 |
BuildRequires: python-numpy-devel |
24 |
BuildRequires: python-devel |
25 |
Requires: openbabel >= 2.2.3 |
26 |
%description |
27 |
An advanced molecular editor designed for cross-platform use |
28 |
in computational chemistry,molecular modeling, bioinformatics, |
29 |
materials science,and related areas, which offers flexible |
30 |
rendering and a powerful plugin architecture. |
31 |
|
32 |
%files |
33 |
%defattr(-,root,root,-) |
34 |
%doc AUTHORS ChangeLog COPYING |
35 |
%{_bindir}/%name |
36 |
%{_bindir}/avopkg |
37 |
%{_datadir}/%name |
38 |
%{_datadir}/pixmaps/%name-icon.png |
39 |
%{_datadir}/applications/%name.desktop |
40 |
%{_mandir}/man1/%name.1* |
41 |
%{_mandir}/man1/avopkg.1* |
42 |
%{_datadir}/libavogadro/ |
43 |
%dir %{_libdir}/%name/ |
44 |
%dir %{_libdir}/%name/1_0/ |
45 |
%{_libdir}/%name/1_0/colors |
46 |
%{_libdir}/%name/1_0/extensions |
47 |
%{_libdir}/%name/1_0/engines |
48 |
%{_libdir}/%name/1_0/tools |
49 |
|
50 |
|
51 |
#-------------------------------------------------------------------- |
52 |
%package -n %libname |
53 |
Summary: Shared libraries for Avogadro |
54 |
Group: System/Libraries |
55 |
|
56 |
%description -n %libname |
57 |
Libraries for Avogadro molecular editor. |
58 |
|
59 |
%files -n %libname |
60 |
%defattr(-,root,root,-) |
61 |
%{_libdir}/libavogadro.so.%{major}* |
62 |
|
63 |
|
64 |
#-------------------------------------------------------------------- |
65 |
%package devel |
66 |
Summary: Development files for Avogadro |
67 |
Group: Development/C++ |
68 |
Requires: %libname = %{version}-%{release} |
69 |
|
70 |
%description devel |
71 |
Development Avogadro files. |
72 |
|
73 |
%files devel |
74 |
%defattr(-,root,root,-) |
75 |
%{_includedir}/%name |
76 |
%{_libdir}/libavogadro.so |
77 |
%{python_sitearch}/Avogadro.so |
78 |
%{_libdir}/%name/*.cmake |
79 |
%{_libdir}/%name/1_0/*.cmake |
80 |
%{_libdir}/%name/1_0/cmake/ |
81 |
%dir %{qt4dir}/mkspecs/features/ |
82 |
%{qt4dir}/mkspecs/features/%name.prf |
83 |
|
84 |
|
85 |
#-------------------------------------------------------------------- |
86 |
%prep |
87 |
%setup -q |
88 |
%apply_patches |
89 |
# (Fedora) nuke unpatched copy, use working version included in cmake instead |
90 |
rm -f cmake/modules/FindPythonLibs.cmake |
91 |
|
92 |
|
93 |
%build |
94 |
%{cmake_qt4}\ |
95 |
%{?ENABLE_TESTS} \ |
96 |
-DENABLE_GLSL:BOOL=ON \ |
97 |
-DENABLE_PYTHON:BOOL=ON \ |
98 |
-DCMAKE_SKIP_RPATH:BOOL=ON |
99 |
|
100 |
%make |
101 |
|
102 |
%install |
103 |
rm -rf %buidroot |
104 |
%makeinstall_std -C build |
105 |
|
106 |
|
107 |
%clean |
108 |
rm -rf %buildroot |