Blob Blame History Raw
Name:           starlab
Version:        4.4.3
Release:        5%{?dist}
Summary:        A Software Environment for Collisional Stellar Dynamics

Group:          Applications/Multimedia
License:        GPLv2
URL:            http://www.ids.ias.edu/~starlab/
Source0:        http://www.ids.ias.edu/~starlab/download/%{name}-%{version}.tar.gz
Patch0:         starlab-4.4.3-error.patch
Patch1:         starlab-4.4.3-libdeps.patch
Patch2:         starlab-4.4.3-buildcwd.patch
Patch3:         starlab-4.4.3-autoconf263.patch
Patch4:         starlab-4.4.3-tstarplot.patch
Patch5:         starlab-4.4.3-gcc44.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  zlib-devel
BuildRequires:  libICE-devel
BuildRequires:  libpng-devel
BuildRequires:  libSM-devel
BuildRequires:  libX11-devel
BuildRequires:  libXau-devel
BuildRequires:  libXdmcp-devel
BuildRequires:  gcc-gfortran
BuildRequires:  qt-devel >= 1:3, qt-devel < 1:4
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool

%description
Starlab is a collection of modular software tools designed to simulate the
evolution of stars and stellar systems, and analyze the resulting data.

Starlab consists of a library of loosely coupled programs, sharing a common
flexible data structure, which can be combined in arbitrarily complex ways
to study the dynamics and evolution of binary and multiple star systems,
star clusters and galactic nuclei. 


%package devel
Summary:        Development files for starlab
Group:          Development/Libraries
Requires:       %{name}-libs = %{version}

%description devel
Files needed to compile and link programs against Starlab libraries.


%package libs
Summary:        Development files for starlab
Group:          Development/Libraries

%description libs
Starlab run-time libraries.


%prep
%setup -q
%patch0 -p1 -b .error
%patch1 -p1 -b .libdeps
%patch2 -p1 -b .buildcwd
%patch3 -p1 -b .autoconf263
%patch4 -p1 -b .tstarplot

# This was removed due to being duplicate, but references were not fixed
ln -s constants.h include/star/starlab_constants.h


%build
QTDIR="" && . /etc/profile.d/qt.sh

autoreconf -i
%configure --disable-static --enable-shared \

# TODO: Consider enabling these in future
#  --enable-xreal --enable-sdyn3 --enable-sdyn

# They include a _lot_ of prebuilt stuff (by accident I assume)
make clean

# Some dependencies are really broken for shared libraries
make pkglibdir=%{_libdir} libs
make pkglibdir=%{_libdir}


%install
rm -rf $RPM_BUILD_ROOT
make pkglibdir=%{_libdir} install DESTDIR=$RPM_BUILD_ROOT
mv $RPM_BUILD_ROOT%{_bindir}/{,t}starplot


%clean
rm -rf $RPM_BUILD_ROOT


