annotate system/sg3-utils/sg3-utils.sh @ 1196:dc0ccdbedc04

terminals/alacritty: initial import, closes #2427
author David Demelier <markand@malikania.fr>
date Wed, 30 Oct 2019 20:05:00 +0100
parents 297b5eef115e
children 6710613b88b9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1115
297b5eef115e vanilla: change shebangs to /bin/sh
David Demelier <markand@malikania.fr>
parents: 1077
diff changeset
1 #!/bin/sh
1077
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 #
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 #
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 # Permission to use, copy, modify, and/or distribute this software for any
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 # purpose with or without fee is hereby granted, provided that the above
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 # copyright notice and this permission notice appear in all copies.
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 #
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 #
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
17
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
18 PKGNAME=sg3-utils
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
19 PKGVERSION=1.44
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
20 PKGREVISION=1
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
21 PKGLICENSE="BSD2CLAUSE"
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 PKGSUMMARY="SCSI utilities"
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
23 PKGDOWNLOAD="http://sg.danny.cz/sg/p/sg3_utils-$PKGVERSION.tar.xz"
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
24
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
25 : ${CHOST:=$(uname -m)-linux-musl}
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
26 : ${CBUILD:=$(uname -m)-linux-musl}
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
27 : ${CC:=clang}
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
28 : ${CFLAGS:=-O2}
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
29 : ${LDFLAGS:=}
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
30 : ${LIBS:=}
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
31
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
32 build()
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
33 {
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
34 rm -rf sg3_utils-$PKGVERSION
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
35 tar xvf sg3_utils-$PKGVERSION.tar.xz
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
36 cd sg3_utils-$PKGVERSION
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
37
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
38 CC="$CC" \
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
39 CFLAGS="$CFLAGS" \
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
40 LDFLAGS="$LDFLAGS" \
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
41 LIBS="$LIBS" \
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
42 ./configure \
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
43 --build=$CBUILD \
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
44 --host=$CHOST \
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
45 --prefix=
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
46 make
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
47 make install DESTDIR=$DESTDIR
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
48 find $DESTDIR -type f -name "*.la" -delete
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
49
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
50 cd ..
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
51 rm -rf sg3_utils-$PKGVERSION
e47d241cc53c system/sg3-utils: initial import, closes #2325
David Demelier <markand@malikania.fr>
parents:
diff changeset
52 }