wok-6.x view autofs/receipt @ rev 24336

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jan 28 18:19:21 2022 +0000 (2022-01-28)
parents 6f4496f6c83c
children 5f6c5106b1f5
line source
1 # SliTaz package receipt.
3 PACKAGE="autofs"
4 VERSION="5.1.8"
5 CATEGORY="system-tools"
6 TAGS="filesystem"
7 SHORT_DESC="Linux automounter."
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="GPL2"
10 WEB_SITE="https://www.kernel.org/pub/linux/daemons/autofs/v${VERSION%%.*}"
12 TARBALL="$PACKAGE-$VERSION.tar.xz"
13 WGET_URL="$WEB_SITE/$TARBALL"
15 DEPENDS="linux-autofs"
16 BUILD_DEPENDS="cyrus-sasl-dev flex krb5-dev libxml2-dev openldap-dev openssl-dev"
18 CONFIG_FILES="/etc/autofs.conf"
20 TAZPANEL_DAEMON="man|help::automount|edit::/etc/auto.misc|options::AUTOMOUNT_OPTIONS|web::$WEB_SITE"
22 # What is the latest version available today?
23 current_version()
24 {
25 wget -O - ${WGET_URL%/*/*}/$(wget -O - ${WGET_URL%/*/*} 2>/dev/null | \
26 sed '/>v/!d;s|.*="||;s|".*||' | sort -Vr | sed q) 2>/dev/null | \
27 sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
28 }
30 # Rules to configure and make the package.
31 compile_rules()
32 {
33 sed -i -e 's|-b --suffix=.orig||' \
34 -e 's|install -v|install|' \
35 */Makefile*
37 ./configure \
38 --prefix=/usr \
39 --infodir=/usr/share/info \
40 --mandir=/usr/share/man \
41 $CONFIGURE_ARGS &&
42 make LDFLAGS="-lrt" &&
43 make DESTDIR=$DESTDIR install
44 }
46 # Rules to gen a SliTaz package suitable for Tazpkg.
47 genpkg_rules()
48 {
49 mkdir -p $fs/etc
50 mkdir -p $fs/usr
52 cp -a $stuff/etc/* $fs/etc
53 # Create empty configuration file
54 touch $fs/etc/autofs.conf
55 cp -a $install/usr/lib $fs/usr
56 cp -a $install/usr/sbin $fs/usr
57 }
59 # Post install commands for Tazpkg.
60 post_install()
61 {
62 mkdir -p "$1/mnt/auto" 2>/dev/null
63 }