mtd: fix wrong open() return code checks
[openwrt/svn-archive/archive.git] / package / util-linux-ng / Makefile
1 #
2 # Copyright (C) 2007-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=util-linux-ng
11 PKG_VERSION:=2.13.0.1
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.13
16 PKG_MD5SUM:=c841dc8743905c8f0db20c9db5094f57
17
18 PKG_BUILD_DEPENDS=e2fsprogs
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/util-linux/Default
23 SECTION:=utils
24 CATEGORY:=Utilities
25 URL:=http://www.kernel.org/pub/linux/utils/util-linux-ng/
26 endef
27
28 define Package/fdisk
29 $(call Package/util-linux/Default)
30 TITLE:=Partition table manipulation utility
31 SUBMENU=disc
32 endef
33
34 define Package/fdisk/description
35 This package contains a utility for managing disk partition tables.
36 endef
37
38 define Package/cfdisk
39 $(call Package/util-linux/Default)
40 SUBMENU:=disc
41 TITLE:=Partition table manipulation utility
42 DEPENDS:= +libncurses
43 endef
44
45 define Package/cfdisk/description
46 This package contains a utility for managing disk partition tables.
47 endef
48
49 define Package/losetup
50 $(call Package/util-linux/Default)
51 TITLE:=Loopback devices setup and control utility
52 endef
53
54 define Package/losetup/description
55 This package contains a utility for managing loopback devices.
56 endef
57
58 define Package/mount-utils
59 $(call Package/util-linux/Default)
60 TITLE:=Devices mount/unmounting utilities
61 DEPENDS+= +libblkid +libuuid
62 endef
63
64 define Package/mount-utils/description
65 This package contains utilities to mount/unmount devices.
66 endef
67
68 define Package/swap-utils
69 $(call Package/util-linux/Default)
70 SUBMENU:=disc
71 TITLE:=Swap space management utilities
72 DEPENDS+= +libblkid +libuuid
73 endef
74
75 define Package/swap-utils/description
76 This package contains a collection of tools for managing swap space:
77 - mkswap
78 - swapon
79 - swapoff
80 endef
81
82 define Package/hwclock
83 $(call Package/util-linux/Default)
84 TITLE:=Utilities for managing the hardware clock
85 endef
86
87 define Package/hwclock/description
88 This package contains a utility for managing the hardware clock.
89 endef
90
91 define Package/flock
92 $(call Package/util-linux/Default)
93 TITLE:=Manage file locks from shell scripts
94 endef
95
96 define Package/flock/description
97 This package contains a utility for managing file locks from shell scripts.
98 endef
99
100 define Build/Compile
101 $(MAKE) -C $(PKG_BUILD_DIR)/disk-utils mkswap
102 $(MAKE) -C $(PKG_BUILD_DIR)/mount swapon losetup umount mount
103 $(MAKE) -C $(PKG_BUILD_DIR)/fdisk fdisk cfdisk
104 $(MAKE) -C $(PKG_BUILD_DIR)/hwclock hwclock
105 $(MAKE) -C $(PKG_BUILD_DIR)/sys-utils flock
106 endef
107
108 define Package/fdisk/install
109 $(INSTALL_DIR) $(1)/sbin
110 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/fdisk $(1)/sbin/
111 endef
112
113 define Package/cfdisk/install
114 $(INSTALL_DIR) $(1)/sbin
115 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/cfdisk $(1)/sbin/
116 endef
117
118 define Package/losetup/install
119 $(INSTALL_DIR) $(1)/sbin
120 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount/losetup $(1)/sbin/
121 endef
122
123 define Package/mount-utils/install
124 $(INSTALL_DIR) $(1)/bin/
125 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount/{u,}mount $(1)/bin
126 endef
127
128 define Package/swap-utils/install
129 $(INSTALL_DIR) $(1)/sbin
130 $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/mkswap $(PKG_BUILD_DIR)/mount/swapon $(1)/sbin/
131 ln -sf swapon $(1)/sbin/swapoff
132 endef
133
134 define Package/hwclock/install
135 $(INSTALL_DIR) $(1)/sbin
136 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/sbin/
137 endef
138
139 define Package/flock/install
140 $(INSTALL_DIR) $(1)/usr/bin
141 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/flock $(1)/usr/bin/
142 endef
143
144 $(eval $(call BuildPackage,fdisk))
145 $(eval $(call BuildPackage,cfdisk))
146 $(eval $(call BuildPackage,losetup))
147 $(eval $(call BuildPackage,mount-utils))
148 $(eval $(call BuildPackage,swap-utils))
149 $(eval $(call BuildPackage,hwclock))
150 $(eval $(call BuildPackage,flock))