# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header:$ inherit eutils VER="MuPAD-2.5.3" MY_P="MuPAD-2.5.3-2.i386" DESCRIPTION="MuPAD is an open computer algebra system" SRC_URI="ftp://ftp.mupad.de/MuPAD/distrib/unix/${MY_P}.rpm" HOMEPAGE="http://www.mupad.de/index_uni.shtml" SLOT="0" KEYWORDS="x86" LICENSE="mupad" IUSE="" DEPEND="virtual/libc" RDEPEND=">=dev-lang/tk-8.3 >=app-arch/rpm2targz-9.0-r2 " src_unpack() { cp ${DISTDIR}/${A} ${T} cd ${T} einfo "Convert RPM to a TGZ package" rpm2targz ${A} cd ${WORKDIR} tar -xzvf ${T}/${MY_P}.tar.gz } src_install() { dodir /usr/lib/MuPAD mv ${WORKDIR}/usr/share/ ${D}/usr mv ${WORKDIR}/usr/local/bin/ ${D} mv ${WORKDIR}/usr/local/${VER}/* ${D}/usr/lib/MuPAD cd ${D}/bin/ einfo "Modifying scripts to point to the correct install dir" FILES=$(ls -1) for file in $FILES do cat $file | sed 's/local/lib/g' > $file.txt mv $file.txt $file done chmod a+x * } pkg_postinst() { echo "" einfo "SOME IMPORTANT NOTES:" einfo "" einfo " - This version of MuPAD has Scilab functionality" einfo " integrated, so if you have Scilab installed already, " einfo " you might find it to be redundant." einfo "" einfo " - MuPAD is only free for non-commercial use. Visit" einfo " http://www.mupad.com/ for commercial downloads." einfo "" einfo " - In this non-commercial version, you must register to" einfo " obtain a license key in order to deactivate the memory" einfo " limit. The memory limit prevents large calculations." einfo " Read the documentation or visit" einfo "" einfo " ${HOMEPAGE}" einfo "" einfo " for more info." echo "" }