Root/package/hotplug2/Makefile

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

Archive Download this file



interactive