Enable parallel tests.
[hoomd-blue.git] / packaging / SPECS / hoomd.spec
blob42b742287cf7d5fa8b46c1e04ae32295d42b4913
1 %global repository https://codeblue.umich.edu/git/hoomd-blue
2 # The git refspec to build is specified by defining %{refspec}.
3 # The version number to tag the build with is %{version}.
4 # Both should be specified, as we cannot determine the version until we have checked out the code
5 # - if they are not speicified, then the most recent tag is built
6 %global version %{?version}%{!?version:1.0.1}
7 %global refspec %{?refspec}%{!?refspec:v1.0.1}
8 %global release %{?release}%{!?release:0}
10 # the Red Hat convention is to put 64-bit libs in lib64
11 %global libsuffix %(uname -p |sed -n 's/.*64$/64/p')
12 %global libname lib%(uname -p |sed -n 's/.*64$/64/p')
13 %global python %(which python)
14 %global sitedir %(%{python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(plat_specific=True)")
16 BuildRoot: %{_tmppath}/%{name}-root
17 Summary: Highly Optimized Object-oriented Many-particle Dynamics -- Blue Edition
18 License: various
19 Name: hoomd
20 Version: %{version}
21 Release: %{release}
22 # sources will be retrieved with subversion
23 # Source: http://codeblue.umich.edu/hoomd-blue/downloads/1.0/hoomd-1.0.1.tar.bz2
24 URL: http://codeblue.umich.edu/hoomd-blue/
25 Prefix: /usr
26 Group: Applications
27 BuildRequires: gcc-c++, boost-devel, zlib-devel, glibc-devel, python-devel, openmpi-devel
28 Requires: python >= 2.4
30 %description
31 HOOMD-blue stands for Highly Optimized Object-oriented Many-particle Dynamics -- Blue Edition. It performs general purpose particle dynamics simulations on a single workstation, taking advantage of NVIDIA GPUs to attain a level of performance equivalent to many processor cores on a fast cluster.
33 Object-oriented design patterns are used in HOOMD-blue so it versatile and expandable. Various types of potentials, integration methods and file formats are currently supported, and more are added with each release. The code is available and open source, so anyone can write a plugin or change the source to add additional functionality.
35 Simulations are configured and run using simple python scripts, allowing complete control over the force field choice, integrator, all parameters, how many time steps are run, etc... . The scripting system is designed to be as simple as possible to the non-programmer.
37 %prep
38 rm -rf $RPM_BUILD_DIR/%{name}-%{version}
40 %setup -T -c
41 git clone %{repository} .
42 if [ $? -ne 0 ]; then
43 exit $?
45 git checkout %{refspec}
46 if [ $? -ne 0 ]; then
47 exit $?
51 cmake -DCMAKE_INSTALL_PREFIX=$RPM_BUILD_ROOT/usr -DLIB_SUFFIX=%{libsuffix} -DENABLE_MPI=ON -DENABLE_EMBED_CUDA=ON -DPYTHON_SITEDIR=$RPM_BUILD_ROOT/%{sitedir} -DPYTHON_EXECUTABLE=%{python} -DHOOMD_INSTALL_PREFIX=/usr
53 %build
54 cd $RPM_BUILD_DIR/%{name}-%{version}
55 make
56 make preinstall
58 %install
59 rm -rf $RPM_BUILD_ROOT
61 rm -f fluid-file-list
62 echo "%{sitedir}/hoomd.so" >> fluid-file-list
63 echo "%{sitedir}/hoomd_plugins" >> fluid-file-list
64 echo "%{sitedir}/hoomd_script" >> fluid-file-list
65 echo "/usr/%{libname}/hoomd" >> fluid-file-list
67 make install
68 %clean
69 rm -rf $RPM_BUILD_ROOT
71 %post
73 %postun
75 %files -f fluid-file-list
76 %defattr(-,root,root)
77 /usr/share/hoomd
78 /usr/bin/hoomd
79 /usr/bin/hoomd-config.sh
80 /usr/include/hoomd
81 /usr/share/icons/hicolor/48x48/mimetypes/application-x-hoomd.png
82 /usr/share/icons/hicolor/48x48/apps/hoomd.png
83 /usr/share/icons/hicolor/128x128/mimetypes/application-x-hoomd.png
84 /usr/share/icons/hicolor/128x128/apps/hoomd.png
85 /usr/share/icons/hicolor/32x32/mimetypes/application-x-hoomd.png
86 /usr/share/icons/hicolor/32x32/apps/hoomd.png
87 /usr/share/mime/packages/hoomd.xml
88 /usr/share/applications/HOOMD.desktop