wok view freeciv/receipt @ rev 24385

Add some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Feb 07 11:38:23 2022 +0000 (2022-02-07)
parents 7006fcec1248
children ad9008f821da
line source
1 # SliTaz package receipt.
3 PACKAGE="freeciv"
4 VERSION="2.6.1"
5 CATEGORY="games"
6 TAGS="strategy"
7 SHORT_DESC="Empire-building strategy game"
8 MAINTAINER="pascal.bellard@slitaz.org"
9 LICENSE="GPL2"
10 WEB_SITE="http://www.freeciv.org/"
12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
13 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
15 DEPENDS="bzip2 gettext-base gtk+3 libsdl-mixer ncurses readline
16 xorg-libXdamage zlib"
17 BUILD_DEPENDS="bzip2-dev curl-dev expat-dev gettext glibc-locale
18 gtk+3-dev libsdl-mixer-dev ncurses-dev readline-dev zlib-dev"
20 # What is the latest version available today?
21 current_version()
22 {
23 wget -O - https://sourceforge.net/projects/freeciv/files/ 2>/dev/null | \
24 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
25 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
26 sed '/scope="row/!d;/tar/!d;s|.*/freeciv-||;s|.tar.*||;q'
27 }
29 # Rules to configure and make the package.
30 compile_rules()
31 {
32 sed -i 's/--best/-9/' \
33 Makefile* \
34 data/scenarios/Makefile*
36 ./configure \
37 --enable-client=gtk \
38 --enable-shared \
39 $CONFIGURE_ARGS &&
40 make -j1 &&
41 make -j1 install
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 mkdir -p $fs/usr/share
48 mkdir -p $fs/usr/lib
50 cp -a $install/usr/bin $fs/usr
51 cp -a $install/usr/lib/*.so* $fs/usr/lib
52 cp -a $install/usr/share/freeciv $fs/usr/share
54 # Add icons for desktop files
55 cp -a $install/usr/share/icons/hicolor/32x32/apps \
56 $fs/usr/share/pixmaps
57 }