]>
Commit | Line | Data |
---|---|---|
1 | ||
2 | %define qtver 4.6.3 | |
3 | ||
4 | Summary: An advanced molecular editor for chemical purposes | |
5 | Name: avogadro | |
6 | Version: 1.0.0 | |
7 | Release: 2 | |
8 | License: GPL v2 | |
9 | Group: Applications/Editors | |
10 | Source0: http://downloads.sourceforge.net/avogadro/%{name}-%{version}.tar.bz2 | |
11 | # fix build with sip 4.10 | |
12 | URL: http://avogadro.openmolecules.net/ | |
13 | Patch0: %{name}-sip.patch | |
14 | Patch1: %{name}-linguist.patch | |
15 | Patch2: %{name}-cmake.patch | |
16 | BuildRequires: boost-devel >= 1.35 | |
17 | BuildRequires: cmake >= 2.8.0 | |
18 | BuildRequires: desktop-file-utils | |
19 | BuildRequires: docbook-utils | |
20 | BuildRequires: eigen >= 1:2.0.12 | |
21 | BuildRequires: glew-devel >= 1.5.0 | |
22 | BuildRequires: python-numpy-devel | |
23 | BuildRequires: openbabel-devel >= 2.2.2 | |
24 | BuildRequires: qt4-build >= %{qtver} | |
25 | BuildRequires: qt4-qmake >= %{qtver} | |
26 | BuildRequires: sip | |
27 | Requires: %{name}-libs = %{version}-%{release} | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
31 | An advanced molecular editor designed for cross-platform use in | |
32 | computational chemistry, molecular modeling, bioinformatics, materials | |
33 | science, and related areas, which offers flexible rendering and a | |
34 | powerful plugin architecture. | |
35 | ||
36 | %package libs | |
37 | Summary: Shared libraries for Avogadro | |
38 | Group: Libraries | |
39 | ||
40 | %description libs | |
41 | This package contains the shared libraries for the molecular editor | |
42 | Avogadro. | |
43 | ||
44 | %package devel | |
45 | Summary: Development files for Avogadro | |
46 | Group: Development/Libraries | |
47 | Requires: %{name}-libs = %{version}-%{release} | |
48 | ||
49 | %description devel | |
50 | This package contains files to develop applications using Avogadros | |
51 | libraries. | |
52 | ||
53 | %prep | |
54 | %setup -q | |
55 | %patch0 -p1 | |
56 | %patch1 -p0 | |
57 | %patch2 -p1 | |
58 | ||
59 | %build | |
60 | install -d build | |
61 | cd build | |
62 | %cmake \ | |
63 | -DENABLE_GLSL=ON \ | |
64 | -DENABLE_PYTHON=ON \ | |
65 | -DENABLE_UPDATE_CHECKER=OFF \ | |
66 | -DCMAKE_BUILD_TYPE=Release \ | |
67 | -DCMAKE_INSTALL_PREFIX=%{_prefix} \ | |
68 | -DLIB_INSTALL_DIR=%{_libdir} \ | |
69 | .. | |
70 | ||
71 | %{__make} | |
72 | ||
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | %{__make} -C build install \ | |
76 | DESTDIR=$RPM_BUILD_ROOT | |
77 | ||
78 | %post libs -p /sbin/ldconfig | |
79 | %postun libs -p /sbin/ldconfig | |
80 | ||
81 | %clean | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %files | |
85 | %defattr(644,root,root,755) | |
86 | %doc AUTHORS ChangeLog COPYING | |
87 | %attr(755,root,root) %{_bindir}/%{name} | |
88 | %{_datadir}/%{name} | |
89 | %{_pixmapsdir}/%{name}-icon.png | |
90 | %{_desktopdir}/%{name}.desktop | |
91 | ||
92 | %files devel | |
93 | %defattr(644,root,root,755) | |
94 | %{_datadir}/lib%{name} | |
95 | %{_includedir}/%{name} | |
96 | %{_libdir}/*.so | |
97 | ||
98 | %files libs | |
99 | %defattr(644,root,root,755) | |
100 | %{_datadir}/python*/site-packages/Avogadro.so | |
101 | %{_libdir}/%{name} | |
102 | %attr(755,root,root) %{_libdir}/*.so.* |