wok-6.x annotate minetest/receipt @ rev 24132
Up tazinst (114)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Oct 23 15:07:33 2021 +0000 (2021-10-23) |
parents | fa14bf00ffaa |
children |
rev | line source |
---|---|
pascal@17696 | 1 # SliTaz package receipt. |
pascal@17696 | 2 |
pascal@17696 | 3 PACKAGE="minetest" |
Hans-G?nter@23180 | 4 VERSION="5.1.1" |
pascal@17696 | 5 CATEGORY="games" |
Hans-G?nter@21439 | 6 SHORT_DESC="An open source voxel game engine and game." |
pascal@17696 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@17696 | 8 LICENSE="MIT" |
pascal@21649 | 9 WEB_SITE="https://www.minetest.net/" |
Hans-G?nter@21439 | 10 |
pascal@17696 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
Hans-G?nter@21439 | 12 WGET_URL="https://github.com/$PACKAGE/$PACKAGE/archive/$VERSION.tar.gz" |
pascal@21450 | 13 TARBALL2="${PACKAGE}_game-$VERSION.tar.gz" |
pascal@21450 | 14 WGET_URL2="https://github.com/$PACKAGE/${PACKAGE}_game/archive/$VERSION.tar.gz" |
pascal@17697 | 15 EXTRA_SOURCE_FILES="$WGET_URL2" |
pascal@17696 | 16 |
Hans-G?nter@21439 | 17 DEPENDS="curl irrlicht jpeg libglu-mesa libpng libspatialindex libssl \ |
Hans-G?nter@21439 | 18 libvorbis luajit mesa minetest-common openal sqlite" |
Hans-G?nter@21439 | 19 BUILD_DEPENDS="cmake curl-dev freetype-dev gcc83 irrlicht-dev jpeg-dev \ |
Hans-G?nter@21439 | 20 libglu-mesa-dev libogg-dev libpng-dev libspatialindex-dev \ |
Hans-G?nter@21439 | 21 libvorbis-dev luajit-dev mesa-dev openal-dev sqlite-dev \ |
Hans-G?nter@21439 | 22 xorg-libXxf86vm-dev" |
pascal@17696 | 23 |
pascal@24055 | 24 current_version() |
pascal@24055 | 25 { |
pascal@24055 | 26 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \ |
pascal@24055 | 27 sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q' |
pascal@24055 | 28 } |
pascal@24055 | 29 |
pascal@17696 | 30 # Rules to configure and make the package. |
pascal@17696 | 31 compile_rules() |
pascal@17696 | 32 { |
Hans-G?nter@21439 | 33 # As gcc-4.6.3 is insufficient, the most recent version of gcc |
Hans-G?nter@21439 | 34 # available in the cooking repository is used |
Hans-G?nter@21447 | 35 export CC=gcc-83 |
Hans-G?nter@21447 | 36 export CXX=g++-83 |
Hans-G?nter@21439 | 37 |
pascal@17696 | 38 [ -s "$SOURCES_REPOSITORY/$TARBALL2" ] || wget --no-check-certificate \ |
pankso@19862 | 39 -O "$SOURCES_REPOSITORY/$TARBALL2" ${EXTRA_SOURCE_FILES} |
pankso@19862 | 40 { |
pankso@19862 | 41 cd games/ |
pankso@19862 | 42 tar xf $SOURCES_REPOSITORY/$TARBALL2 |
pankso@19862 | 43 cd .. |
pankso@19862 | 44 } |
Hans-G?nter@21439 | 45 cd build && |
Hans-G?nter@21439 | 46 cmake \ |
Hans-G?nter@21439 | 47 -DCMAKE_INSTALL_PREFIX=/usr \ |
Hans-G?nter@21439 | 48 -DBUILD_CLIENT=TRUE \ |
Hans-G?nter@21439 | 49 -DBUILD_SERVER=TRUE \ |
Hans-G?nter@21439 | 50 -DENABLE_SPATIAL=TRUE \ |
Hans-G?nter@21439 | 51 -DENABLE_GETTEXT=TRUE \ |
Hans-G?nter@21439 | 52 -DVERSION_EXTRA="SliTaz" \ |
Hans-G?nter@21439 | 53 .. && |
pascal@21450 | 54 make && |
Hans-G?nter@21439 | 55 make install |
pascal@17696 | 56 } |
pascal@17696 | 57 |
pascal@17696 | 58 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@17696 | 59 genpkg_rules() |
pascal@17696 | 60 { |
Hans-G?nter@21439 | 61 mkdir -p ${fs}/usr/bin |
Hans-G?nter@21439 | 62 mkdir -p ${fs}/usr/share |
Hans-G?nter@21439 | 63 |
Hans-G?nter@21439 | 64 cp -a ${install}/usr/bin/${PACKAGE} ${fs}/usr/bin |
Hans-G?nter@21439 | 65 cp -a ${install}/usr/share/icons $fs/usr/share |
pascal@17696 | 66 } |
pascal@21785 | 67 |
pascal@21785 | 68 # Pre and post install commands for Tazpkg. |
pascal@21785 | 69 post_install() |
pascal@21785 | 70 { |
pascal@21785 | 71 case " $(. $1/etc/rcS.conf; echo $LOAD_MODULES) " in |
pascal@21785 | 72 *\ snd-pcm-oss\ *) ;; |
pascal@22053 | 73 *) sed -i 's|LOAD_MODULES="|&snd-pcm-oss |' $1/etc/rcS.conf |
pascal@21785 | 74 modprobe snd-pcm-oss;; |
pascal@21785 | 75 esac |
pascal@21785 | 76 } |