dnsmasq: extend the init script thanks Sedky
[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:=@!LINUX_2_6_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 DESCRIPTION:=\
32 This package contains a utility for managing disk partition tables.
33 URL:=http://www.kernel.org/pub/linux/utils/util-linux/
34 endef
35
36 define Package/cfdisk
37 $(call Package/util-linux/Default)
38 TITLE:=Partition table manipulation utility
39 DEPENDS+= +libncurses
40 DESCRIPTION:=\
41 This package contains a utility for managing disk partition tables.
42 URL:=http://www.kernel.org/pub/linux/utils/util-linux/
43 endef
44
45 define Package/losetup
46 $(call Package/util-linux/Default)
47 TITLE:=Loopback devices setup and control utility
48 DESCRIPTION:=\
49 This package contains a utility for managing loopback devices.
50 endef
51
52 define Package/swap-utils
53 $(call Package/util-linux/Default)
54 TITLE:=Swap space management utilities
55 DESCRIPTION:=\
56 This package contains a collection of tools for managing swap space: \\\
57 - mkswap\\\
58 - swapon\\\
59 - swapoff
60 endef
61
62 define Package/hwclock
63 $(call Package/util-linux/Default)
64 TITLE:=Utilities for managing the hardware clock
65 DESCRIPTION:=\
66 This package contains a utility for managing the hardware clock
67 endef
68
69 define Build/Configure
70 # this is NOT GNU configure!
71 ( cd $(PKG_BUILD_DIR); \
72 CC="$(TARGET_CC)" \
73 CFLAGS="$(TARGET_CPPFLAGS)" \
74 LDFLAGS="$(TARGET_LDFLAGS)" \
75 ./configure \
76 );
77 endef
78
79 define Build/Compile
80 $(MAKE) -C $(PKG_BUILD_DIR) \
81 OPT="$(TARGET_CFLAGS)" \
82 INSTALLSUID="install -m 4755" \
83 DESTDIR="$(PKG_INSTALL_DIR)" \
84 all install
85 endef
86
87 define Package/Template
88 @if [ \! -f "$(PKG_INSTALL_DIR)/$(1)" ]; then \
89 rm -f $(PKG_BUILD_DIR)/.built; \
90 $(MAKE) $(PKG_BUILD_DIR)/.built; \
91 fi
92 $(INSTALL_DIR) $(2)
93 $(CP) $(PKG_INSTALL_DIR)/$(1) $(2)/
94 endef
95
96 define Package/fdisk/install
97 $(call Package/Template,sbin/fdisk,$(1)/usr/sbin)
98 endef
99
100 define Package/cfdisk/install
101 $(call Package/Template,sbin/cfdisk,$(1)/usr/sbin)
102 endef
103
104 define Package/losetup/install
105 $(call Package/Template,sbin/losetup,$(1)/usr/sbin)
106 endef
107
108 define Package/swap-utils/install
109 $(call Package/Template,sbin/mkswap,$(1)/usr/sbin)
110 $(call Package/Template,sbin/swapon,$(1)/usr/sbin)
111 $(call Package/Template,sbin/swapoff,$(1)/usr/sbin)
112 endef
113
114 define Package/hwclock/install
115 $(call Package/Template,sbin/hwclock,$(1)/usr/sbin)
116 endef
117
118 $(eval $(call BuildPackage,fdisk))
119 $(eval $(call BuildPackage,cfdisk))
120 $(eval $(call BuildPackage,losetup))
121 $(eval $(call BuildPackage,swap-utils))
122 $(eval $(call BuildPackage,hwclock))
This page took 0.072818 seconds and 5 git commands to generate.