Hi all,
In case it's of interest, I've attached a spec file that works for
building a cctbx RPM on Fedora 10 (nothing really F10-specific, so may
work on other distros/releases too).
Please note that it works by playing the dangerous (and extremely ugly)
game of moving the RPM build into the system-wide tree, so it builds "in
situ" in /usr/local/cctbx instead of in the RPM default locale
(/my/rpm/BUILDROOT/usr/local/cctbx). On the same note, the patch which
is referenced in the spec file ('cctbx_bundle_StrucBio.patch') is just a
small snippet that edits the head of 'cctbx_install_script.csh' to
explicitly control the build path (i.e., override $cwd by explicitly
setting something like 'set
install_root="/usr/local/cctbx/2009_02_15_2320"', or wherever you'd like
cctbx to live...). Probably a much cleaner procedure would be to use
the libtbx/configure.py approach in a post-processing step; let me know
if anyone pkg's an RPM that way. :-)
Enjoy,
Cam
--
-------------------------------------------------------
Cameron Mura
Assistant Professor
University of Virginia
Department of Chemistry
McCormick Road, Box 400319
Charlottesville, VA 22904-4319
Email: [email protected]
Web: http://muralab.org
Tel: 434.924.7824
Fax: 434.924.3710
-------------------------------------------------------
#-------------------------------------------------------------------------------
# Cameron Mura ; 27jul09;
#-------------------------------------------------------------------------------
%define _buildroot /usr/local/cctbx/2009_02_15_2320
%define debug_package %{nil}
#%define _builddir /usr/local/cctbx/2009_02_15_2320
Name: cctbx
Version: 2009_02_15_2320
Release: 1
Summary: Computational Crystallography Toolbox
License: Open Source (BSD-like)
Group: Applications/Engineering
URL: http://cctbx.sourceforge.net
Source0: %{name}_bundle_%{version}.tar.gz
Source1: ccp4_mon_lib.tar.gz
Packager: Cameron Mura
Patch0: cctbx_bundle_StrucBio.patch
#BuildRoot: /var/tmp/%{name}-buildroot
BuildRoot: /usr/local/cctbx/2009_02_15_2320
%description
The Computational Crystallography Toolbox (cctbx) is being developed as the
open source component of the PHENIX system. The goal of the PHENIX project is
to advance automation of macromolecular structure determination. PHENIX depends
on the cctbx, but not vice versa. This hierarchical approach enforces a clean
design as a reusable library. The cctbx is therefore also useful for
small-molecule crystallography and even general scientific applications. The
cctbx is designed with an open and flexible architecture to promote
extendability and easy incorporation into other software environments. The
package is organized as a set of ISO C++ classes with Python bindings. This
organization combines the computational efficiency of a strongly typed compiled
language with the convenience and flexibility of a dynamically typed scripting
language in a strikingly uniform and very maintainable way. Note that CCTBX is
developed under an open source (BSD-like) license; for addition information,
see http://cctbx.svn.sourceforge.net/viewvc/cctbx/trunk/cctbx/LICENSE_2_0.txt.
%prep
# Require weird gymnastics to relocate cctbx outside the RPM build tree...
#export MYCCTBXHOME="/usr/local/cctbx/2009_02_15_2320"
#if [ ! -d $MYCCTBXHOME ]; then
# mkdir -p $MYCCTBXHOME
#fi
%setup -a 0 -D -c /usr/local/cctbx/2009_02_15_2320 -n .
cp %{_topdir}/SOURCES/ccp4_mon_lib.tar.gz /usr/local/cctbx/2009_02_15_2320/.
#%setup -a 1 -D -T -c /usr/local/cctbx/2009_02_15_2320 -n .
%patch0 -p1
%build
/usr/local/cctbx/2009_02_15_2320/cctbx_install_script.csh /usr/bin/python 8
. "/usr/local/cctbx/2009_02_15_2320/cctbx_build/setpaths.sh"
libtbx.unpack_in_sources ccp4_mon_lib.tar.gz
%install
mkdir -p $RPM_BUILD_ROOT/usr/local/cctbx/2009_02_15_2320
mv /usr/local/cctbx/2009_02_15_2320/* $RPM_BUILD_ROOT/usr/local/cctbx/2009_02_15_2320/.
mkdir -p $RPM_BUILD_ROOT/etc/profile.d
echo '. "/usr/local/cctbx/2009_02_15_2320/cctbx_build/setpaths.sh"' > $RPM_BUILD_ROOT/etc/profile.d/cctbx.sh
echo 'source "/usr/local/cctbx/2009_02_15_2320/cctbx_build/setpaths.csh"' > $RPM_BUILD_ROOT/etc/profile.d/cctbx.csh
#chmod 755 $RPM_BUILD_ROOT/etc/profile.d/cctbx.sh
#chmod 755 $RPM_BUILD_ROOT/etc/profile.d/cctbx.csh
#[ $RPM_BUILD_ROOT != "/" ] && rm -rf $RPM_BUILD_ROOT
#install -m 755 src/rasmol_32BIT $RPM_BUILD_ROOT/usr/local/rasmol
#install -m 755 src/rasmol_XFORMS_32BIT $RPM_BUILD_ROOT/usr/local/rasmol
#install -m 644 doc/rasmol.hlp $RPM_BUILD_ROOT/usr/local/rasmol
#install -m 644 INSTALL* $RPM_BUILD_ROOT/usr/local/rasmol
#install -m 644 README* $RPM_BUILD_ROOT/usr/local/rasmol
#install -m 644 TODO* $RPM_BUILD_ROOT/usr/local/rasmol
#cp -R working/cctbx_sources $RPM_BUILD_ROOT/usr/local/cctbx/%{version}
#cp -R working/cctbx_build $RPM_BUILD_ROOT/usr/local/cctbx/%{version}
%clean
[ $RPM_BUILD_ROOT != "/" ] && rm -rf $RPM_BUILD_ROOT
%post
#ln -fs /usr/local/rasmol/rasmol_32BIT /usr/local/bin/rasmol
%preun
#%{__rm} -f /usr/local/bin/rasmol
%files
%defattr(-,root,root)
#%doc ChangeLog.txt ChangeLog.html INSTALL* NOTICE README*
/usr/local/cctbx/2009_02_15_2320
/etc/profile.d/%{name}.sh
/etc/profile.d/%{name}.csh
%changelog
* Sun Jul 26 2009 Cameron Mura