Bump buildroot to version 2017-02
TG-3 #closed
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
From 5a1081d36bf2861ffc882354c583a0eb6b0ee3d5 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Seiderer <ps.report@gmx.net>
|
||||
Date: Tue, 25 Oct 2016 21:27:41 +0200
|
||||
Subject: [PATCH] configure.ac: use given CFLAGS/LIBS for mysqlclient library
|
||||
check
|
||||
|
||||
Needed for static linking of mysql with enabled libz.
|
||||
|
||||
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
||||
---
|
||||
configure.ac | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 5782fd6..aa5d9dd 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -618,8 +618,8 @@ else
|
||||
#LDFLAGS="-L$MYSQL_LIBDIR"
|
||||
saved_CFLAGS=$CFLAGS
|
||||
saved_LIBS=$LIBS
|
||||
- CFLAGS="-I$MYSQL_INCDIR"
|
||||
- LIBS="-L$MYSQL_LIBDIR"
|
||||
+ CFLAGS="-I$MYSQL_INCDIR $CFLAGS"
|
||||
+ LIBS="-L$MYSQL_LIBDIR $LIBS"
|
||||
AC_CHECK_LIB(mysqlclient,mysql_init,[
|
||||
TEMP_LIBS="$TEMP_LIBS -L$MYSQL_LIBDIR -lmysqlclient -lz"
|
||||
TEMP_CFLAGS="$TEMP_CFLAGS -I$MYSQL_INCDIR"
|
||||
--
|
||||
2.8.1
|
||||
|
||||
116
bsp/buildroot/package/motion/0002-Rename-base64_encode.patch
Normal file
116
bsp/buildroot/package/motion/0002-Rename-base64_encode.patch
Normal file
@@ -0,0 +1,116 @@
|
||||
From 0da5428bdfe67eb17ee03f22f68e66b044abdf70 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fabrice.fontaine@orange.com>
|
||||
Date: Sun, 30 Oct 2016 19:30:46 +0100
|
||||
Subject: [PATCH] Rename base64_encode
|
||||
|
||||
base64_encode is already defined in gnutls so rename it as
|
||||
motion_base64_encode to prevent a definition clash when linking
|
||||
statically with gnutls
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/592672b8826f4c731c50d29725da964d876573c4
|
||||
|
||||
Applied upstream:
|
||||
- https://github.com/Motion-Project/motion/commit/cc3c25527d4bada0fe98a734fa2df29f8d6cf1ad
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
|
||||
---
|
||||
netcam.c | 4 ++--
|
||||
netcam_wget.c | 4 ++--
|
||||
netcam_wget.h | 2 +-
|
||||
stream.c | 4 ++--
|
||||
webhttpd.c | 4 ++--
|
||||
5 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/netcam.c b/netcam.c
|
||||
index a9df33a..38d4ca3 100644
|
||||
--- a/netcam.c
|
||||
+++ b/netcam.c
|
||||
@@ -2019,7 +2019,7 @@ static int netcam_http_build_url(netcam_context_ptr netcam, struct url_t *url)
|
||||
else
|
||||
ptr = url->userpass;
|
||||
|
||||
- /* base64_encode needs up to 3 additional chars. */
|
||||
+ /* motion_base64_encode needs up to 3 additional chars. */
|
||||
if (ptr) {
|
||||
userpass = mymalloc(strlen(ptr) + 3);
|
||||
strcpy(userpass, ptr);
|
||||
@@ -2045,7 +2045,7 @@ static int netcam_http_build_url(netcam_context_ptr netcam, struct url_t *url)
|
||||
/* Allocate space for the base64-encoded string. */
|
||||
encuserpass = mymalloc(BASE64_LENGTH(strlen(userpass)) + 1);
|
||||
/* Fill in the value. */
|
||||
- base64_encode(userpass, encuserpass, strlen(userpass));
|
||||
+ motion_base64_encode(userpass, encuserpass, strlen(userpass));
|
||||
/* Now create the last part (authorization) of the request. */
|
||||
request_pass = mymalloc(strlen(connect_auth_req) +
|
||||
strlen(encuserpass) + 1);
|
||||
diff --git a/netcam_wget.c b/netcam_wget.c
|
||||
index 4491760..f5c1dc2 100644
|
||||
--- a/netcam_wget.c
|
||||
+++ b/netcam_wget.c
|
||||
@@ -210,13 +210,13 @@ int skip_lws(const char *string)
|
||||
|
||||
|
||||
/**
|
||||
- * base64_encode
|
||||
+ * motion_base64_encode
|
||||
*
|
||||
* Encode the string S of length LENGTH to base64 format and place it
|
||||
* to STORE. STORE will be 0-terminated, and must point to a writable
|
||||
* buffer of at least 1+BASE64_LENGTH(length) bytes.
|
||||
*/
|
||||
-void base64_encode(const char *s, char *store, int length)
|
||||
+void motion_base64_encode(const char *s, char *store, int length)
|
||||
{
|
||||
/* Conversion table. */
|
||||
static const char tbl[64] = {
|
||||
diff --git a/netcam_wget.h b/netcam_wget.h
|
||||
index 9a091bf..e9b02b5 100644
|
||||
--- a/netcam_wget.h
|
||||
+++ b/netcam_wget.h
|
||||
@@ -72,7 +72,7 @@ int rbuf_read_bufferful(netcam_context_ptr);
|
||||
/* How many bytes it will take to store LEN bytes in base64. */
|
||||
#define BASE64_LENGTH(len) (4 * (((len) + 2) / 3))
|
||||
|
||||
-void base64_encode(const char *, char *, int);
|
||||
+void motion_base64_encode(const char *, char *, int);
|
||||
char *strdupdelim(const char *, const char *);
|
||||
int http_process_type(const char *, void *);
|
||||
|
||||
diff --git a/stream.c b/stream.c
|
||||
index 04e67ee..ca201ac 100644
|
||||
--- a/stream.c
|
||||
+++ b/stream.c
|
||||
@@ -211,10 +211,10 @@ static void* handle_basic_auth(void* param)
|
||||
|
||||
authentication = mymalloc(BASE64_LENGTH(auth_size) + 1);
|
||||
userpass = mymalloc(auth_size + 4);
|
||||
- /* base64_encode can read 3 bytes after the end of the string, initialize it. */
|
||||
+ /* motion_base64_encode can read 3 bytes after the end of the string, initialize it. */
|
||||
memset(userpass, 0, auth_size + 4);
|
||||
strcpy(userpass, p->conf->stream_authentication);
|
||||
- base64_encode(userpass, authentication, auth_size);
|
||||
+ motion_base64_encode(userpass, authentication, auth_size);
|
||||
free(userpass);
|
||||
|
||||
if (strcmp(auth, authentication)) {
|
||||
diff --git a/webhttpd.c b/webhttpd.c
|
||||
index 6df2d11..36e8beb 100644
|
||||
--- a/webhttpd.c
|
||||
+++ b/webhttpd.c
|
||||
@@ -2616,10 +2616,10 @@ void httpd_run(struct context **cnt)
|
||||
|
||||
authentication = mymalloc(BASE64_LENGTH(auth_size) + 1);
|
||||
userpass = mymalloc(auth_size + 4);
|
||||
- /* base64_encode can read 3 bytes after the end of the string, initialize it */
|
||||
+ /* motion_base64_encode can read 3 bytes after the end of the string, initialize it */
|
||||
memset(userpass, 0, auth_size + 4);
|
||||
strcpy(userpass, cnt[0]->conf.webcontrol_authentication);
|
||||
- base64_encode(userpass, authentication, auth_size);
|
||||
+ motion_base64_encode(userpass, authentication, auth_size);
|
||||
free(userpass);
|
||||
}
|
||||
|
||||
--
|
||||
2.5.0
|
||||
|
||||
17
bsp/buildroot/package/motion/Config.in
Normal file
17
bsp/buildroot/package/motion/Config.in
Normal file
@@ -0,0 +1,17 @@
|
||||
config BR2_PACKAGE_MOTION
|
||||
bool "motion"
|
||||
depends on BR2_USE_MMU # fork()
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
select BR2_PACKAGE_JPEG
|
||||
help
|
||||
Motion is a program that monitors the video signal from
|
||||
cameras. It is able to detect if a significant part of
|
||||
the picture has changed; in other words, it can detect motion.
|
||||
|
||||
libv4l has to be selected to be able to use a local camera.
|
||||
|
||||
https://motion-project.github.io
|
||||
|
||||
comment "motion needs a toolchain w/ threads"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS
|
||||
37
bsp/buildroot/package/motion/S99motion
Normal file
37
bsp/buildroot/package/motion/S99motion
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
NAME=motion
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
DAEMON=/usr/bin/$NAME
|
||||
|
||||
start() {
|
||||
printf "Starting $NAME: "
|
||||
start-stop-daemon -S -q -m -b -p $PIDFILE --exec $DAEMON
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
stop() {
|
||||
printf "Stopping $NAME: "
|
||||
start-stop-daemon -K -q -p $PIDFILE
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
}
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $?
|
||||
2
bsp/buildroot/package/motion/motion.hash
Normal file
2
bsp/buildroot/package/motion/motion.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# Locally computed:
|
||||
sha256 2f67669a09ce0481ecd987028dae1c5cb135dfdc3c254c06ab7c9ca0c6c183f0 motion-release-4.0.1.tar.gz
|
||||
88
bsp/buildroot/package/motion/motion.mk
Normal file
88
bsp/buildroot/package/motion/motion.mk
Normal file
@@ -0,0 +1,88 @@
|
||||
################################################################################
|
||||
#
|
||||
# motion
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MOTION_VERSION = release-4.0.1
|
||||
MOTION_SITE = $(call github,Motion-Project,motion,$(MOTION_VERSION))
|
||||
MOTION_LICENSE = GPLv2
|
||||
MOTION_LICENSE_FILES = COPYING
|
||||
MOTION_DEPENDENCIES = host-pkgconf jpeg
|
||||
# From git and patched configure.ac
|
||||
MOTION_AUTORECONF = YES
|
||||
|
||||
# motion does not use any specific function of jpeg-turbo, so just relies on
|
||||
# jpeg selection
|
||||
MOTION_CONF_OPTS += --without-jpeg-turbo --without-optimizecpu
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y)
|
||||
MOTION_DEPENDENCIES += ffmpeg
|
||||
MOTION_CONF_OPTS += --with-ffmpeg
|
||||
else
|
||||
MOTION_CONF_OPTS += --without-ffmpeg
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_MYSQL),y)
|
||||
MOTION_DEPENDENCIES += mysql
|
||||
MOTION_CONF_OPTS += \
|
||||
--with-mysql \
|
||||
--with-mysql-include=$(STAGING_DIR)/usr/include/mysql \
|
||||
--with-mysql-lib=$(STAGING_DIR)/usr/lib
|
||||
# static link of mysql needs -lz
|
||||
ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_ZLIB),yy)
|
||||
MOTION_CONF_ENV += LIBS="-lz"
|
||||
endif
|
||||
else
|
||||
MOTION_CONF_OPTS += --without-mysql
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
|
||||
MOTION_DEPENDENCIES += postgresql
|
||||
MOTION_CONF_OPTS += \
|
||||
--with-pgsql \
|
||||
--with-pgsql-include=$(STAGING_DIR)/usr/include \
|
||||
--with-pgsql-lib=$(STAGING_DIR)/usr/lib
|
||||
else
|
||||
MOTION_CONF_OPTS += --without-pgsql
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SDL),y)
|
||||
MOTION_DEPENDENCIES += sdl
|
||||
MOTION_CONF_OPTS += --with-sdl=$(STAGING_DIR)/usr
|
||||
# overwrite ac_cv_path_CONFIG_SDL in case sdl development is
|
||||
# installed on the host
|
||||
MOTION_CONF_ENV += ac_cv_path_CONFIG_SDL=$(STAGING_DIR)/usr/bin/sdl-config
|
||||
else
|
||||
MOTION_CONF_OPTS += --without-sdl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SQLITE),y)
|
||||
MOTION_DEPENDENCIES += sqlite
|
||||
MOTION_CONF_OPTS += --with-sqlite3
|
||||
else
|
||||
MOTION_CONF_OPTS += --without-sqlite3
|
||||
endif
|
||||
|
||||
# Do not use default install target as it installs many unneeded files and
|
||||
# directories: docs, examples and init scripts
|
||||
define MOTION_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -D -m 0644 $(@D)/motion-dist.conf \
|
||||
$(TARGET_DIR)/etc/motion.conf
|
||||
$(INSTALL) -D -m 0755 $(@D)/motion $(TARGET_DIR)/usr/bin/motion
|
||||
endef
|
||||
|
||||
define MOTION_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 package/motion/S99motion \
|
||||
$(TARGET_DIR)/etc/init.d/S99motion
|
||||
endef
|
||||
|
||||
define MOTION_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 package/motion/motion.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/motion.service
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||
ln -sf ../../../../usr/lib/systemd/system/motion.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/motion.service
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
10
bsp/buildroot/package/motion/motion.service
Normal file
10
bsp/buildroot/package/motion/motion.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Motion camera monitoring system
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/motion
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user