Added conditional inclusion of config.h to source files
[gromacs.git] / admin / gromacs.spec
blob3423bebf6919d0959a5c90dd893b6df54d33edfe
2 # RPM specification file to make normal gromacs packages (without mpi)
3 # If you have mpi installed, you can create an mpi mdrun executable
4 # and libs with the gromacs-mpi spec file!
7 # Main package - only dynamic libs, and no header files
9 Summary: Molecular dynamics package (non-parallel version)
10 Name: gromacs
11 Version: 3.1
12 Release: 1
13 Copyright: GPL
14 Group: Applications/Science
15 Prefix: /usr/local
16 Buildroot: %{_topdir}/buildroot
17 Requires: fftw >= 2.1.3
18 Source: ftp://ftp.gromacs.org/pub/gromacs/source/gromacs-%{version}.tar.gz
19 URL: http://www.gromacs.org
20 Packager: Erik Lindahl <lindahl@gromacs.org>
21 %description
22 GROMACS is a versatile and extremely well optimized package
23 to perform molecular dynamics computer simulations and
24 subsequent trajectory analysis. It is developed for
25 biomolecules like proteins, but the extremely high
26 performance means it is used also in several other field
27 like polymer chemistry and solid state physics. This
28 version has the dynamic libs and executables; to hack new
29 utility programs you also need the headers and static
30 libs in gromacs-dev. Linux kernel 2.4 or later is STRONGLY
31 recommended on Pentium III and later processors since
32 GROMACS then can use assembly loops with SSE instructions.
33 You can also perform parallel simulations if you install
34 gromacs-lammpi.
37 # The header files and static libraries go into gromacs-devel...
39 %package devel
40 Summary: Header files and static libraries for GROMACS
41 Group: Applications/Science
42 Prefix: %{prefix}
43 Requires: fftw-devel >= 2.1.3, gromacs = %{version}-%{release}
44 %description devel
45 This package contains header files, static libraries,
46 and a program example for the GROMACS molecular
47 dynamics software. You need it if you want to write your
48 own analysis programs.
50 %prep
51 %setup
53 %build
54 # Use the standard /usr/local setup on linux, even if that's slightly
55 # different from the normal gromacs directory standard. Don't use
56 # the automatic gromacs architecture exec-prefix.
57 # Since 'gromacs' isnt present in the prefix it will be added to datadir
58 # and includedir.
59 # (This way the package won't interfere with a manual gromacs installation)
60 # dont use motif since it is not standard on linux.
61 ./configure --enable-shared --prefix=%{prefix} --exec-prefix=%{prefix} --without-motif-libraries
62 make
64 %install
65 make DESTDIR=${RPM_BUILD_ROOT} install
67 %clean
68 rm -rf ${RPM_BUILD_ROOT}
70 %post
72 # Add our (final) library directory to /etc/ld.so.conf if it is not already there
74 if test -z `grep ${RPM_INSTALL_PREFIX}/lib /etc/ld.so.conf`; then
75 cat >> /etc/ld.so.conf < ${RPM_INSTALL_PREFIX}/lib
77 # run ldconfig to update the runtime linker database with the new libraries
78 # (make sure /sbin is in the $PATH)
79 PATH="/sbin:$PATH" ldconfig
81 %postun
82 # after uninstall, run ldconfig to remove the libs from the linker database
83 PATH="/sbin:$PATH" ldconfig
85 %files
86 %defattr(-,root,root)
87 %{prefix}/bin/*
88 %{prefix}/share/gromacs/top/*
89 %{prefix}/share/gromacs/tutor/*
90 %docdir %{prefix}/share/gromacs/html
91 %{prefix}/share/gromacs/html/
92 %{prefix}/man/*
93 %{prefix}/lib/libgmx.so.2.0.0
94 %{prefix}/lib/libgmx.so.2
95 %{prefix}/lib/libmd.so.2.0.0
96 %{prefix}/lib/libmd.so.2
97 %files devel
98 %defattr(-,root,root)
99 %{prefix}/share/gromacs/template/*
100 %{prefix}/lib/libgmx.so
101 %{prefix}/lib/libgmx.a
102 %{prefix}/lib/libgmx.la
103 %{prefix}/lib/libmd.so
104 %{prefix}/lib/libmd.a
105 %{prefix}/lib/libmd.la
106 %{prefix}/include/gromacs/*