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