# Dear Fedora contributor,
#
# you are welcome to fix, enhance and update this package.
# Just please do not use wildcards for binaries in %%files and keep it
# exactly matching what should be installed, so that if some tool
# fails to build and the build for some reason finishes successfully,
# (though that should not happen with -error patch) we can spot the
# problem.
#
# Thanks!
%files
%defattr(-,root,root,-)
%{_bindir}/Qt_pp3
%{_bindir}/SeBa
%{_bindir}/_dyn_io
%{_bindir}/add_daughter_node
%{_bindir}/add_index
%{_bindir}/add_plummer
%{_bindir}/add_power_law
%{_bindir}/add_star
%{_bindir}/add_tidal
%{_bindir}/add_unique_index
%{_bindir}/addchydro
%{_bindir}/adddouble
%{_bindir}/addhydro
%{_bindir}/apply_plummer
%{_bindir}/calculate_individual_energies
%{_bindir}/chydro_leapfrog
%{_bindir}/coagulation
%{_bindir}/compute_com
%{_bindir}/compute_density
%{_bindir}/compute_max_cod
%{_bindir}/compute_mcom
%{_bindir}/compute_mean_cod
%{_bindir}/cutrandomsample
%{_bindir}/data
%{_bindir}/display_subtrees
%{_bindir}/dstar_state
%{_bindir}/dstar_stats
%{_bindir}/dumbp
%{_bindir}/dyn_io
%{_bindir}/dyndiff
%{_bindir}/dyndist
%{_bindir}/encountervelocity
%{_bindir}/energy
%{_bindir}/extract_snap
%{_bindir}/flat_hermite
%{_bindir}/flatten
%{_bindir}/freeze
%{_bindir}/freezebin
%{_bindir}/get_densities
%{_bindir}/get_std_center
%{_bindir}/gethist
%{_bindir}/getsnap
%{_bindir}/grow_black_hole
%{_bindir}/hdyn_io
%{_bindir}/hdyn_pp3
%{_bindir}/hop
%{_bindir}/hscale
%{_bindir}/hsys_stats
%{_bindir}/hxstarplot
%{_bindir}/hydro_leapfrog
%{_bindir}/imf_evolve
%{_bindir}/jiggle
%{_bindir}/kepler
%{_bindir}/kingfit
%{_bindir}/kira
%{_bindir}/kira_smallN
%{_bindir}/lagrad
%{_bindir}/lagradplot
%{_bindir}/lagradplotsmooth
%{_bindir}/leapfrog
%{_bindir}/list_sdumb
%{_bindir}/list_snap
%{_bindir}/lmt_to_ubvri
%{_bindir}/log_extract
%{_bindir}/m_bar
%{_bindir}/make_aniso_king
%{_bindir}/make_image
%{_bindir}/make_single_node
%{_bindir}/makebinary
%{_bindir}/makeblack_hole
%{_bindir}/makecube
%{_bindir}/makedisk
%{_bindir}/makedyn_from_input
%{_bindir}/makeheavystar
%{_bindir}/makeking
%{_bindir}/makemass
%{_bindir}/makenode
%{_bindir}/makeplanetary
%{_bindir}/makeplummer
%{_bindir}/makepovfile
%{_bindir}/makepowerlaw
%{_bindir}/makepyth
%{_bindir}/makesecondary
%{_bindir}/makesphere
%{_bindir}/makewrite
%{_bindir}/mass_dist
%{_bindir}/merge_low
%{_bindir}/merge_snaps
%{_bindir}/molecules
%{_bindir}/nn_distribution
%{_bindir}/no_xreal
%{_bindir}/node_io
%{_bindir}/nstarev
%{_bindir}/pgetopt
%{_bindir}/plot_data
%{_bindir}/plot_stars
%{_bindir}/precision
%{_bindir}/pretty_print_tree
%{_bindir}/print_id
%{_bindir}/print_normal
%{_bindir}/print_radii
%{_bindir}/print_time
%{_bindir}/proj_lagr
%{_bindir}/radial_density
%{_bindir}/radial_numdensity
%{_bindir}/radial_profile
%{_bindir}/radial_vdisp
%{_bindir}/randinter
%{_bindir}/rcore2
%{_bindir}/rdc_SeBa
%{_bindir}/readp
%{_bindir}/readp2
%{_bindir}/readstoa
%{_bindir}/rearrange_mf
%{_bindir}/red_star_cluster
%{_bindir}/red_stellar_system
%{_bindir}/reflect_velocities
%{_bindir}/renumber
%{_bindir}/reset_counters
%{_bindir}/rmq
%{_bindir}/rs_birthrate
%{_bindir}/rs_countsn
%{_bindir}/rs_findtype
%{_bindir}/rs_population
%{_bindir}/rs_reorder
%{_bindir}/rs_scenarios
%{_bindir}/rs_snapshot
%{_bindir}/runtime_help
%{_bindir}/scale
%{_bindir}/scanbinary
%{_bindir}/scanbundle
%{_bindir}/semi_to_period
%{_bindir}/set_com
%{_bindir}/set_ignore_internal
%{_bindir}/set_radius
%{_bindir}/setmass
%{_bindir}/simple
%{_bindir}/snap2speck
%{_bindir}/snap_to_image
%{_bindir}/snapprune
%{_bindir}/split_particles
%{_bindir}/sstar_stats
%{_bindir}/starev
%{_bindir}/tstarplot
%{_bindir}/std_rename_nodes
%{_bindir}/story
%{_bindir}/sync_times
%{_bindir}/sys_stats
%{_bindir}/tdyn_io
%{_bindir}/test_util
%{_bindir}/test_vector
%{_bindir}/to_com
%{_bindir}/worldlines
%{_bindir}/xhrdplot
%{_bindir}/ximage
%{_bindir}/xreal
%{_bindir}/xstarplot
%{_bindir}/xstarplot22
%{_bindir}/xtest
%doc AUTHORS COPYING TOOLS
%exclude %{_libdir}/*.la


%files libs
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%doc AUTHORS COPYING


%files devel
%defattr(-,root,root,-)
%{_libdir}/*.so
%{_includedir}/*
%doc AUTHORS COPYING EXAMPLES


%post libs -p /sbin/ldconfig


%postun libs -p /sbin/ldconfig


%changelog
* Sun Mar 1 2009 Lubomir Rintel (Fedora Astronomy) <lkundrak@fedoraproject.org> - 4.4.3-5
- Fix build with GCC 4.4

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.4.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Oct 11 2008 Lubomir Rintel (Fedora Astronomy) <lkundrak@fedoraproject.org> - 4.4.3-3
- Deal with starplot conflict. (Thanks to Marek Mahut)

* Thu Oct 9 2008 Lubomir Rintel (Fedora Astronomy) <lkundrak@fedoraproject.org> - 4.4.3-2
- Source the QT path. (Thanks to Marek Mahut)

* Sun Jun 1 2008 Lubomir Rintel (Fedora Astronomy) <lkundrak@fedoraproject.org> - 4.4.3-1
- Initial packaging for Fedora Astronomy