add patch from #196
[openwrt.git] / openwrt / 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,LOSETUP,losetup,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
23 $(eval $(call PKG_template,SWAP_UTILS,swap-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
24
25 $(PKG_BUILD_DIR)/.configured:
26 (cd $(PKG_BUILD_DIR); \
27 $(TARGET_CONFIGURE_OPTS) \
28 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
29 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
30 ./configure \
31 );
32 touch $@
33
34 $(PKG_BUILD_DIR)/.built:
35 rm -rf $(PKG_INSTALL_DIR)
36 mkdir -p $(PKG_INSTALL_DIR)
37 $(MAKE) -C $(PKG_BUILD_DIR) \
38 $(TARGET_CONFIGURE_OPTS) \
39 OPT="$(TARGET_CFLAGS)" \
40 DESTDIR="$(PKG_INSTALL_DIR)" \
41 INSTALLSUID="install -m 4755" \
42 all install
43 touch $@
44
45 $(IPKG_FDISK):
46 install -d -m0755 $(IDIR_FDISK)/usr/sbin
47 $(CP) $(PKG_INSTALL_DIR)/sbin/fdisk $(IDIR_FDISK)/usr/sbin/
48 $(RSTRIP) $(IDIR_FDISK)
49 $(IPKG_BUILD) $(IDIR_FDISK) $(PACKAGE_DIR)
50
51 $(IPKG_LOSETUP):
52 install -d -m0755 $(IDIR_LOSETUP)/usr/sbin
53 $(CP) $(PKG_INSTALL_DIR)/sbin/losetup $(IDIR_LOSETUP)/usr/sbin/
54 $(RSTRIP) $(IDIR_LOSETUP)
55 $(IPKG_BUILD) $(IDIR_LOSETUP) $(PACKAGE_DIR)
56
57 $(IPKG_SWAP_UTILS):
58 install -d -m0755 $(IDIR_SWAP_UTILS)/usr/sbin
59 $(CP) $(PKG_INSTALL_DIR)/sbin/mkswap $(IDIR_SWAP_UTILS)/usr/sbin/
60 $(CP) $(PKG_INSTALL_DIR)/sbin/swap{on,off} $(IDIR_SWAP_UTILS)/usr/sbin/
61 $(RSTRIP) $(IDIR_SWAP_UTILS)
62 $(IPKG_BUILD) $(IDIR_SWAP_UTILS) $(PACKAGE_DIR)
63
64 mostlyclean:
65 -$(MAKE) -C $(PKG_BUILD_DIR) clean
66 rm -f $(PKG_BUILD_DIR)/.built
This page took 0.040538 seconds and 5 git commands to generate.