system/dosfstools/dosfstools.sh

Fri, 15 Nov 2019 20:11:00 +0100

author
David Demelier <markand@malikania.fr>
date
Fri, 15 Nov 2019 20:11:00 +0100
changeset 1210
422313c3fcbd
parent 1115
297b5eef115e
child 1216
6710613b88b9
permissions
-rw-r--r--

text/rarian: initial import, closes #2311

1115
297b5eef115e vanilla: change shebangs to /bin/sh
David Demelier <markand@malikania.fr>
parents: 1059
diff changeset
1 #!/bin/sh
1059
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
2 #
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr>
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 #
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 # Permission to use, copy, modify, and/or distribute this software for any
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 # purpose with or without fee is hereby granted, provided that the above
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 # copyright notice and this permission notice appear in all copies.
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 #
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 #
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
17
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
18 PKGNAME=dosfstools
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
19 PKGVERSION=4.1
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
20 PKGREVISION=1
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
21 PKGLICENSE="GPLv30"
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
22 PKGSUMMARY="filesystem tools for FAT family partitions"
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
23 PKGDOWNLOAD="https://github.com/$PKGNAME/$PKGNAME/releases/download/v$PKGVERSION/$PKGNAME-$PKGVERSION.tar.xz"
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
24 PKGDEPENDS=""
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
25 PKGOPTIONS="UDEV"
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
26
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
27 : ${CHOST:=$(uname -m)-linux-musl}
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
28 : ${CBUILD:=$(uname -m)-linux-musl}
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
29 : ${CC:=clang}
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
30 : ${CFLAGS:=-O2}
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
31 : ${LDFLAGS:=}
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
32 : ${LIBS:=}
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
33 : ${UDEV:=yes}
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
34
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
35 if [ "$UDEV" = "yes" ]; then
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
36 PKGDEPENDS="eudev $PKGDEPENDS"
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
37 with_udev="--with-udev"
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
38 else
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
39 with_udev="--without-udev"
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
40 fi
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
41
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
42 build()
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
43 {
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
44 rm -rf $PKGNAME-$PKGVERSION
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
45 tar xvf $PKGNAME-$PKGVERSION.tar.xz
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
46 cd $PKGNAME-$PKGVERSION
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
47
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
48 CC="$CC" \
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
49 CFLAGS="$CFLAGS" \
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
50 LDFLAGS="$LDFLAGS" \
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
51 LIBS="$LIBS" \
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
52 ./configure \
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
53 --build=$CBUILD \
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
54 --host=$CHOST \
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
55 --prefix= \
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
56 --sbindir=/bin \
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
57 $with_udev
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
58 make
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
59 make install DESTDIR=$DESTDIR
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
60
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
61 cd ..
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
62 rm -rf $PKGNAME-$PKGVERSION
52644ad26941 system/dosfstools: initial import, closes #1019
David Demelier <markand@malikania.fr>
parents:
diff changeset
63 }

mercurial