-
Notifications
You must be signed in to change notification settings - Fork 60
/
Makefile
56 lines (45 loc) · 1.27 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#
# Copyright (C) 2013 Zoltan Hubai
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ddserver
PKG_VERSION:=0.2
PKG_RELEASE:=14
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/ddserver
SECTION:=utils
CATEGORY:=Multimedia
DEPENDS:=+libusb-1.0 +libstdcpp +libgcc +libpthread
TITLE:=Server for DSLR camera to use with DslrDashboard
MAINTAINER:=Zoltan Hubai <[email protected]>
endef
define Package/ddserver/description
Server for DslrDashboard for controling connected DSLR
camera with USB
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
LIBS="-nodefaultlibs -lgcc -lgcc_s -lc -lusb-1.0 -lpthread -lstdc++" \
LDFLAGS="$(EXTRA_LDFLAGS)" \
CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS)" \
$(TARGET_CONFIGURE_OPTS) \
CROSS="$(TARGET_CROSS)" \
ARCH="$(ARCH)" \
$(1);
endef
define Package/ddserver/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ddserver $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/ddserver.init $(1)/etc/init.d/ddserver
endef
define Package/ddserver/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || /etc/init.d/ddserver enable || true
endef
$(eval $(call BuildPackage,ddserver))