1 ################################################################################
5 ################################################################################
7 MOTION_VERSION
= release-4.0
.1
8 MOTION_SITE
= $(call github
,Motion-Project
,motion
,$(MOTION_VERSION
))
10 MOTION_LICENSE_FILES
= COPYING
11 MOTION_DEPENDENCIES
= host-pkgconf jpeg
12 # From git and patched configure.ac
13 MOTION_AUTORECONF
= YES
15 # motion does not use any specific function of jpeg-turbo, so just relies on
17 MOTION_CONF_OPTS
+= --without-jpeg-turbo
--without-optimizecpu
19 ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE
),y
)
20 MOTION_DEPENDENCIES
+= ffmpeg
21 MOTION_CONF_OPTS
+= --with-ffmpeg
23 MOTION_CONF_OPTS
+= --without-ffmpeg
26 ifeq ($(BR2_PACKAGE_MYSQL
),y
)
27 MOTION_DEPENDENCIES
+= mysql
30 --with-mysql-include
=$(STAGING_DIR
)/usr
/include/mysql \
31 --with-mysql-lib
=$(STAGING_DIR
)/usr
/lib
32 # static link of mysql needs -lz
33 ifeq ($(BR2_STATIC_LIBS
)$(BR2_PACKAGE_ZLIB
),yy
)
34 MOTION_CONF_ENV
+= LIBS
="-lz"
37 MOTION_CONF_OPTS
+= --without-mysql
40 ifeq ($(BR2_PACKAGE_POSTGRESQL
),y
)
41 MOTION_DEPENDENCIES
+= postgresql
44 --with-pgsql-include
=$(STAGING_DIR
)/usr
/include \
45 --with-pgsql-lib
=$(STAGING_DIR
)/usr
/lib
47 MOTION_CONF_OPTS
+= --without-pgsql
50 ifeq ($(BR2_PACKAGE_SDL
),y
)
51 MOTION_DEPENDENCIES
+= sdl
52 MOTION_CONF_OPTS
+= --with-sdl
=$(STAGING_DIR
)/usr
53 # overwrite ac_cv_path_CONFIG_SDL in case sdl development is
54 # installed on the host
55 MOTION_CONF_ENV
+= ac_cv_path_CONFIG_SDL
=$(STAGING_DIR
)/usr
/bin
/sdl-config
57 MOTION_CONF_OPTS
+= --without-sdl
60 ifeq ($(BR2_PACKAGE_SQLITE
),y
)
61 MOTION_DEPENDENCIES
+= sqlite
62 MOTION_CONF_OPTS
+= --with-sqlite3
64 MOTION_CONF_OPTS
+= --without-sqlite3
67 # Do not use default install target as it installs many unneeded files and
68 # directories: docs, examples and init scripts
69 define MOTION_INSTALL_TARGET_CMDS
70 $(INSTALL
) -D
-m
0644 $(@D
)/motion-dist.conf \
71 $(TARGET_DIR
)/etc
/motion.conf
72 $(INSTALL
) -D
-m
0755 $(@D
)/motion
$(TARGET_DIR
)/usr
/bin
/motion
75 define MOTION_INSTALL_INIT_SYSV
76 $(INSTALL
) -D
-m
0755 package
/motion
/S99motion \
77 $(TARGET_DIR
)/etc
/init.d
/S99motion
80 define MOTION_INSTALL_INIT_SYSTEMD
81 $(INSTALL
) -D
-m
644 package
/motion
/motion.service \
82 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/motion.service
83 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
84 ln
-sf ..
/..
/..
/..
/usr
/lib
/systemd
/system
/motion.service \
85 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/motion.service
88 $(eval
$(autotools-package
))