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
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
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
33 MOTION_CONF_OPTS
+= --without-mysql
36 ifeq ($(BR2_PACKAGE_POSTGRESQL
),y
)
37 MOTION_DEPENDENCIES
+= postgresql
40 --with-pgsql-include
=$(STAGING_DIR
)/usr
/include \
41 --with-pgsql-lib
=$(STAGING_DIR
)/usr
/lib
43 MOTION_CONF_OPTS
+= --without-pgsql
46 ifeq ($(BR2_PACKAGE_SDL
),y
)
47 MOTION_DEPENDENCIES
+= sdl
48 MOTION_CONF_OPTS
+= --with-sdl
=$(STAGING_DIR
)/usr
49 # overwrite ac_cv_path_CONFIG_SDL in case sdl development is
50 # installed on the host
51 MOTION_CONF_ENV
+= ac_cv_path_CONFIG_SDL
=$(STAGING_DIR
)/usr
/bin
/sdl-config
53 MOTION_CONF_OPTS
+= --without-sdl
56 ifeq ($(BR2_PACKAGE_SQLITE
),y
)
57 MOTION_DEPENDENCIES
+= sqlite
58 MOTION_CONF_OPTS
+= --with-sqlite3
60 MOTION_CONF_OPTS
+= --without-sqlite3
63 # Do not use default install target as it installs many unneeded files and
64 # directories: docs, examples and init scripts
65 define MOTION_INSTALL_TARGET_CMDS
66 $(INSTALL
) -D
-m
0644 $(@D
)/motion-dist.conf \
67 $(TARGET_DIR
)/etc
/motion.conf
68 $(INSTALL
) -D
-m
0755 $(@D
)/motion
$(TARGET_DIR
)/usr
/bin
/motion
71 define MOTION_INSTALL_INIT_SYSV
72 $(INSTALL
) -D
-m
0755 package
/motion
/S99motion \
73 $(TARGET_DIR
)/etc
/init.d
/S99motion
76 define MOTION_INSTALL_INIT_SYSTEMD
77 $(INSTALL
) -D
-m
644 package
/motion
/motion.service \
78 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/motion.service
79 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
80 ln
-sf ..
/..
/..
/..
/usr
/lib
/systemd
/system
/motion.service \
81 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/motion.service
84 $(eval
$(autotools-package
))