comparison gnu/aspell/aspell.sh @ 1114:6de02aa035d2

gnu: move GNU packages to this category
author David Demelier <markand@malikania.fr>
date Thu, 19 Sep 2019 15:09:24 +0200
parents text/aspell/aspell.sh@ddab65a5b3f5
children 297b5eef115e
comparison
equal deleted inserted replaced
1113:5c0dfe68c5a8 1114:6de02aa035d2
1 #!/bin/busybox 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 PKGNAME=aspell
19 PKGVERSION=0.60.7
20 PKGREVISION=1
21 PKGLICENSE="LGPLv21"
22 PKGSUMMARY="GNU spell checker"
23 PKGDOWNLOAD="ftp://ftp.gnu.org/gnu/$PKGNAME/$PKGNAME-$PKGVERSION.tar.gz"
24 PKGDEPENDS="perl:build"
25 PKGOPTIONS="NCURSES NLS"
26
27 : ${CHOST:=$(uname -m)-linux-musl}
28 : ${CBUILD:=$(uname -m)-linux-musl}
29 : ${CC:=clang}
30 : ${CFLAGS:=-O2}
31 : ${CXX:=clang++}
32 : ${CXXFLAGS:=-O2}
33 : ${LDFLAGS:=}
34 : ${LIBS:=}
35 : ${NCURSES:=yes}
36 : ${NLS:=yes}
37
38 if [ "$NCURSES" = "yes" ]; then
39 PKGDEPENDS="ncurses $PKGDEPENDS"
40 with_ncurses="--enable-curses"
41 else
42 with_ncurses="--disable-curses"
43 fi
44
45 if [ "$NLS" = "yes" ]; then
46 PKGDEPENDS="gettext $PKGDEPENDS"
47 with_nls="--enable-nls"
48 else
49 with_nls="--disable-nls"
50 fi
51
52 build()
53 {
54 rm -rf $PKGNAME-$PKGVERSION
55 tar xvf $PKGNAME-$PKGVERSION.tar.gz
56 cd $PKGNAME-$PKGVERSION
57
58 datadir="/share/aspell"
59 dictdir="/share/aspell"
60 confdir="/etc"
61
62 echo "#define PREFIX \"\"" > gen/dirs.h
63 echo "#define DATA_DIR \"$datadir\"" >> gen/dirs.h
64 echo "#define DICT_DIR \"$dictdir\"" >> gen/dirs.h
65 echo "#define CONF_DIR \"$confdir\"" >> gen/dirs.h
66
67 CC="$CC" \
68 CFLAGS="$CFLAGS" \
69 CXX="$CXX" \
70 CXXFLAGS="$CXXFLAGS" \
71 LDFLAGS="$LDFLAGS" \
72 LIBS="$LIBS" \
73 ./configure \
74 --build=$CBUILD \
75 --host=$CHOST \
76 --prefix= \
77 --sysconfdir=$confdir \
78 --enable-pkgdatadir=$datadir \
79 --enable-pkglibdir=$datadir \
80 --enable-dict-dir=$dictdir \
81 $with_ncurses \
82 $with_nls
83 make
84 make install DESTDIR=$DESTDIR
85 find $DESTDIR -type f -name "*.la" -delete
86
87 cd ..
88 rm -rf $PKGNAME-$PKGVERSION
89 }