wok-6.x view slib/receipt @ rev 24982

Update some wget_url
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun May 08 13:06:36 2022 +0000 (2022-05-08)
parents 67da1e63fb3d
children
line source
1 # SliTaz package receipt.
3 PACKAGE="slib"
4 VERSION="3b6"
5 CATEGORY="office"
6 SHORT_DESC="Portable library for the programming language Scheme."
7 MAINTAINER="domcox@slitaz.org"
8 LICENSE="PublicDomain"
9 WEB_SITE="https://people.csail.mit.edu/jaffer/SLIB"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="https://groups.csail.mit.edu/mac/ftpdir/scm/$TARBALL"
14 DEPENDS="guile"
15 BUILD_DEPENDS="guile texinfo"
17 # What is the latest version available today?
18 current_version()
19 {
20 wget -O - ${WGET_URL%/*} 2>/dev/null | \
21 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 ./configure --prefix=/usr &&
29 sed -i 's/SCHEME = scm/SCHEME = guile/' Makefile
31 echo "# install-script"
32 make install-script
34 echo "# install files"
35 mkdir -p $install/usr/share/slib
36 install -m644 *.scm *.init *.xyz *.txt *.dat *.ps \
37 $install/usr/share/slib
39 echo "# creating SLIB initialization file"
40 mkdir -p $install/usr/share/guile/1.8
41 ln -s $install/usr/share/slib $install/usr/share/guile/site
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 cp -a $install/* $fs
48 rm -f $fs/usr/share/guile/site
49 ln -s ../slib $fs/usr/share/guile/site
50 }
52 post_install()
53 {
54 # add path to initialization file
55 sed -i s'#(load-from.*#(load-from-path "/usr/share/slib/guile.init")#' \
56 "$1/usr/share/guile/1.8/ice-9/slib.scm"
57 printf "Creating catalog"
58 chroot "$1/" guile -c "((use-modules (ice-9 slib))(require 'new-catalog)(quit))"
59 status
60 }
62 post_remove()
63 {
64 rm -f "$1/usr/share/guile/1.8/slibcat"
65 }