make gpio conformant to generic gpio spec.
[openwrt.git] / package / util-linux / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=util-linux
12 PKG_VERSION:=2.12r
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/
17 PKG_MD5SUM:=c261230b27fc0fbcc287c76884caf2d3
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/util-linux/Default
22 SECTION:=utils
23 CATEGORY:=Utilities
24 DEPENDS:=@!TARGET_etrax
25 URL:=http://www.kernel.org/pub/linux/utils/util-linux/
26 endef
27
28 define Package/fdisk
29 $(call Package/util-linux/Default)
30 TITLE:=Partition table manipulation utility
31 endef
32
33 define Package/fdisk/description
34 This package contains a utility for managing disk partition tables.
35 endef
36
37 define Package/cfdisk
38 $(call Package/util-linux/Default)
39 TITLE:=Partition table manipulation utility
40 DEPENDS:= +libncurses
41 endef
42
43 define Package/cfdisk/description
44 This package contains a utility for managing disk partition tables.
45 endef
46
47 define Package/losetup
48 $(call Package/util-linux/Default)
49 TITLE:=Loopback devices setup and control utility
50 endef
51
52 define Package/losetup/description
53 This package contains a utility for managing loopback devices.
54 endef
55
56 define Package/swap-utils
57 $(call Package/util-linux/Default)
58 TITLE:=Swap space management utilities
59 endef
60
61 define Package/swap-utils/description
62 This package contains a collection of tools for managing swap space:
63 - mkswap
64 - swapon
65 - swapoff
66 endef
67
68 define Package/hwclock
69 $(call Package/util-linux/Default)
70 TITLE:=Utilities for managing the hardware clock
71 endef
72
73 define Package/hwclock/description
74 This package contains a utility for managing the hardware clock.
75 endef
76
77 define Build/Configure
78 # this is NOT GNU configure!
79 ( cd $(PKG_BUILD_DIR); \
80 CC="$(TARGET_CC)" \
81 CFLAGS="$(TARGET_CPPFLAGS)" \
82 LDFLAGS="$(TARGET_LDFLAGS)" \
83 ./configure \
84 );
85 endef
86
87 define Build/Compile
88 $(MAKE) -C $(PKG_BUILD_DIR) \
89 OPT="$(TARGET_CFLAGS)" \
90 INSTALLSUID="install -m 4755" \
91 DESTDIR="$(PKG_INSTALL_DIR)" \
92 all install
93 endef
94
95 define Package/Template
96 @if [ \! -f "$(PKG_INSTALL_DIR)/$(1)" ]; then \
97 rm -f $(PKG_BUILD_DIR)/.built; \
98 $(MAKE) $(PKG_BUILD_DIR)/.built; \
99 fi
100 $(INSTALL_DIR) $(2)
101 $(CP) $(PKG_INSTALL_DIR)/$(1) $(2)/
102 endef
103
104 define Package/fdisk/install
105 $(call Package/Template,sbin/fdisk,$(1)/usr/sbin)
106 endef
107
108 define Package/cfdisk/install
109 $(call Package/Template,sbin/cfdisk,$(1)/usr/sbin)
110 endef
111
112 define Package/losetup/install
113 $(call Package/Template,sbin/losetup,$(1)/usr/sbin)
114 endef
115
116 define Package/swap-utils/install
117 $(call Package/Template,sbin/mkswap,$(1)/usr/sbin)
118 $(call Package/Template,sbin/swapon,$(1)/usr/sbin)
119 $(call Package/Template,sbin/swapoff,$(1)/usr/sbin)
120 endef
121
122 define Package/hwclock/install
123 $(call Package/Template,sbin/hwclock,$(1)/usr/sbin)
124 endef
125
126 $(eval $(call BuildPackage,fdisk))
127 $(eval $(call BuildPackage,cfdisk))
128 $(eval $(call BuildPackage,losetup))
129 $(eval $(call BuildPackage,swap-utils))
130 $(eval $(call BuildPackage,hwclock))
This page took 0.040177 seconds and 5 git commands to generate.