1################################################################################ 2# 3# motion 4# 5################################################################################ 6 7MOTION_VERSION = 4.4.0 8MOTION_SITE = $(call github,Motion-Project,motion,release-$(MOTION_VERSION)) 9MOTION_LICENSE = GPL-2.0 10MOTION_LICENSE_FILES = LICENSE 11MOTION_CPE_ID_VENDOR = motion_project 12MOTION_DEPENDENCIES = host-pkgconf jpeg libmicrohttpd $(TARGET_NLS_DEPENDENCIES) 13# From git 14MOTION_AUTORECONF = YES 15MOTION_GETTEXTIZE = YES 16 17MOTION_CONF_OPTS += --without-optimizecpu 18 19ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y) 20MOTION_DEPENDENCIES += ffmpeg 21MOTION_CONF_OPTS += --with-ffmpeg 22else 23MOTION_CONF_OPTS += --without-ffmpeg 24endif 25 26ifeq ($(BR2_PACKAGE_MYSQL),y) 27MOTION_DEPENDENCIES += mysql 28MOTION_CONF_OPTS += --with-mysql 29else 30MOTION_CONF_OPTS += --without-mysql 31endif 32 33ifeq ($(BR2_PACKAGE_POSTGRESQL),y) 34MOTION_DEPENDENCIES += postgresql 35MOTION_CONF_OPTS += --with-pgsql 36else 37MOTION_CONF_OPTS += --without-pgsql 38endif 39 40ifeq ($(BR2_PACKAGE_SQLITE),y) 41MOTION_DEPENDENCIES += sqlite 42MOTION_CONF_OPTS += --with-sqlite3 43else 44MOTION_CONF_OPTS += --without-sqlite3 45endif 46 47ifeq ($(BR2_PACKAGE_WEBP_MUX),y) 48MOTION_DEPENDENCIES += webp 49MOTION_CONF_OPTS += --with-webp 50else 51MOTION_CONF_OPTS += --without-webp 52endif 53 54# Do not use default install target as it installs many unneeded files and 55# directories: docs, examples and init scripts 56define MOTION_INSTALL_TARGET_CMDS 57 $(INSTALL) -D -m 0644 $(@D)/data/motion-dist.conf \ 58 $(TARGET_DIR)/etc/motion/motion.conf 59 $(INSTALL) -D -m 0755 $(@D)/src/motion $(TARGET_DIR)/usr/bin/motion 60endef 61 62define MOTION_INSTALL_INIT_SYSV 63 $(INSTALL) -D -m 0755 package/motion/S99motion \ 64 $(TARGET_DIR)/etc/init.d/S99motion 65endef 66 67define MOTION_INSTALL_INIT_SYSTEMD 68 $(INSTALL) -D -m 644 package/motion/motion.service \ 69 $(TARGET_DIR)/usr/lib/systemd/system/motion.service 70endef 71 72$(eval $(autotools-package)) 73