add udev package
[openwrt/svn-archive/archive.git] / openwrt / package / udev / Makefile
1 # $Id: Makefile 2567 2005-11-29 11:13:32Z nico $
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=udev
6 PKG_VERSION:=077
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=61ec646daf7795e9777e8f33975408fe
9
10 PKG_SOURCE_URL:=ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ \
11 http://ftp.kernel.org/pub/linux/utils/kernel/hotplug/ \
12 ftp://ftp.de.kernel.org/pub/linux/utils/kernel/hotplug/ \
13 http://ftp.de.kernel.org/pub/linux/utils/kernel/hotplug/ \
14 ftp://ftp.fr.kernel.org/pub/linux/utils/kernel/hotplug/ \
15 http://ftp.fr.kernel.org/pub/linux/utils/kernel/hotplug/
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_CAT:=bzcat
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
19 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
20
21 include $(TOPDIR)/package/rules.mk
22
23 $(eval $(call PKG_template,UDEV,udev,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
24
25 $(PKG_BUILD_DIR)/.configured:
26 touch $@
27
28 $(PKG_BUILD_DIR)/.built:
29 rm -rf $(PKG_INSTALL_DIR)
30 mkdir -p $(PKG_INSTALL_DIR)
31 $(MAKE) -C $(PKG_BUILD_DIR) \
32 CROSS="$(TARGET_CROSS)" \
33 STRIP="/bin/true" \
34 OPTFLAGS="$(TARGET_CFLAGS)" \
35 DESTDIR="$(PKG_INSTALL_DIR)" \
36 all install
37 touch $@
38
39 $(IPKG_UDEV):
40 install -d -m0775 $(IDIR_UDEV)/etc/udev
41 cp -fpR $(PKG_INSTALL_DIR)/etc/udev/* $(IDIR_UDEV)/etc/udev/
42 install -d -m0775 $(IDIR_UDEV)/lib/udev
43 install -d -m0775 $(IDIR_UDEV)/sbin/
44 cp -fpR $(PKG_INSTALL_DIR)/sbin/udev $(IDIR_UDEV)/sbin/
45 cp -fpR $(PKG_INSTALL_DIR)/sbin/udevcontrol $(IDIR_UDEV)/sbin/
46 cp -fpR $(PKG_INSTALL_DIR)/sbin/udevd $(IDIR_UDEV)/sbin/
47 cp -fpR $(PKG_INSTALL_DIR)/sbin/udevsend $(IDIR_UDEV)/sbin/
48 cp -fpR $(PKG_INSTALL_DIR)/sbin/udevstart $(IDIR_UDEV)/sbin/
49 install -d -m0775 $(IDIR_UDEV)/usr/bin/
50 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/udevinfo $(IDIR_UDEV)/usr/bin/
51 cp -fpR $(PKG_INSTALL_DIR)/usr/bin/udevtest $(IDIR_UDEV)/usr/bin/
52 install -d -m0775 $(IDIR_UDEV)/usr/sbin/
53 cp -fpR $(PKG_INSTALL_DIR)/usr/sbin/udevmonitor $(IDIR_UDEV)/usr/sbin/
54 $(RSTRIP) $(IDIR_UDEV)
55 $(IPKG_BUILD) $(IDIR_UDEV) $(PACKAGE_DIR)
56
57 mostlyclean:
58 -$(MAKE) -C $(PKG_BUILD_DIR) clean
59 rm -f $(PKG_BUILD_DIR)/.built