]>
Commit | Line | Data |
---|---|---|
4d9dc8e3 | 1 | |
2 | %define qtver 4.6.3 | |
3 | ||
638a5511 AM |
4 | Summary: An advanced molecular editor for chemical purposes |
5 | Name: avogadro | |
6 | Version: 1.0.0 | |
6e530d33 | 7 | Release: 2 |
638a5511 AM |
8 | License: GPL v2 |
9 | Group: Applications/Editors | |
638a5511 AM |
10 | Source0: http://downloads.sourceforge.net/avogadro/%{name}-%{version}.tar.bz2 |
11 | # fix build with sip 4.10 | |
4d9dc8e3 | 12 | URL: http://avogadro.openmolecules.net/ |
638a5511 | 13 | Patch0: %{name}-sip.patch |
5654b505 | 14 | Patch1: %{name}-linguist.patch |
6e530d33 | 15 | Patch2: %{name}-cmake.patch |
638a5511 | 16 | BuildRequires: boost-devel >= 1.35 |
4d9dc8e3 | 17 | BuildRequires: cmake >= 2.8.0 |
638a5511 AM |
18 | BuildRequires: desktop-file-utils |
19 | BuildRequires: docbook-utils | |
4d9dc8e3 | 20 | BuildRequires: eigen >= 1:2.0.12 |
638a5511 | 21 | BuildRequires: glew-devel >= 1.5.0 |
53ea67fc | 22 | BuildRequires: python-numpy-devel |
638a5511 | 23 | BuildRequires: openbabel-devel >= 2.2.2 |
4d9dc8e3 | 24 | BuildRequires: qt4-build >= %{qtver} |
25 | BuildRequires: qt4-qmake >= %{qtver} | |
26 | BuildRequires: sip | |
638a5511 AM |
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 | ||
638a5511 AM |
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} | |
638a5511 AM |
48 | |
49 | %description devel | |
50 | This package contains files to develop applications using Avogadros | |
51 | libraries. | |
52 | ||
53 | %prep | |
54 | %setup -q | |
5654b505 | 55 | %patch0 -p1 |
56 | %patch1 -p0 | |
6e530d33 | 57 | %patch2 -p1 |
638a5511 | 58 | |
638a5511 AM |
59 | %build |
60 | install -d build | |
61 | cd build | |
4d9dc8e3 | 62 | %cmake \ |
638a5511 AM |
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 | .. | |
5654b505 | 70 | |
71 | %{__make} | |
638a5511 | 72 | |
638a5511 AM |
73 | %install |
74 | rm -rf $RPM_BUILD_ROOT | |
5654b505 | 75 | %{__make} -C build install \ |
76 | DESTDIR=$RPM_BUILD_ROOT | |
638a5511 | 77 | |
638a5511 | 78 | %post libs -p /sbin/ldconfig |
638a5511 AM |
79 | %postun libs -p /sbin/ldconfig |
80 | ||
638a5511 AM |
81 | %clean |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
638a5511 AM |
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 | ||
638a5511 AM |
92 | %files devel |
93 | %defattr(644,root,root,755) | |
94 | %{_datadir}/lib%{name} | |
95 | %{_includedir}/%{name} | |
96 | %{_libdir}/*.so | |
97 | ||
638a5511 AM |
98 | %files libs |
99 | %defattr(644,root,root,755) | |
55c00b95 | 100 | %{_datadir}/python*/site-packages/Avogadro.so |
638a5511 AM |
101 | %{_libdir}/%{name} |
102 | %attr(755,root,root) %{_libdir}/*.so.* |