debootstrap: update to version 1.0.128+nmu2+deb12u1
[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.128+nmu2+deb12u1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-udeb_$(PKG_VERSION)_all.udeb
16 PKG_SOURCE_URL:=@DEBIAN/pool/main/d/debootstrap
17 PKG_HASH:=4fa4ec7c144ed047c47d0d8eb9b91b56eaa9b2db2b52510777abbabf5965d268
18
19 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
20 PKG_LICENSE:=Unique
21 PKG_LICENSE_FILES:=debian/copyright
22
23 UNPACK_CMD=ar -p "$(DL_DIR)/$(PKG_SOURCE)" data.tar.xz | xzcat | tar -C $(1) -xf -
24
25 include $(INCLUDE_DIR)/package.mk
26
27 define Package/debootstrap
28 SECTION:=admin
29 CATEGORY:=Administration
30 TITLE:=Bootstrap a basic Debian system
31 URL:=https://wiki.debian.org/Debootstrap
32 DEPENDS:= +coreutils +coreutils-chroot +coreutils-sha1sum +ar +xz-utils +xz
33 endef
34
35 define Package/debootstrap/description
36 debootstrap is used to create a Debian base system from scratch, without
37 requiring the availability of dpkg or apt. It does this by downloading .deb
38 files from a mirror site, and carefully unpacking them into a directory which
39 can eventually be chrooted into.
40 endef
41
42 define Build/Compile
43 # file pkgdetails.c was imported from debian package base-installer version 1.130
44 $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) ./files/pkgdetails.c -o $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails
45 endef
46
47 define Package/debootstrap/install
48 $(INSTALL_DIR) $(1)/usr/sbin
49 $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/sbin
50 $(INSTALL_DIR) $(1)/usr/share/debootstrap
51 $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails $(1)/usr/share/debootstrap
52 $(INSTALL_DATA) $(PKG_BUILD_DIR)/usr/share/debootstrap/functions $(1)/usr/share/debootstrap
53 $(INSTALL_DIR) $(1)/usr/share/debootstrap/scripts
54 $(CP) $(PKG_BUILD_DIR)/usr/share/debootstrap/scripts/* $(1)/usr/share/debootstrap/scripts
55 endef
56
57 $(eval $(call BuildPackage,debootstrap))