Mercurial > vanilla
comparison editors/nano/nano.sh @ 134:611ec6dd6db6
editors/nano: initial import, closes #1188
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sun, 10 Mar 2019 20:25:54 +0100 |
parents | |
children | 8076ef442b6c |
comparison
equal
deleted
inserted
replaced
133:91db31a8996e | 134:611ec6dd6db6 |
---|---|
1 #!/bin/sh | |
2 # | |
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr> | |
4 # | |
5 # Permission to use, copy, modify, and/or distribute this software for any | |
6 # purpose with or without fee is hereby granted, provided that the above | |
7 # copyright notice and this permission notice appear in all copies. | |
8 # | |
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
16 # | |
17 | |
18 : ${CHOST:=$(uname -m)-linux-musl} | |
19 : ${CBUILD:=$(uname -m)-linux-musl} | |
20 : ${CC:=gcc} | |
21 : ${CFLAGS:=-O2} | |
22 : ${COLOR:=yes} | |
23 : ${MULTIBUFFER:=yes} | |
24 : ${NANORC:=yes} | |
25 : ${NLS:=yes} | |
26 | |
27 source ./nano.info | |
28 | |
29 set -ex | |
30 | |
31 if [ "$COLOR" = "yes" ]; then | |
32 with_color="--enable-color" | |
33 else | |
34 with_color="--disable-color" | |
35 fi | |
36 | |
37 if [ "$MULTIBUFFER" = "yes" ]; then | |
38 with_multibuffer="--enable-multibuffer" | |
39 else | |
40 with_multibuffer="--disable-multibuffer" | |
41 fi | |
42 | |
43 if [ "$NANORC" = "yes" ]; then | |
44 with_nanorc="--enable-nanorc" | |
45 else | |
46 with_nanorc="--disable-nanorc" | |
47 fi | |
48 | |
49 if [ "$NLS" = "yes" ]; then | |
50 with_nls="--enable-nls" | |
51 else | |
52 with_nls="--disable-nls" | |
53 fi | |
54 | |
55 rm -rf $PKGNAME-$PKGVERSION | |
56 tar xvaf $PKGNAME-$PKGVERSION.tar.xz | |
57 pushd $PKGNAME-$PKGVERSION | |
58 | |
59 CC="$CC" \ | |
60 CFLAGS="$CFLAGS" \ | |
61 ./configure \ | |
62 --build=$CBUILD \ | |
63 --host=$CHOST \ | |
64 --target=$CTARGET \ | |
65 --prefix=/usr \ | |
66 --with-wordbounds \ | |
67 $with_color \ | |
68 $with_multibuffer \ | |
69 $with_nanorc \ | |
70 $with_nls | |
71 make | |
72 make install DESTDIR=$DESTDIR | |
73 | |
74 popd | |
75 rm -rf $PKGNAME-$PKGVERSION |