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