motion.mk 1.9 KB

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