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