wok view git/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 | 376c63dc731b |
children | 2ba3c02cf43f |
line source
1 # SliTaz package receipt.
3 PACKAGE="git"
4 VERSION="2.26.2"
5 CATEGORY="development"
6 SHORT_DESC="Fast version control system."
7 MAINTAINER="b1+slitaz@nagel.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://git-scm.com/"
11 TARBALL="$PACKAGE-$VERSION.tar.xz"
12 WGET_URL="https://www.kernel.org/pub/software/scm/git/$TARBALL"
14 DEPENDS="cacerts curl expat openssl zlib"
15 BUILD_DEPENDS="curl-dev expat-dev openssl-dev perl python-dev zlib-dev"
17 # NO_NSEC=1
18 CROSS_BUGS="bug: can't run test and make package."
19 #HOST_ARCH="i486 arm"
21 # What is the latest version available today?
22 current_version()
23 {
24 wget -O - ${WGET_URL%/*} 2>/dev/null | \
25 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
26 }
28 # Rules to configure and make the package.
29 compile_rules()
30 {
31 ./configure \
32 --prefix=/usr \
33 --libexecdir=/usr/lib \
34 --without-tcltk \
35 $CONFIGURE_ARGS &&
36 make -j 1 THREADED_DELTA_SEARCH=1 &&
37 make THREADED_DELTA_SEARCH=1 DESTDIR=$DESTDIR install
38 }
40 # Rules to gen a SliTaz package suitable for Tazpkg.
41 genpkg_rules()
42 {
43 mkdir -p $fs/etc/init.d
45 cp -a $stuff/git-daemon $fs/etc/init.d
46 cp -a $install/usr $fs/
48 strip -s $fs/usr/lib/git-core/* 2>/dev/null || true
49 }
51 # edit daemons.conf.
52 post_install()
53 {
54 if ! grep -q 'GIT_OPTIONS' "$1/etc/daemons.conf"; then
55 mkdir -p "$1/var/www/git"
56 echo '# Git daemon options.' >> "$1/etc/daemons.conf"
57 echo 'GIT_REPO="/var/www/git/"' >> "$1/etc/daemons.conf"
58 echo 'GIT_OPTIONS="--detach --syslog --verbose --base-path=$GIT_REPO $GIT_REPO"' >> "$1/etc/daemons.conf"
59 echo '' >> "$1/etc/daemons.conf"
60 fi
61 }