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