You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.0 KiB

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