Commit a6c0d2b3 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play: add cuda-z support

parent 3e90db02
#!/bin/sh
TAR="$1"
#VERSION="$2"
RETURNTARNAME="$2"
PRODUCT="cuda-z"
. $(dirname $0)/common.sh
CURDIR="$(pwd)"
PKGDIR="$(mktemp -d)"
trap "rm -fr $PKGDIR" EXIT
cd $PKGDIR || fatal
PKGNAME="$(basename $TAR .run | tr "[A-Z_]" "[a-z-]")"
install -D $TAR opt/$PRODUCT/$PRODUCT || fatal
erc pack $CURDIR/$PKGNAME.tar opt/$PRODUCT
return_tar $PKGNAME.tar
#!/bin/sh
DESCRIPTION="CUDA-Z from the official site"
PKGNAME=cuda-z
SUPPORTEDARCHES="x86_64 x86"
. $(dirname $0)/common.sh
arch="$(epm print info -a)"
case "$arch" in
x86_64)
file="CUDA-Z-*-64bit.run/download"
;;
x86)
file="CUDA-Z-*-32bit.run/download"
;;
*)
fatal "$arch arch is not supported"
;;
esac
pkgtype="$(epm print info -p)"
PKGURL="$(eget --list --latest https://cuda-z.sourceforge.net/ "$file" )"
epm pack --install $PKGNAME "$PKGURL"
#!/bin/sh -x
# It will run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"
PRODUCT=cuda-z
. $(dirname $0)/common.sh
subst "s|^Group:.*|Group: Graphics|" $SPEC
subst "s|^License: unknown$|License: GPLv2|" $SPEC
subst "s|^URL:.*|URL: http://cuda-z.sourceforge.net/|" $SPEC
subst "s|^Summary:.*|Summary: CUDA-Z|" $SPEC
add_bin_link_command
# create desktop file
mkdir -p $BUILDROOT/usr/share/applications/
cat <<EOF >$BUILDROOT/usr/share/applications/$PRODUCT.desktop
[Desktop Entry]
Version=1.0
Name=CUDA-Z
Comment=CUDA Information Utility
Type=Application
Icon=$PRODUCT
Exec=$PRODUCT
Terminal=false
EOF
pack_file /usr/share/applications/$PRODUCT.desktop
install_file "https://cuda-z.sourceforge.net/img/web-download-detect.png" /usr/share/pixmaps/$PRODUCT.png
# Running 32 bit cuda-z on Ubuntu
# libc6:i386 libstdc++6:i386 zlib1g:i386 libx11-6:i386 libxext6:i386 libxrender1:i386
# http://blog.redscorp.net/?p=94
# static linked
# strace -f cuda-z 2>&1 | grep \.so | grep lib64/lib | grep fstat | sed -e 's|.*<||' -e 's|>.*||' | sort -u | epm --quiet --short qf | sort -u | xargs -n100
# glibc-core glibc-pthread libgcc1 libstdc++6 libX11 libXau libxcb libXcursor libXdmcp libXext libXfixes libXrender
if [ "$(epm print info -s)" = "alt" ] ; then
add_requires glibc-core glibc-pthread libgcc1 libstdc++6 libX11 libXau libxcb libXcursor libXdmcp libXext libXfixes libXrender
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment