mirror of
https://github.com/openharmony/third_party_libcoap.git
synced 2026-07-21 06:05:25 -04:00
0b5fdbfd89
Signed-off-by: wh <dade955@163.com>
25 lines
710 B
Bash
25 lines
710 B
Bash
#! /bin/sh
|
|
|
|
# This script creates a libcoap archive, unpacks it and does an
|
|
# out-of-tree build and installation afterwards.
|
|
#
|
|
# Copyright (C) 2021 Olaf Bergmann <bergmann@tzi.org>
|
|
#
|
|
# This file is part of the CoAP C library libcoap. Please see README
|
|
# and COPYING for terms of use.
|
|
#
|
|
|
|
PREFIX=--prefix=`pwd`/libcoap-install
|
|
ARCHIVE=`ls -1t libcoap-*.tar.bz2 |head -1`
|
|
err=$?
|
|
echo $ARCHIVE
|
|
if test $err = 0 -a "x$ARCHIVE" != "x"; then
|
|
DIR=`pwd`/`tar taf $ARCHIVE |cut -d/ -f1|head -1`
|
|
tar xaf $ARCHIVE && cd $DIR && \
|
|
$DIR/configure $PREFIX --enable-tests --enable-silent-rules --enable-documentation --enable-examples --disable-dtls && \
|
|
make && make install
|
|
err=$?
|
|
fi
|
|
|
|
exit $err
|