# SliTaz package receipt. PACKAGE="slib" VERSION="3b6" CATEGORY="office" SHORT_DESC="Portable library for the programming language Scheme." MAINTAINER="domcox@slitaz.org" LICENSE="PublicDomain" WEB_SITE="https://people.csail.mit.edu/jaffer/SLIB" TARBALL="$PACKAGE-$VERSION.tar.gz" WGET_URL="https://groups.csail.mit.edu/mac/ftpdir/scm/$TARBALL" DEPENDS="guile" BUILD_DEPENDS="guile texinfo" # What is the latest version available today? current_version() { wget -O - ${WGET_URL%/*} 2>/dev/null | \ sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q } # Rules to configure and make the package. compile_rules() { ./configure --prefix=/usr && sed -i 's/SCHEME = scm/SCHEME = guile/' Makefile echo "# install-script" make install-script echo "# install files" mkdir -p $install/usr/share/slib install -m644 *.scm *.init *.xyz *.txt *.dat *.ps \ $install/usr/share/slib echo "# creating SLIB initialization file" mkdir -p $install/usr/share/guile/1.8 ln -s $install/usr/share/slib $install/usr/share/guile/site } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { cp -a $install/* $fs rm -f $fs/usr/share/guile/site ln -s ../slib $fs/usr/share/guile/site } post_install() { # add path to initialization file sed -i s'#(load-from.*#(load-from-path "/usr/share/slib/guile.init")#' \ "$1/usr/share/guile/1.8/ice-9/slib.scm" printf "Creating catalog" chroot "$1/" guile -c "((use-modules (ice-9 slib))(require 'new-catalog)(quit))" status } post_remove() { rm -f "$1/usr/share/guile/1.8/slibcat" }