diff options
-rwxr-xr-x | .SRCINFO | 21 | ||||
-rwxr-xr-x | .gitignore | 2 | ||||
-rwxr-xr-x | Config-linux-config.h | 200 | ||||
-rwxr-xr-x | LICENSE | 28 | ||||
-rwxr-xr-x | PKGBUILD | 59 | ||||
-rwxr-xr-x | libarnetwork-Makefile | 29 |
6 files changed, 339 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100755 index 000000000000..3b52dd6ca0e7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = libarnetwork-git + pkgdesc = ARSDK Network Control Library + pkgver = r312.ae81092 + pkgrel = 1 + url = http://developer.parrot.com/ + arch = x86_64 + license = custom + makedepends = git + depends = libarsal-git + depends = libarnetworkal-git + source = libarnetwork::git+https://github.com/Parrot-Developers/libARNetwork + source = libarnetwork-Makefile + source = Config-linux-config.h + source = LICENSE + sha256sums = SKIP + sha256sums = 7d1648f492bfb71108d661df62a52d39512f75218565d037d7f63fd0e6ccd898 + sha256sums = 5956b54ef47ad26df51991a4aa7002abdcb524a51b455d040f55b4d11a4f44a7 + sha256sums = 1771e95329e9cb2bed04e023e330af3d558d0f13c0c1c5de0581f2880f149deb + +pkgname = libarnetwork-git + diff --git a/.gitignore b/.gitignore new file mode 100755 index 000000000000..660cb155cc40 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +libarnetwork/ +*.pkg.tar.xz diff --git a/Config-linux-config.h b/Config-linux-config.h new file mode 100755 index 000000000000..dc8a5ded8656 --- /dev/null +++ b/Config-linux-config.h @@ -0,0 +1,200 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Debug Mode */ +/* #undef DEBUG */ + +/* Define to 1 if you have the declaration of `PRIi16', and to 0 if you don't. + */ +#define HAVE_DECL_PRII16 1 + +/* Define to 1 if you have the declaration of `PRIi32', and to 0 if you don't. + */ +#define HAVE_DECL_PRII32 1 + +/* Define to 1 if you have the declaration of `PRIi64', and to 0 if you don't. + */ +#define HAVE_DECL_PRII64 1 + +/* Define to 1 if you have the declaration of `PRIi8', and to 0 if you don't. + */ +#define HAVE_DECL_PRII8 1 + +/* Define to 1 if you have the declaration of `PRIu16', and to 0 if you don't. + */ +#define HAVE_DECL_PRIU16 1 + +/* Define to 1 if you have the declaration of `PRIu32', and to 0 if you don't. + */ +#define HAVE_DECL_PRIU32 1 + +/* Define to 1 if you have the declaration of `PRIu64', and to 0 if you don't. + */ +#define HAVE_DECL_PRIU64 1 + +/* Define to 1 if you have the declaration of `PRIu8', and to 0 if you don't. + */ +#define HAVE_DECL_PRIU8 1 + +/* Define to 1 if you have the <android/log.h> header file. */ +/* #undef HAVE_ANDROID_LOG_H */ + +/* Define to 1 if you have the `clock_gettime' function. */ +#define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have the <CoreBluetooth/CoreBluetooth.h> header file. */ +/* #undef HAVE_COREBLUETOOTH_COREBLUETOOTH_H */ + +/* Define to 1 if you have the declaration of `MSG_NOSIGNAL', and to 0 if you + don't. */ +#ifdef __linux__ +# define HAVE_DECL_MSG_NOSIGNAL 1 +#else +# define HAVE_DECL_MSG_NOSIGNAL 0 +#endif + +/* Define to 1 if you have the declaration of `SO_NOSIGPIPE', and to 0 if you + don't. */ +#ifdef __linux__ +# define HAVE_DECL_SO_NOSIGPIPE 0 +#else +# define HAVE_DECL_SO_NOSIGPIPE 1 +#endif + +/* Define to 1 if you have the declaration of `CLOCK_MONOTONIC', and to 0 if + you don't. */ +#ifdef __linux__ +# define HAVE_DECL_CLOCK_MONOTONIC 1 +#else +# define HAVE_DECL_CLOCK_MONOTONIC 0 +#endif + +/* Define to 1 if you have the declaration of `CLOCK_REALTIME', and to 0 if + you don't. */ +#ifdef __linux__ +# define HAVE_DECL_CLOCK_REALTIME 1 +#else +# define HAVE_DECL_CLOCK_REALTIME 0 +#endif + +/* Define to 1 if you have the declaration of `log2', and to 0 if you don't. + */ +#define HAVE_DECL_LOG2 1 + +/* Define to 1 if you have the declaration of `SYS_gettid', and to 0 if you + don't. */ +#define HAVE_DECL_SYS_GETTID 1 + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the <ftw.h> header file. */ +#define HAVE_FTW_H 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* Whether the libm on the host has the log2 function */ +#define HAVE_LOG2 1 + +/* Define to 1 if you have the <memory.h> header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the <netinet/in.h> header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the <pthread.h> header file. */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the <semaphore.h> header file. */ +#define HAVE_SEMAPHORE_H 1 + +/* Define to 1 if you have the `sem_destroy' function. */ +#define HAVE_SEM_DESTROY 1 + +/* Define to 1 if you have the `sem_getvalue' function. */ +#define HAVE_SEM_GETVALUE 1 + +/* Define to 1 if you have the `sem_init' function. */ +#define HAVE_SEM_INIT 1 + +/* Define to 1 if you have the `sem_post' function. */ +#define HAVE_SEM_POST 1 + +/* Define to 1 if you have the `sem_timedwait' function. */ +#ifdef __linux__ +# define HAVE_SEM_TIMEDWAIT 1 +#endif + +/* Define to 1 if you have the `sem_trywait' function. */ +#define HAVE_SEM_TRYWAIT 1 + +/* Define to 1 if you have the `sem_wait' function. */ +#define HAVE_SEM_WAIT 1 + +/* Define to 1 if you have the <stdarg.h> header file. */ +#define HAVE_STDARG_H 1 + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdio.h> header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the <sys/socket.h> header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/time.h> header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the <sys/uio.h> header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have the `time' function. */ +#define HAVE_TIME 1 + +/* Define to 1 if you have the <time.h> header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the <sys/statfs.h> header file. */ +#ifdef __linux__ +# define HAVE_SYS_STATFS_H 1 +#endif + +/* Define to 1 if you have the <sys/mount.h> header file. */ +#define HAVE_SYS_MOUNT_H 1 + +/* No-debug Mode */ +#define NDEBUG /**/ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if you have the <sys/mount.h> header file. */ +#define HAVE_SYS_MOUNT_H 1 + +/* Define to 1 if you have the <UIKit/UIKit.h> header file. */ +/* #undef HAVE_UIKIT_UIKIT_H */ +/* Define to `unsigned int' if <sys/types.h> does not define. */ +/* #undef size_t */ diff --git a/LICENSE b/LICENSE new file mode 100755 index 000000000000..2b9256f4825e --- /dev/null +++ b/LICENSE @@ -0,0 +1,28 @@ +Copyright (C) 2014 Parrot SA + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. +* Neither the name of Parrot nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"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 +COPYRIGHT OWNER OR CONTRIBUTORS 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. diff --git a/PKGBUILD b/PKGBUILD new file mode 100755 index 000000000000..b4a7ccb1ac27 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,59 @@ +# Maintainer: Alexandre Iooss <alexandre.iooss@gmail.com> + +pkgname=libarnetwork-git +pkgver=r312.ae81092 +pkgrel=1 +pkgdesc="ARSDK Network Control Library" +arch=(x86_64) +url="http://developer.parrot.com/" +license=('custom') +groups=() +depends=(libarsal-git libarnetworkal-git) +optdepends=() +makedepends=(git) +provides=() +conflicts=() +replaces=() +backup=() +options=() +install= +source=('libarnetwork::git+https://github.com/Parrot-Developers/libARNetwork' + 'libarnetwork-Makefile' + 'Config-linux-config.h' + 'LICENSE') +sha256sums=('SKIP' + '7d1648f492bfb71108d661df62a52d39512f75218565d037d7f63fd0e6ccd898' + '5956b54ef47ad26df51991a4aa7002abdcb524a51b455d040f55b4d11a4f44a7' + '1771e95329e9cb2bed04e023e330af3d558d0f13c0c1c5de0581f2880f149deb') + +pkgver() { + cd "$srcdir/libarnetwork" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cp "$srcdir/libarnetwork-Makefile" "$srcdir/libarnetwork/Makefile" + cp "$srcdir/Config-linux-config.h" "$srcdir/libarnetwork/Includes/config.h" +} + +build() { + cd "$srcdir/libarnetwork" + make +} + +package() { + # Install headers + mkdir -p "$pkgdir/usr/include/libARNetwork" + cp "$srcdir/libarnetwork/Includes/libARNetwork/ARNetwork.h" "$pkgdir/usr/include/libARNetwork/" + cp "$srcdir/libarnetwork/Includes/libARNetwork/ARNETWORK_Error.h" "$pkgdir/usr/include/libARNetwork/" + cp "$srcdir/libarnetwork/Includes/libARNetwork/ARNETWORK_IOBufferParam.h" "$pkgdir/usr/include/libARNetwork/" + cp "$srcdir/libarnetwork/Includes/libARNetwork/ARNETWORK_Manager.h" "$pkgdir/usr/include/libARNetwork/" + + # Install lib + mkdir -p "$pkgdir/usr/lib" + cp "$srcdir/libarnetwork/libarnetwork.so" "$pkgdir/usr/lib/" + + # Install license + mkdir -p "$pkgdir/usr/share/licenses/$pkgname" + cp "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/libarnetwork-Makefile b/libarnetwork-Makefile new file mode 100755 index 000000000000..2c5f8ab82503 --- /dev/null +++ b/libarnetwork-Makefile @@ -0,0 +1,29 @@ +CC = gcc +CFLAGS = -fPIC -Wall -Wextra -O2 -g -IIncludes -DHAVE_CONFIG_H +LDFLAGS = -shared +RM = rm -f +TARGET_LIB = libarnetwork.so + +SRCS = Sources/ARNETWORK_IOBuffer.c \ + Sources/ARNETWORK_IOBufferParam.c \ + Sources/ARNETWORK_Manager.c \ + Sources/ARNETWORK_Receiver.c \ + Sources/ARNETWORK_RingBuffer.c \ + Sources/ARNETWORK_Sender.c \ + gen/Sources/ARNETWORK_Error.c +OBJS = $(SRCS:.c=.o) + +.PHONY: all +all: ${TARGET_LIB} + +$(TARGET_LIB): $(OBJS) + $(CC) ${LDFLAGS} -o $@ $^ + +$(SRCS:.c=.d):%.d:%.c + $(CC) $(CFLAGS) -MM $< >$@ + +include $(SRCS:.c=.d) + +.PHONY: clean +clean: + -${RM} ${TARGET_LIB} ${OBJS} $(SRCS:.c=.d) |