Compare commits

...

7 Commits

Author SHA1 Message Date
Arun Muthusamy
7756ebaf5f update libmobile src package 2018-05-29 10:35:08 +02:00
Arun muthusamy
dd6a54ca5e update libmobile package src 2018-05-29 10:35:08 +02:00
Arun muthusamy
a1a387c945 typo 2018-05-29 10:35:08 +02:00
Arun muthusamy
727adb6942 update package src 2018-05-29 10:35:08 +02:00
Arun muthusamy
cdba032e25 xml dependency name changed 2018-05-29 10:35:08 +02:00
Arun muthusamy
017f7a84b5 update package source 2018-05-29 10:35:08 +02:00
Arun muthusamy
522f8df16b add: libmobile package 2018-05-29 10:33:20 +02:00
3 changed files with 95 additions and 0 deletions

60
libmobile/Makefile Normal file
View File

@@ -0,0 +1,60 @@
#
# Copyright (C) 2013 Inteno
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=libmobile
PKG_VERSION:=0.0.1
PKG_SOURCE_VERSION:=b885ca0588074a464ec0c4af7d83664fb845ad81
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git@public.inteno.se:mobile-api.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/libmobile
CATEGORY:=Libraries
#DEPENDS:=+libubox +ubus +libcurl +libjson-c +libxml +libxml2
DEPENDS:=+libubox +ubus +libcurl +libjson-c +libxml2
TITLE:=lib package for 4g dongle
endef
define Package/libmobiled
CATEGORY:=Utilities
DEPENDS:=+libubox +ubus +libmobile
TITLE:=application package for 4g dongle
endef
define Package/libmobile/description
a library to communicate with dongles through HTTP requests
endef
define Package/libmobiled/description
application using libmobile to communicate with a 4g dongle
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/ $(1)/usr/lib
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libmobile.h $(1)/usr/include/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libmobile.so $(1)/usr/lib/
endef
define Package/libmobile/install
$(INSTALL_DIR) $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libmobile.so $(1)/usr/lib/
endef
define Package/libmobiled/install
$(CP) ./files/* $(1)/ # copy from files to final image
$(INSTALL_DIR) $(1)/sbin # make the dir
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dongle_language $(1)/sbin/ # copy binaries to new directory
endef
$(eval $(call BuildPackage,libmobile))
$(eval $(call BuildPackage,libmobiled))

View File

View File

@@ -0,0 +1,35 @@
#!/bin/sh /etc/rc.common
START=14
STOP=96
USE_PROCD=1
NAME=dongled
DONGLE="/sbin/dongle_language"
start_service() {
procd_open_instance
procd_set_param command $DONGLE
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}
stop() {
#stop_service() is called after procd killed the service
echo ;
}
service_triggers()
{
procd_add_reload_trigger dongle
#echo "trigger"
}
reload_service() {
stop
start
}