exfatprogs: update to 1.2.5
[feed/packages.git] / multimedia / motion / Makefile
1 #
2 # Copyright (C) 2008-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=motion
11 PKG_VERSION:=4.5.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-release-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://codeload.github.com/Motion-Project/motion/tar.gz/release-$(PKG_VERSION)?
16 PKG_HASH:=42320a1c7b54a3f0b5a49cecf34a5d752760b28383bc573b3ca1240581786fe5
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-release-$(PKG_VERSION)
18
19 PKG_MAINTAINER:=Roger D <rogerdammit@gmail.com>
20 PKG_LICENSE:=GPL-2.0-or-later
21 PKG_LICENSE_FILES:=COPYING
22 PKG_CPE_ID:=cpe:/a:motion_project:motion
23
24 PKG_FIXUP:=autoreconf
25 PKG_INSTALL:=1
26 PKG_BUILD_PARALLEL:=1
27 PKG_BUILD_DEPENDS:=gettext-full/host
28
29 include $(INCLUDE_DIR)/package.mk
30 include $(INCLUDE_DIR)/nls.mk
31
32 define Package/motion/Default
33 SECTION:=multimedia
34 CATEGORY:=Multimedia
35 DEPENDS:=+libjpeg +libpthread +libmicrohttpd $(INTL_DEPENDS)
36 TITLE:=webcam motion sensing and logging
37 PROVIDES:=motion
38 URL:=https://motion-project.github.io/
39 endef
40
41 define Package/motion/Default/description
42 Motion is a program that monitor video signals from many types of cameras and
43 depending upon how they are configured, perform actions when movement is
44 detected.
45 endef
46
47 define Package/motion-noffmpeg
48 $(call Package/motion/Default)
49 TITLE+= (w/o FFMPEG support)
50 VARIANT:=noffmpeg
51 DEFAULT_VARIANT:=1
52 endef
53
54 define Package/motion-noffmpeg/description
55 $(call Package/motion/Default/description)
56 This package is built without FFMPEG support.
57 endef
58
59 define Package/motion-ffmpeg
60 $(call Package/motion/Default)
61 TITLE+= (with FFMPEG support)
62 VARIANT:=ffmpeg
63 DEPENDS+=+libffmpeg-full
64 endef
65
66 define Package/motion-ffmpeg/description
67 $(call Package/motion/Default/description)
68 This package is built with FFMPEG support.
69 endef
70
71 define Package/motion/conffiles
72 /etc/config/motion
73 /etc/motion.conf
74 endef
75
76 Package/motion-noffmpeg/conffiles = $(Package/motion/conffiles)
77 Package/motion-ffmpeg/conffiles = $(Package/motion/conffiles)
78
79 CONFIGURE_ARGS += \
80 --without-bktr \
81 --without-webp \
82 --without-mmal \
83 --without-mariadb \
84 --without-mysql \
85 --without-pgsql \
86 --without-sqlite3 \
87 --without-optimizecpu
88
89 ifeq ($(BUILD_VARIANT),noffmpeg)
90 CONFIGURE_ARGS += --without-ffmpeg
91 endif
92 ifeq ($(BUILD_VARIANT),ffmpeg)
93 CONFIGURE_ARGS += --with-ffmpeg
94 endif
95
96 define Package/motion/install
97 $(INSTALL_DIR) $(1)/etc/config $(1)/etc/init.d
98 $(INSTALL_CONF) ./files/motion.conf $(1)/etc/config/motion
99 $(INSTALL_BIN) ./files/motion.init $(1)/etc/init.d/motion
100 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/motion/motion-dist.conf $(1)/etc/motion.conf
101 $(INSTALL_DIR) $(1)/usr/bin
102 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/motion $(1)/usr/bin/
103 endef
104 Package/motion-noffmpeg/install = $(Package/motion/install)
105 Package/motion-ffmpeg/install = $(Package/motion/install)
106
107 $(eval $(call BuildPackage,motion-noffmpeg))
108 $(eval $(call BuildPackage,motion-ffmpeg))