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