libraries/restbed: Added (asynchronous C++11 RESTful framework).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Andre Barboza 2017-01-04 12:01:21 +07:00 committed by Willy Sudiarto Raharjo
parent 926a79efa0
commit 6e59605d72
5 changed files with 154 additions and 0 deletions

14
libraries/restbed/README Normal file
View file

@ -0,0 +1,14 @@
Restbed is a comprehensive and consistent programming model for
building applications that require seamless and secure
communication over HTTP, with the ability to model a range of
business processes, designed to target mobile, tablet, desktop
and embedded production environments.
Features include:
WebSockets, Server-Sent Events, Session Management,
HTTP Pipelining, Path Parameters, Query Parameters,
Header Filters, Logging, Multi-Path Resources,
Customisable Methods, Compression, Encoding,
HTTP/HTTPS, IPv4/IPv6, Converters, Authentication
Error Handling, Address Binding, Signal Handling

View file

@ -0,0 +1,99 @@
#!/bin/sh
# Slackware build script for Corvusoft's Restbed framework
# Copyright 2017 Andre Barboza, Belo Horizonte - Brazil
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=restbed
VERSION=${VERSION:-4.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
patch -p1 < $CWD/restbed.patch
mkdir -p build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DBUILD_SSL=ON \
-DBUILD_SHARED=ON \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -raf LICENSE README.md STANDARDS.md example legal $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

View file

@ -0,0 +1,10 @@
PRGNAM="restbed"
VERSION="4.0"
HOMEPAGE="https://github.com/corvusoft/restbed"
DOWNLOAD="https://github.com/Corvusoft/restbed/archive/4.0/restbed-4.0.tar.gz"
MD5SUM="2b32fcc3c4014849718058c694f1b49c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="asio"
MAINTAINER="Andre Barboza"
EMAIL="bmg.andre@gmail.com"

View file

@ -0,0 +1,12 @@
Only in restbed-4.0: .CMakeLists.txt.un~
diff -ur restbed-4.0.old/CMakeLists.txt restbed-4.0/CMakeLists.txt
--- restbed-4.0.old/CMakeLists.txt 2016-04-14 18:38:26.000000000 -0300
+++ restbed-4.0/CMakeLists.txt 2017-01-03 18:15:29.883784733 -0200
@@ -71,5 +71,5 @@
install( FILES "${INCLUDE_DIR}/${PROJECT_NAME}" DESTINATION "include" )
install( FILES ${BUILD_ARTIFACTS} DESTINATION "include/corvusoft/${PROJECT_NAME}" )
install( TARGETS ${PROJECT_NAME}
- LIBRARY DESTINATION "library"
- ARCHIVE DESTINATION "library" COMPONENT library )
+ LIBRARY DESTINATION "lib${LIB_SUFFIX}"
+ ARCHIVE DESTINATION "lib${LIB_SUFFIX}" COMPONENT library )

View file

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
restbed: restbed (asynchronous C++11 RESTful framework)
restbed:
restbed: Restbed is a comprehensive and consistent programming model for
restbed: building applications that require seamless and secure
restbed: communication over HTTP, with the ability to model a range of
restbed: business processes, designed to target mobile, tablet, desktop
restbed: and embedded production environments.
restbed:
restbed:
restbed: https://github.com/corvusoft/restbed
restbed: