|
Home | Instruments | Science | Experiments | SiteMap |
Notes:
Building the RPM file for GSAS with EXPGUI
- the RPM files must be built in /usr/src/redhat. This means either the root account must be used or the ownership or protection of the directories must be changed, for example using
chown -R user.856 /usr/src/redhat- The rpm program was updated in version 7.0 of RedHat Linux. To create an rpm file that can be loaded by an older version of Linux, either work in 6.2 or use an older version of rpm (for example, use /mnt/62/bin/rpm in place of the rpm command below).
Steps to build a RPM file
The file /usr/src/redhat/RPMS/i386/GSAS-EXPGUI-y.m.d-x.i386.rpm should be distributed.
- Place the following files in /usr/src/redhat/SOURCES:
- gsaskit.tar.gz
- This is the standard Linux GSAS distribution, as prepared by Bob Von Dreele at Los Alamos
- expgui_ALPHA.tar.gz
- This is the latest EXPGUI distribution, as prepared by Brian Toby at NIST
- gsas_patch
- This file contains patches that correct text files, these are created using the diff command. If this file is not needed, it can be empty (create using touch gsas_patch).
- gsasupdates.tar.gz
- This file contains updated programs and other files that cannot be patched. Create this file using
cd /home/gsas tar cvzf /tmp/gsasupdates.tar.gz exe/exptool expgui/doc/notes.htmlNote that the path used when creating the tar file must be relative to the gsas directory. (e.g. it would not work to use cd /home/gsas/exe; tar cvzf /tmp/... exptool). If this file is not needed, it can be empty (create using touch gsasupdates.tar.gz).- GSASManual.pdf
- readme.linux
- gsasnews.txt
- These are documentation files downloaded from Los Alamos
- Copy the gsas.spec file to /usr/src/redhat/SPECS
- Edit the first line of /usr/src/redhat/SPECS/gsas.spec to reflect the release date of the software and/or change the release number on line 2.
- Use command
/mnt/62/bin/rpm -ba /usr/src/redhat/SPECS/gsas.specto create /usr/src/redhat/SRPMS/GSAS-EXPGUI-y.m.d-x.src.rpm and /usr/src/redhat/RPMS/i386/GSAS-EXPGUI-y.m.d-x.i386.rpmThe SPEC file
Summary: The GSAS Package and EXPGUI front end Name: GSAS-EXPGUI Version: 2001.9.25 Release: 1 Source0: ftp://ftp.lanl.gov/public/gsas/linux/gsaskit.tar.gz Source1: ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/expgui_ALPHA.tar.gz Source2: ftp://ftp.ncnr.nist.gov/pub/cryst/gsas/gsasupdates.tar.gz Source3: ftp://ftp.lanl.gov/public/gsas/manual/GSASManual.pdf Source4: ftp://ftp.lanl.gov/public/gsas/linux/readme.linux Source5: ftp://ftp.lanl.gov/public/gsas/gsasnews.txt Copyright: GSAS (c) University of California; EXPGUI public domain Group: Crystallography Requires: tcl >= 8.0, tk >= 8.0, blt Packager: Brian H. TobyURL: http://www.ncnr.nist.gov/xtal/software/gsas.html Prefix: /home %description GSAS (General Structure Analysis System) is a crystallographic package for structure refinement using powder and single crystal x-ray and neutron data. Virtually all data types (CW, TOF, ED) are supported. GSAS is written by Allen C. Larson and Robert B. Von Dreele of Los Alamos National Laboratory. EXPGUI is a graphical user interface to the GSAS package, written by Brian H. Toby of the NIST Center for Neutron Research. This contains the 2001 Jun 11 distribution of GSAS and v1.47 of EXPGUI. %prep rm -rf $RPM_BUILD_DIR/gsas mkdir gsas cd gsas zcat $RPM_SOURCE_DIR/gsaskit.tar.gz | tar xvf - cp $RPM_SOURCE_DIR/GSASManual.pdf . cp $RPM_SOURCE_DIR/gsasnews.txt . cp $RPM_SOURCE_DIR/readme.linux . mkdir expgui cd expgui zcat $RPM_SOURCE_DIR/expgui_ALPHA.tar.gz | tar xvf - cd .. # apply patches & corrections sed -e '1s/local\///' expgui/expgui > /tmp/x; mv /tmp/x expgui/expgui sed -e '1s/local\///' expgui/excledt > /tmp/x; mv /tmp/x expgui/excledt sed -e '1s/local\///' expgui/liveplot > /tmp/x; mv /tmp/x expgui/liveplot sed -e '1s/local\///' expgui/lstview > /tmp/x; mv /tmp/x expgui/lstview sed -e '1s/local\///' expgui/widplt > /tmp/x; mv /tmp/x expgui/widplt chmod +x expgui/expgui expgui/excledt expgui/liveplot expgui/lstview expgui/widplt # this patch was created using: diff -c gsas /home/gsas/gsas > /tmp/gsas_patch # where /home/gsas/gsas is the corrected file patch < $RPM_SOURCE_DIR/gsas_patch # should I make this conditional if file exists? zcat $RPM_SOURCE_DIR/gsasupdates.tar.gz | tar xvf - chown -R root.root $RPM_BUILD_DIR/gsas %build %install rm -rf /home/gsas mkdir /home/gsas cp -rp $RPM_BUILD_DIR/gsas /home/ %post ln -sf $RPM_INSTALL_PREFIX/gsas/gsas /usr/bin/gsas ln -sf $RPM_INSTALL_PREFIX/gsas/expgui/expgui /usr/bin/expgui %clean rm -rf $RPM_BUILD_DIR/gsas /home/gsas %postun rm -f /usr/bin/gsas /usr/bin/expgui %files %doc /home/gsas/expgui/doc/* %doc /home/gsas/*.pdf %doc /home/gsas/gsasnews.txt %doc /home/gsas/readme.linux /home/gsas/count /home/gsas/gsas /home/gsas/upcase /home/gsas/data/* /home/gsas/example/* /home/gsas/exe/* /home/gsas/macros/* /home/gsas/pgl/* /home/gsas/expgui/*.tcl /home/gsas/expgui/BWidget-1.2.1/* /home/gsas/expgui/example* /home/gsas/expgui/expgui /home/gsas/expgui/gsastcl* /home/gsas/expgui/liveplot /home/gsas/expgui/bkgedit /home/gsas/expgui/excledt /home/gsas/expgui/lstview /home/gsas/expgui/spacegrp.ref /home/gsas/expgui/widplt
Comments, corrections or questions: crystal@NIST.gov
Last modified 09-February-2005
$Revision: 1.4 $ $Date: 2002/04/12 19:06:39 $