1# 2# Copyright (c) 2013 The Linux Foundation. All rights reserved. 3# Copyright (C) 2006-2011 OpenWrt.org 4# 5# This is free software, licensed under the GNU General Public License v2. 6# See /LICENSE for more information. 7# 8 9include $(TOPDIR)/rules.mk 10 11PKG_NAME:=hotplug2 12PKG_REV:=201 13PKG_VERSION:=$(PKG_REV) 14PKG_RELEASE:=4 15 16PKG_SOURCE_PROTO:=svn 17PKG_SOURCE_VERSION:=$(PKG_REV) 18PKG_SOURCE_SUBDIR:=hotplug2-$(PKG_VERSION) 19PKG_SOURCE_URL:=http://svn.nomi.cz/svn/isteve/hotplug2 20PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz 21#PKG_SOURCE_URL:=http://isteve.bofh.cz/~isteve/hotplug2 22#PKG_MD5SUM:=ea2c01d027b4002e4e6b0ff266f51a51 23 24PKG_MIRROR_MD5SUM:=9a8e64f89558998bb824525105cdbe6b 25 26include $(INCLUDE_DIR)/package.mk 27 28define Package/hotplug2 29 SECTION:=base 30 CATEGORY:=Base system 31 VERSION:=1.0-beta-$(PKG_RELEASE) 32 TITLE:=Version 1.0 Dynamic device management subsystem for embedded systems 33 URL:=http://isteve.bofh.cz/~isteve/hotplug2/ 34 DEPENDS:=+!USE_UCLIBC:libbsd 35endef 36 37define Package/hotplug2/description 38 Hotplug2 is a trivial replacement of some of the UDev functionality 39 in a tiny pack, intended for Linux early userspace: Init RAM FS and InitRD. 40 This is an implementation of Hotplug2-1.0-beta 41endef 42 43define Package/hotplug2/conffiles 44/etc/hotplug2.rules 45endef 46 47MAKE_FLAGS += \ 48 COPTS="$(TARGET_CFLAGS)" \ 49 STATIC_WORKER="fork" 50 51ifneq ($(CONFIG_USE_EGLIBC),) 52 TARGET_LDFLAGS += -lbsd 53endif 54 55define Build/Compile 56 $(call Build/Compile/Default) 57 $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o $(PKG_BUILD_DIR)/udevtrigger src/udevtrigger.c 58endef 59 60define Package/hotplug2/install 61 $(INSTALL_DIR) $(1)/etc 62 $(INSTALL_DIR) $(1)/etc/init.d 63 $(INSTALL_DATA) ./files/hotplug2.rules $(1)/etc/ 64 $(INSTALL_BIN) ./files/usb_modem_hotplug $(1)/etc/ 65 $(INSTALL_DIR) $(1)/sbin 66 $(INSTALL_BIN) $(PKG_BUILD_DIR)/udevtrigger $(1)/sbin/ 67 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hotplug2 $(1)/sbin/ 68 $(INSTALL_BIN) ./files/hotplug2.mount $(1)/sbin/ 69 $(INSTALL_BIN) ./files/hotplug2.umount $(1)/sbin/ 70 $(INSTALL_BIN) ./files/umount_unapproved $(1)/sbin/ 71 $(INSTALL_BIN) ./files/app_mount $(1)/sbin/ 72 $(INSTALL_BIN) ./files/hotplug2.testbusy $(1)/sbin/ 73 -$(INSTALL_BIN) ./files/green_download_path $(1)/sbin/ 74endef 75 76$(eval $(call BuildPackage,hotplug2)) 77