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