1 ################################################################################
5 ################################################################################
7 MOTION_VERSION
= release-3.4
.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 configure.ac is patched
13 MOTION_AUTORECONF
= YES
15 # This patch fixes detection of sqlite when cross-compiling
17 https
://github.com
/Motion-Project
/motion
/commit
/709f626b7ef83a2bb3ef1f77205276207ab27196.patch
19 # This patch adds --with-sdl=[DIR] option to fix detection of sdl-config
21 https
://github.com
/Motion-Project
/motion
/commit
/72193ccaff83fcb074c9aaa37c5691a8d8a18c7c.patch
23 # motion does not use any specific function of jpeg-turbo, so just relies on
25 MOTION_CONF_OPTS
+= --without-jpeg-turbo
27 ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE
),y
)
28 MOTION_DEPENDENCIES
+= ffmpeg
29 MOTION_CONF_OPTS
+= --with-ffmpeg
31 MOTION_CONF_OPTS
+= --without-ffmpeg
34 ifeq ($(BR2_PACKAGE_MYSQL
),y
)
35 MOTION_DEPENDENCIES
+= mysql
38 --with-mysql-include
=$(STAGING_DIR
)/usr
/include/mysql \
39 --with-mysql-lib
=$(STAGING_DIR
)/usr
/lib
41 MOTION_CONF_OPTS
+= --without-mysql
44 ifeq ($(BR2_PACKAGE_POSTGRESQL
),y
)
45 MOTION_DEPENDENCIES
+= postgresql
48 --with-pgsql-include
=$(STAGING_DIR
)/usr
/include \
49 --with-pgsql-lib
=$(STAGING_DIR
)/usr
/lib
51 MOTION_CONF_OPTS
+= --without-pgsql
54 ifeq ($(BR2_PACKAGE_SDL
),y
)
55 MOTION_DEPENDENCIES
+= sdl
56 MOTION_CONF_OPTS
+= --with-sdl
=$(STAGING_DIR
)/usr
57 # overwrite ac_cv_path_CONFIG_SDL in case sdl development is
58 # installed on the host
59 MOTION_CONF_ENV
+= ac_cv_path_CONFIG_SDL
=$(STAGING_DIR
)/usr
/bin
/sdl-config
61 MOTION_CONF_OPTS
+= --without-sdl
64 ifeq ($(BR2_PACKAGE_SQLITE
),y
)
65 MOTION_DEPENDENCIES
+= sqlite
66 MOTION_CONF_OPTS
+= --with-sqlite3
68 MOTION_CONF_OPTS
+= --without-sqlite3
71 # Do not use default install target as it installs many unneeded files and
72 # directories: docs, examples and init scripts
73 define MOTION_INSTALL_TARGET_CMDS
74 $(INSTALL
) -D
-m
0644 $(@D
)/motion-dist.conf \
75 $(TARGET_DIR
)/etc
/motion.conf
76 $(INSTALL
) -D
-m
0755 $(@D
)/motion
$(TARGET_DIR
)/usr
/bin
/motion
79 define MOTION_INSTALL_INIT_SYSV
80 $(INSTALL
) -D
-m
0755 package
/motion
/S99motion \
81 $(TARGET_DIR
)/etc
/init.d
/S99motion
84 define MOTION_INSTALL_INIT_SYSTEMD
85 $(INSTALL
) -D
-m
644 package
/motion
/motion.service \
86 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/motion.service
87 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
88 ln
-sf ..
/..
/..
/..
/usr
/lib
/systemd
/system
/motion.service \
89 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/motion.service
92 $(eval
$(autotools-package
))