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