• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2
3# This script creates a libcoap archive, unpacks it and does an
4# out-of-tree build and installation afterwards.
5#
6# Copyright (C) 2021 Olaf Bergmann <bergmann@tzi.org>
7#
8# This file is part of the CoAP C library libcoap. Please see README
9# and COPYING for terms of use.
10#
11
12PREFIX=--prefix=`pwd`/libcoap-install
13ARCHIVE=`ls -1t libcoap-*.tar.bz2 |head -1`
14err=$?
15echo $ARCHIVE
16if test $err = 0 -a "x$ARCHIVE" != "x"; then
17    DIR=`pwd`/`tar taf $ARCHIVE |cut -d/ -f1|head -1`
18    tar xaf $ARCHIVE && cd $DIR && \
19        $DIR/configure $PREFIX --enable-tests  --enable-silent-rules --enable-documentation --enable-examples --disable-dtls && \
20        make && make install
21    err=$?
22fi
23
24exit $err
25