1246a5001b58592584de76797f2c2f0a4bb0062b
[openwrt/svn-archive/archive.git] / utils / debootstrap / Makefile
1 #
2 # Copyright (C) 2010 Gianluigi Tiesi <sherpya@netfarm.it>
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:=debootstrap
11 PKG_VERSION:=1.0.23
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-udeb_$(PKG_VERSION)_all.udeb
15 PKG_SOURCE_URL:=http://ftp.it.debian.org/debian/pool/main/d/debootstrap
16 PKG_MD5SUM:=8cda29a71c3e951fa61eeae5d802ec76
17
18 #UNPACK_CMD=dpkg-deb --fsys-tarfile $(DL_DIR)/$(PKG_SOURCE) | ( cd $(1) && tar -xf - )
19 UNPACK_CMD=ar -p "$(DL_DIR)/$(PKG_SOURCE)" data.tar.gz | ( cd $(1) && tar -xzf - )
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/debootstrap
24 SECTION:=admin
25 CATEGORY:=Administration
26 TITLE:=Bootstrap a basic Debian system
27 URL:=http://wiki.debian.org/Debootstrap
28 DEPENDS:=+coreutils-chroot
29 MAINTAINER:=Gianluigi Tiesi <sherpya@netfarm.it>
30 endef
31
32 define Package/debootstrap/description
33 debootstrap is used to create a Debian base system from scratch,
34 without requiring the availability of dpkg or apt. It does this by
35 downloading .deb files from a mirror site, and carefully unpacking them
36 into a directory which can eventually be chrooted into.
37 endef
38
39 define Build/Compile
40 $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) ./files/pkgdetails.c -o $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails
41 endef
42
43 define Package/debootstrap/install
44 cd $(PKG_BUILD_DIR) && ( $(FIND) usr | cpio -pd $(1) )
45 endef
46
47 $(eval $(call BuildPackage,debootstrap))