43 lines
834 B
Bash
Executable file
43 lines
834 B
Bash
Executable file
#!/bin/bash -e
|
|
|
|
source $(dirname $0)/functions
|
|
source $(dirname $0)/pkgversion
|
|
|
|
filename=$(echo $0 | rev | cut -d / -f1 | rev)
|
|
|
|
TMP=${TMP:-/tmp/build}
|
|
LOG=${LOG:-$(dirname $0)/log}
|
|
SRC=${SRC:-$(dirname $0)/src}
|
|
|
|
NAME=gettext
|
|
VERSION=${GETTEXT_VER}
|
|
|
|
fetch "http://ftp.gnu.org/gnu/gettext/gettext-$GETTEXT_VER.tar.xz" $SRC
|
|
|
|
[ "$1" = "fetch" ] && exit 0
|
|
|
|
rm -fr $TMP
|
|
mkdir -p $TMP $LOG $SRC
|
|
|
|
tar xf $SRC/$tarballname -C $TMP
|
|
|
|
{ time \
|
|
{
|
|
|
|
cd $TMP/$NAME-$VERSION
|
|
|
|
cd gettext-tools
|
|
EMACS="no" ./configure --prefix=/tools --disable-shared
|
|
make -C gnulib-lib
|
|
make -C intl pluralx.c
|
|
make -C src msgfmt
|
|
make -C src msgmerge
|
|
make -C src xgettext
|
|
cp -v src/{msgfmt,msgmerge,xgettext} /tools/bin
|
|
|
|
}
|
|
} 2>&1 | tee $LOG/$filename.log
|
|
|
|
[ $PIPESTATUS = 0 ] && echo "$NAME-$VERSION" > /tools/$filename || exit $PIPESTATUS
|
|
|
|
rm -fr $TMP
|