Mercurial > vanilla
annotate lib/popt/popt.sh @ 139:8076ef442b6c
editors: merge .sh and .info
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 11 Mar 2019 15:49:38 +0100 |
parents | 24dcabcf0297 |
children | ef65bd5eb573 |
rev | line source |
---|---|
124
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
1 #!/bin/sh |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
2 # |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
3 # Copyright (c) 2019 David Demelier <markand@malikania.fr> |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
4 # |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
5 # Permission to use, copy, modify, and/or distribute this software for any |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
6 # purpose with or without fee is hereby granted, provided that the above |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
7 # copyright notice and this permission notice appear in all copies. |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
8 # |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
16 # |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
17 |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
18 : ${CC:=gcc} |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
19 : ${CFLAGS:=-O2} |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
20 : ${NLS:=yes} |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
21 |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
22 source ./popt.info |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
23 |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
24 set -ex |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
25 |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
26 if [ "$NLS" = "yes" ]; then |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
27 with_nls="--enable-nls" |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
28 else |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
29 with_nls="--disable-nls" |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
30 fi |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
31 |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
32 rm -rf $PKGNAME-$PKGVERSION |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
33 tar xvaf $PKGNAME-$PKGVERSION.tar.gz |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
34 pushd $PKGNAME-$PKGVERSION |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
35 |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
36 CC="$CC" \ |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
37 CFLAGS="$CFLAGS" \ |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
38 ./configure \ |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
39 --prefix=/usr \ |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
40 --enable-shared \ |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
41 --disable-static \ |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
42 ${with_nls} |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
43 make |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
44 make install DESTDIR=$DESTDIR |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
45 rm -f $DESTDIR/usr/lib/libpopt.la |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
46 |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
47 popd |
24dcabcf0297
lib/popt: initial import, closes #1181
David Demelier <markand@malikania.fr>
parents:
diff
changeset
|
48 rm -rf $PKGNAME-$PKGVERSION |