wok annotate ocaml/receipt @ rev 24055

Add current_version for most github hosted softwares
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Jun 08 08:46:05 2021 +0000 (2021-06-08)
parents e1e99c585768
children ad300ac54f56
rev   line source
pascal@1677 1 # SliTaz package receipt.
pascal@1677 2
pascal@1677 3 PACKAGE="ocaml"
Hans-G?nter@23255 4 VERSION="4.10.0"
pascal@1677 5 CATEGORY="system-tools"
Hans-G?nter@21592 6 TAGS="language programming"
pascal@1677 7 SHORT_DESC="General-purpose programming language designed for safety and reliability."
pascal@1677 8 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15601 9 LICENSE="QPL LGPL2"
Hans-G?nter@21592 10 WEB_SITE="https://ocaml.org/"
Hans-G?nter@21592 11
pascal@1677 12 TARBALL="$PACKAGE-$VERSION.tar.gz"
Hans-G?nter@21592 13 WGET_URL="https://github.com/$PACKAGE/$PACKAGE/archive/$VERSION.tar.gz"
pascal@1677 14
pascal@15601 15 DEPENDS="xorg-libX11 xorg-libXau xorg-libXdmcp"
pascal@15601 16
pascal@24055 17 current_version()
pascal@24055 18 {
pascal@24055 19 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
pascal@24055 20 sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q'
pascal@24055 21 }
pascal@24055 22
pascal@1677 23 # Rules to configure and make the package.
pascal@1677 24 compile_rules()
pascal@1677 25 {
Hans-G?nter@21592 26 ./configure \
Hans-G?nter@21592 27 --prefix /usr \
Hans-G?nter@21592 28 --bindir /usr/bin \
Hans-G?nter@21592 29 --libdir /usr/lib \
Hans-G?nter@21592 30 --mandir /usr/share/man/man1 \
Hans-G?nter@21592 31 $(echo $CONFIGURE_ARGS | sed 's/--build=[^ ]*//' | sed 's/=/ /g') &&
gokhlayeh@8760 32 make -j1 world opt &&
pascal@3997 33 make install
pascal@1677 34 }
pascal@1677 35
pascal@1677 36 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1677 37 genpkg_rules()
pascal@1677 38 {
pascal@1677 39 mkdir -p $fs/usr
Hans-G?nter@21592 40
slaxemulator@12317 41 cp -a $install/usr/bin $fs/usr
slaxemulator@12317 42 cp -a $install/usr/lib $fs/usr
pascal@1677 43 }