add a swap-utils subpackage,
[openwrt.git] / package / util-linux / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=fdisk
6 PKG_VERSION:=2.12r
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=c261230b27fc0fbcc287c76884caf2d3
9
10 PKG_SOURCE_URL:=ftp://ftp.kernel.org/pub/linux/utils/util-linux/ \
11 http://ftp.kernel.org/pub/linux/utils/util-linux/ \
12 ftp://ftp.de.kernel.org/pub/linux/utils/util-linux/ \
13 http://ftp.de.kernel.org/pub/linux/utils/util-linux/
14 PKG_SOURCE:=util-linux-$(PKG_VERSION).tar.gz
15 PKG_CAT:=zcat
16 PKG_BUILD_DIR:=$(BUILD_DIR)/util-linux-$(PKG_VERSION)
17 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
18
19 include $(TOPDIR)/package/rules.mk
20
21 $(eval $(call PKG_template,FDISK,fdisk,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
22 $(eval $(call PKG_template,SWAP_UTILS,swap-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
23
24 $(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
25 (cd $(PKG_BUILD_DIR); \
26 $(TARGET_CONFIGURE_OPTS) \
27 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
28 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
29 ./configure \
30 );
31 touch $@
32
33 $(PKG_BUILD_DIR)/.built:
34 rm -rf $(PKG_INSTALL_DIR)
35 mkdir -p $(PKG_INSTALL_DIR)
36 $(MAKE) -C $(PKG_BUILD_DIR) \
37 $(TARGET_CONFIGURE_OPTS) \
38 OPT="$(TARGET_CFLAGS)" \
39 DESTDIR="$(PKG_INSTALL_DIR)" \
40 INSTALLSUID="install -m 4755" \
41 all install
42 touch $@
43
44 $(IPKG_FDISK):
45 install -d -m0755 $(IDIR_FDISK)/usr/sbin
46 cp -fpR $(PKG_INSTALL_DIR)/sbin/fdisk $(IDIR_FDISK)/usr/sbin/
47 $(RSTRIP) $(IDIR_FDISK)
48 $(IPKG_BUILD) $(IDIR_FDISK) $(PACKAGE_DIR)
49
50 $(IPKG_SWAP_UTILS):
51 install -d -m0755 $(IDIR_SWAP_UTILS)/usr/sbin
52 cp -fpR $(PKG_INSTALL_DIR)/sbin/mkswap $(IDIR_SWAP_UTILS)/usr/sbin/
53 cp -fpR $(PKG_INSTALL_DIR)/sbin/swap{on,off} $(IDIR_SWAP_UTILS)/usr/sbin/
54 $(RSTRIP) $(IDIR_SWAP_UTILS)
55 $(IPKG_BUILD) $(IDIR_SWAP_UTILS) $(PACKAGE_DIR)
56
57 mostlyclean:
58 -$(MAKE) -C $(PKG_BUILD_DIR) clean
59 rm -f $(PKG_BUILD_DIR)/.built
This page took 0.041884 seconds and 5 git commands to generate.