Mercurial > vanilla
changeset 1077:e47d241cc53c
system/sg3-utils: initial import, closes #2325
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 03 Sep 2019 12:35:11 +0200 |
parents | 8645ec8420e1 |
children | 90f3c488675c |
files | system/sg3-utils/sg3-utils.sh system/sg3-utils/sg3-utils.sha1 |
diffstat | 2 files changed, 53 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/system/sg3-utils/sg3-utils.sh Tue Sep 03 12:35:11 2019 +0200 @@ -0,0 +1,52 @@ +#!/bin/busybox sh +# +# Copyright (c) 2019 David Demelier <markand@malikania.fr> +# +# Permission to use, copy, modify, and/or distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# + +PKGNAME=sg3-utils +PKGVERSION=1.44 +PKGREVISION=1 +PKGLICENSE="BSD2CLAUSE" +PKGSUMMARY="SCSI utilities" +PKGDOWNLOAD="http://sg.danny.cz/sg/p/sg3_utils-$PKGVERSION.tar.xz" + +: ${CHOST:=$(uname -m)-linux-musl} +: ${CBUILD:=$(uname -m)-linux-musl} +: ${CC:=clang} +: ${CFLAGS:=-O2} +: ${LDFLAGS:=} +: ${LIBS:=} + +build() +{ + rm -rf sg3_utils-$PKGVERSION + tar xvf sg3_utils-$PKGVERSION.tar.xz + cd sg3_utils-$PKGVERSION + + CC="$CC" \ + CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" \ + LIBS="$LIBS" \ + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix= + make + make install DESTDIR=$DESTDIR + find $DESTDIR -type f -name "*.la" -delete + + cd .. + rm -rf sg3_utils-$PKGVERSION +}