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