Merge pull request #4940 from diizzyy/patch-95
[feed/packages.git] / admin / debootstrap / Makefile
1 #
2 # Copyright (C) 2010 Gianluigi Tiesi <sherpya@netfarm.it>
3 # Copyright (C) 2011-2014 OpenWrt.org
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=debootstrap
12 PKG_VERSION:=1.0.87
13 PKG_RELEASE:=1
14 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
15
16 PKG_SOURCE:=$(PKG_NAME)-udeb_$(PKG_VERSION)_all.udeb
17 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/d/debootstrap
18 PKG_HASH:=784f5754f3287ae80715d9100a4ed04e7895be5f7b81b7b2295d335dd69d79fb
19 PKG_LICENSE:=Unique
20 PKG_LICENSE_FILES:=debian/copyright
21
22 UNPACK_CMD=ar -p "$(DL_DIR)/$(PKG_SOURCE)" data.tar.xz | xzcat | tar -C $(1) -xf -
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/debootstrap
27 SECTION:=admin
28 CATEGORY:=Administration
29 TITLE:=Bootstrap a basic Debian system
30 URL:=http://wiki.debian.org/Debootstrap
31 DEPENDS:= +coreutils +coreutils-chroot +coreutils-sha1sum +ar +xz
32 endef
33
34 define Package/debootstrap/description
35 debootstrap is used to create a Debian base system from scratch, without
36 requiring the availability of dpkg or apt. It does this by downloading .deb
37 files from a mirror site, and carefully unpacking them into a directory which
38 can eventually be chrooted into.
39 endef
40
41 define Build/Compile
42 # file pkgdetails.c was imported from debian package base-installer version 1.130
43 $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) ./files/pkgdetails.c -o $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails
44 endef
45
46 define Package/debootstrap/install
47 $(INSTALL_DIR) $(1)/usr/sbin
48 $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/sbin
49 $(INSTALL_DIR) $(1)/usr/share/debootstrap
50 $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails $(1)/usr/share/debootstrap
51 $(INSTALL_DATA) $(PKG_BUILD_DIR)/usr/share/debootstrap/functions $(1)/usr/share/debootstrap
52 $(INSTALL_DIR) $(1)/usr/share/debootstrap/scripts
53 $(CP) $(PKG_BUILD_DIR)/usr/share/debootstrap/scripts/* $(1)/usr/share/debootstrap/scripts
54 endef
55
56 $(eval $(call BuildPackage,debootstrap))