This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/Logtalk/scripts/linux/logtalk.spec
pmoura 42aabce1bb Logtalk 2.30.7 files.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1973 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2007-11-06 01:50:09 +00:00

184 lines
6.5 KiB
RPMSpec

Name: logtalk
Summary: Logtalk - Open source object-oriented logic programming language
Version: 2.30.7
Release: 1
License: Artistic License 2.0
Group: Development/Languages
Packager: Paulo Moura <pmoura@logtalk.org>
Source: http://logtalk.org/files/lgt2307.tar.bz2
BuildArchitectures: noarch
URL: http://logtalk.org/
Prefix: /usr/local
AutoReqProv: no
%description
Logtalk is an open source object-oriented logic programming language that can use most Prolog implementations as a back-end compiler. As a multi-paradigm language, Logtalk includes support for both prototypes and classes, protocols, component-based programming through category-based composition, event-driven programming, and multi-threading programming.
%prep
%setup -n lgt2307
%build
%install
mkdir -p /usr/local/share
rm -rf /usr/local/share/lgt2307
rm -f /usr/local/share/logtalk
mkdir /usr/local/share/lgt2307
cp -R * /usr/local/share/lgt2307
cd /usr/local/share/lgt2307
chmod a+x scripts/cleandist.sh
scripts/cleandist.sh
cd ..
ln -sf lgt2307 logtalk
cd ..
mkdir -p bin
cd bin
ln -sf ../share/logtalk/integration/bplgt.sh bplgt
ln -sf ../share/logtalk/integration/ciaolgt.sh ciaolgt
ln -sf ../share/logtalk/integration/cxlgt.sh cxlgt
ln -sf ../share/logtalk/integration/eclipselgt.sh eclipselgt
ln -sf ../share/logtalk/integration/gplgt.sh gplgt
ln -sf ../share/logtalk/integration/plclgt.sh plclgt
ln -sf ../share/logtalk/integration/qplgt.sh qplgt
ln -sf ../share/logtalk/integration/sicstuslgt.sh sicstuslgt
ln -sf ../share/logtalk/integration/swilgt.sh swilgt
ln -sf ../share/logtalk/integration/xsblgt.sh xsblgt
ln -sf ../share/logtalk/integration/xsbmtlgt.sh xsbmtlgt
ln -sf ../share/logtalk/integration/yaplgt.sh yaplgt
ln -sf ../share/logtalk/scripts/cplgtdirs.sh cplgtdirs
ln -sf ../share/logtalk/xml/lgt2pdf.sh lgt2pdf
ln -sf ../share/logtalk/xml/lgt2html.sh lgt2html
ln -sf ../share/logtalk/xml/lgt2xml.sh lgt2xml
%clean
cd /usr/local/share
rm -rf lgt2307
rm -f logtalk
cd ../bin
rm -f bplgt
rm -f ciaolgt
rm -f cplgtdirs
rm -f cxlgt
rm -f eclipselgt
rm -f gplgt
rm -f lgt2html
rm -f lgt2pdf
rm -f lgt2xml
rm -f plclgt
rm -f qplgt
rm -f sicstuslgt
rm -f swilgt
rm -f xsblgt
rm -f xsbmtlgt
rm -f yaplgt
%files
%defattr(-,root,root)
%doc /usr/local/share/lgt2307/BIBLIOGRAPHY.bib
%doc /usr/local/share/lgt2307/CUSTOMIZE.txt
%doc /usr/local/share/lgt2307/INSTALL.txt
%doc /usr/local/share/lgt2307/LICENSE.txt
%doc /usr/local/share/lgt2307/QUICK_START.txt
%doc /usr/local/share/lgt2307/README.txt
%doc /usr/local/share/lgt2307/RELEASE_NOTES.txt
%doc /usr/local/share/lgt2307/UPGRADING.txt
/usr/local/share/lgt2307/compiler
/usr/local/share/lgt2307/configs
/usr/local/share/lgt2307/contributions
/usr/local/share/lgt2307/examples
/usr/local/share/lgt2307/integration
/usr/local/share/lgt2307/libpaths
/usr/local/share/lgt2307/library
%docdir /usr/local/share/lgt2307/manuals
/usr/local/share/lgt2307/manuals
/usr/local/share/lgt2307/scripts
/usr/local/share/lgt2307/wenv
/usr/local/share/lgt2307/xml
/usr/local/share/logtalk
/usr/local/bin/cplgtdirs
/usr/local/bin/lgt2pdf
/usr/local/bin/lgt2html
/usr/local/bin/lgt2xml
/usr/local/bin/bplgt
/usr/local/bin/ciaolgt
/usr/local/bin/cxlgt
/usr/local/bin/eclipselgt
/usr/local/bin/gplgt
/usr/local/bin/plclgt
/usr/local/bin/qplgt
/usr/local/bin/sicstuslgt
/usr/local/bin/swilgt
/usr/local/bin/xsblgt
/usr/local/bin/xsbmtlgt
/usr/local/bin/yaplgt
%post
echo
echo "Installed Logtalk on \"$RPM_INSTALL_PREFIX/share\"."
echo
echo "Links to the \"cplgtdirs\", \"lgt2pdf\", \"lgt2html\", and \"lgt2xml\" scripts"
echo "have been created on \"$RPM_INSTALL_PREFIX/bin\"; you may need to add this directory"
echo "to your execution path."
echo
echo "The following integration scripts are installed for running Logtalk"
echo "with selected back-end Prolog compilers:"
echo
echo " B-Prolog: bplgt (first run must use sudo)"
echo " CIAO: ciaolgt (first run must use sudo)"
echo " CxProlog: cxlgt"
echo " ECLiPSe: eclipselgt"
echo " GNU Prolog: gplgt"
echo " K-Prolog: plclgt"
echo " Qu-Prolog: qplgt"
echo " SICStus Prolog: sicstuslgt"
echo " SWI-Prolog: swilgt"
echo " XSB: xsblgt (first run must use sudo)"
echo " XSB (MT): xsbmtlgt (first run must use sudo)"
echo " YAP: yaplgt"
echo
echo "The Prolog integration scripts can be found on \"$RPM_INSTALL_PREFIX/bin\"."
echo "Make sure that the Prolog compilers are properly installed and available"
echo "on your execution path."
echo
echo "If you get an unexpected failure when using one of the Prolog integration"
echo "scripts, consult the \"$RPM_INSTALL_PREFIX/share/logtalk/configs/NOTES.txt\" file"
echo "for compatibility notes."
echo
mkdir -p /etc/profile.d
echo "# Logtalk environment setup" > /etc/profile.d/logtalk.sh
echo "" >> /etc/profile.d/logtalk.sh
echo "# Logtalk installation directory:" >> /etc/profile.d/logtalk.sh
echo "export LOGTALKHOME=$RPM_INSTALL_PREFIX/share/logtalk" >> /etc/profile.d/logtalk.sh
echo "" >> /etc/profile.d/logtalk.sh
echo "# Default location for Logtalk end-user files:" >> /etc/profile.d/logtalk.sh
echo "export LOGTALKUSER=\$HOME/logtalk" >> /etc/profile.d/logtalk.sh
chmod a+x /etc/profile.d/logtalk.sh
echo "# Logtalk environment setup" > /etc/profile.d/logtalk.csh
echo "" >> /etc/profile.d/logtalk.csh
echo "# Logtalk installation directory:" >> /etc/profile.d/logtalk.csh
echo "setenv LOGTALKHOME $RPM_INSTALL_PREFIX/share/logtalk" >> /etc/profile.d/logtalk.csh
echo "" >> /etc/profile.d/logtalk.csh
echo "# Default location for Logtalk end-user files:" >> /etc/profile.d/logtalk.csh
echo "setenv LOGTALKUSER \$HOME/logtalk" >> /etc/profile.d/logtalk.csh
chmod a+x /etc/profile.d/logtalk.csh
echo "Defined the following environment variables for all users:"
echo
echo " Logtalk installation directory: LOGTALKHOME = $RPM_INSTALL_PREFIX/share/logtalk"
echo " Default Logtalk user files directory: LOGTALKUSER = \$HOME/logtalk"
echo
echo "You may need to logout and login again or start a new shell in order to"
echo "use the new environment variables."
echo
echo "Users may change the default value of the LOGTALKUSER environment variable"
echo "in their shell configuration files if they already use, or want to use, a "
echo "different location for the Logtalk user files directory. This directory "
echo "is created by running the \"cplgtdirs\" shell script, which must be run "
echo "once by each user before using the integration scripts."
echo
echo "Logtalk basic installation completed."
echo
%postun
rm -f /etc/profile.d/logtalk.sh 2> /dev/null
rm -f /etc/profile.d/logtalk.csh 2> /dev/null