Summary: Programs for Processing and Analysis of Astronomical Data Name: iraf Version: 2.12.2p2 Release: 6.el5.uson License: Freely redistributable/modifiable if attributed, no warranty Group: Applications/Scientific Packager: Fernando Avila Castro Distribution: Area de Astronomia, USON Source0: as.pcix.gen.gz Source1: ib.rhux.x86.gz Source2: nb.rhux.x86.gz Source3: iraf.install Source4: db.rhux.x86.gz Source5: patch2a.tar.gz Source6: ecl_tar.gz Source7: iraf-install-answers Url: http://iraf.noao.edu/ BuildRoot: %{_tmppath}/iraf-root BuildRequires: compat-libf2c-34, compat-gcc-34-g77 Requires: iraf-config, compat-gcc-34-g77, compat-libf2c-34, tcsh Provides: iraf Obsoletes: iraf-nmisc %description IRAF stands for the Image Reduction and Analysis Facility. It is the de facto standard for the general processing of astronomical images and spectroscopy from the ultraviolet to the far infrared. IRAF is a product of the National Optical Astronomy Observatories (www.noao.edu). %prep # set up dirs mkdir -p $RPM_BUILD_ROOT/iraf/iraf # unpack the main sources cd $RPM_BUILD_ROOT/iraf/iraf tar xvvzf $RPM_SOURCE_DIR/as.pcix.gen.gz # set up binary directories mkdir -p $RPM_BUILD_ROOT/iraf/irafbin/bin.redhat mkdir -p $RPM_BUILD_ROOT/iraf/irafbin/noao.bin.redhat # unpack IRAF binaries cd $RPM_BUILD_ROOT/iraf/irafbin/bin.redhat tar xvvzf $RPM_SOURCE_DIR/ib.rhux.x86.gz # unpack NOAO binaries cd $RPM_BUILD_ROOT/iraf/irafbin/noao.bin.redhat tar xvvzf $RPM_SOURCE_DIR/nb.rhux.x86.gz # unpack HS binaries cd $RPM_BUILD_ROOT/iraf/irafbin tar xvvzf $RPM_SOURCE_DIR/db.rhux.x86.gz # unpack patches cd $RPM_BUILD_ROOT/iraf/iraf tar xvvzf $RPM_SOURCE_DIR/patch2a.tar.gz # unpack ECL mkdir -p $RPM_BUILD_ROOT/iraf/iraf/pkg/ecl cd $RPM_BUILD_ROOT/iraf/iraf/pkg/ecl tar xvvzf $RPM_SOURCE_DIR/ecl_tar.gz %build # nuke unnecessary files and strip static libs cd $RPM_BUILD_ROOT/iraf find . -path "*bin.macosx/*" -exec rm -rf {} \; find . -path "*bin.linuxppc/*" -exec rm -rf {} \; find . -path "*bin.sunos/*" -exec rm -rf {} \; find . -path "*bin.freebsd/*" -exec rm -rf {} \; find . -path "*bin.suse/*" -exec rm -rf {} \; find . -path "*bin.linux/*" -exec rm -rf {} \; find . -name "*OBJS.arc*" -exec rm {} \; rm -rf ./iraf/local/.netscape rm -rf ./iraf/unix/bin.redhat/local/.netscape %install mkdir -p $RPM_BUILD_ROOT/usr/bin mkdir -p $RPM_BUILD_ROOT/usr/local/lib mkdir -p $RPM_BUILD_ROOT/usr/include mkdir -p $RPM_BUILD_ROOT/dev # run the install script cp $RPM_SOURCE_DIR/iraf-install-answers $RPM_BUILD_ROOT/iraf/iraf/unix/hlib/. cp $RPM_SOURCE_DIR/iraf.install $RPM_BUILD_ROOT/iraf/iraf/unix/hlib/install cd $RPM_BUILD_ROOT/iraf/iraf/unix/hlib/ cat install | sed "s@/usr/@$RPM_BUILD_ROOT/usr/@g" > install.1 #cat install.1 | sed "s@/dev/@$RPM_BUILD_ROOT/dev/@g" > install.2 mv install install.ORIG mv install.1 install #rm install.1 chmod +x install echo "$RPM_BUILD_ROOT/iraf/iraf" > iraf-install-answers echo "$RPM_BUILD_ROOT/usr/tmp" >> iraf-install-answers echo "$RPM_BUILD_ROOT/usr/bin" >> iraf-install-answers echo "yes" >> iraf-install-answers echo "yes" >> iraf-install-answers echo "no" >> iraf-install-answers echo "yes" >> iraf-install-answers echo "yes" >> iraf-install-answers echo "no" >> iraf-install-answers ./install < iraf-install-answers # fix iraf.h and friends cd $RPM_BUILD_ROOT/iraf/iraf/unix/hlib/libc cat iraf.h | sed "s@$RPM_BUILD_ROOT@@g" > iraf.h.new mv iraf.h.new iraf.h cd $RPM_BUILD_ROOT/iraf/iraf/unix/hlib cat cl.csh | sed "s@$RPM_BUILD_ROOT@@g" > cl.csh.new mv cl.csh.new cl.csh cat mkiraf.csh | sed "s@$RPM_BUILD_ROOT@@g" > mkiraf.csh.new mv mkiraf.csh.new mkiraf.csh chmod +x mkiraf.csh chmod +x cl.csh cd $RPM_BUILD_ROOT/iraf/iraf/local cat .login | sed "s@$RPM_BUILD_ROOT@@g" > .login.new mv .login.new .login # set up imt nodes cd $RPM_BUILD_ROOT/dev mkfifo imt1i mkfifo imt1o ln -sf imt1o imt1 # install ECL cd $RPM_BUILD_ROOT/iraf/iraf/pkg/ecl cp $RPM_BUILD_ROOT/iraf/iraf/unix/hlib/cl.csh $RPM_BUILD_ROOT/iraf/iraf/unix/hlib/cl.csh.ORIG mv cl.csh.PCIX $RPM_BUILD_ROOT/iraf/iraf/unix/hlib/cl.csh ln -s $RPM_BUILD_ROOT/iraf/iraf/unix/hlib/cl.csh $RPM_BUILD_ROOT/usr/bin/ecl chmod 755 ecl.e mv ecl.e $RPM_BUILD_ROOT/iraf/iraf/bin.redhat/. # fix the sym links cd $RPM_BUILD_ROOT/usr find . -type l -exec ls -al {} \; | sed "s@$RPM_BUILD_ROOT@@" | awk '{print $11,$9}' | xargs -n 2 ln -sf # not sure why i need this..... cd $RPM_BUILD_ROOT/usr/local/lib find . -type l -exec ls -al {} \; | sed "s@$RPM_BUILD_ROOT@@" | awk '{print $11,$9}' | xargs -n 2 ln -sf #cd $RPM_BUILD_ROOT/dev #find . -type l -exec ls -al {} \; | sed "s@$RPM_BUILD_ROOT@@" | awk '{print $11,$9}' | xargs -n 2 ln -sf # fiddle with /iraf/iraf/dev cd $RPM_BUILD_ROOT/iraf/iraf/dev mv tapecap tapecap.ORIG cp tapecap.linux tapecap # these'll be moved out to the iraf-config rpm mv $RPM_BUILD_ROOT/iraf/iraf/dev/hosts $RPM_BUILD_ROOT/iraf/iraf/dev/hosts.ORIG mv $RPM_BUILD_ROOT/iraf/iraf/dev/devices.hlp $RPM_BUILD_ROOT/iraf/iraf/dev/devices.hlp.ORIG mv $RPM_BUILD_ROOT/iraf/iraf/dev/termcap $RPM_BUILD_ROOT/iraf/iraf/dev/termcap.ORIG mv $RPM_BUILD_ROOT/iraf/iraf/dev/graphcap $RPM_BUILD_ROOT/iraf/iraf/dev/graphcap.ORIG # diddle with extern.pkg cd $RPM_BUILD_ROOT/iraf/iraf/unix/hlib cp extern.pkg extern.pkg.irafsave # make specific entries for each external package and then slap them # all together with the post(un)install scripts. echo 'reset noao = iraf$noao/' > NOAO.extern.pkg echo 'task noao.pkg = noao$noao.cl' >> NOAO.extern.pkg echo '' >> NOAO.extern.pkg echo ' ,noao$lib/helpdb.mip\' > NOAO.helpdb.mip %clean rm -rf $RPM_BUILD_ROOT %post cp /iraf/iraf/unix/hlib/extern.pkg /iraf/iraf/unix/hlib/extern.pkg.irafsave cat /iraf/iraf/unix/hlib/*.extern.pkg > /iraf/iraf/unix/hlib/extern.pkg echo 'reset helpdb = "lib$helpdb.mip\' >> /iraf/iraf/unix/hlib/extern.pkg cat /iraf/iraf/unix/hlib/*.helpdb.mip >> /iraf/iraf/unix/hlib/extern.pkg echo ' "' >> /iraf/iraf/unix/hlib/extern.pkg echo 'keep' >> /iraf/iraf/unix/hlib/extern.pkg %files %defattr(-,root,root) /iraf/* /dev/imt* /usr/include/* /usr/bin/* /usr/local/lib/* %changelog * Wed Apr 18 2007 - rebuild for rhel 5 * Tue Jul 12 2005 - add ECL support * Fri Jun 24 2005 - fix answers file to make it general to build root - build under FC4 * Tue Mar 1 2005 - fix binaries to jibe with patch2a * Thu Oct 21 2004 - package under FC 3 * Fri Aug 13 2004 - 2.12.2 patch 2a * Fri Feb 12 2004 - 2.12.2 Release * Fri Jan 16 2004 - 2.12.2-BETA; update to FC 1 * Fri Aug 15 2003 - updates binaries for RH 9 * Thu Dec 05 2002 - update to 2.12.1 * Mon Nov 06 2000 - added support for dynamically creating extern.pkg when other - packages are (un)installed. - entered this into obfuscated spec file contest :) * Wed Nov 01 2000 - first crack at making rpm