Add ISC/BSD to PKG_LICENSE_*
[feed/packages.git] / admin / debootstrap / Makefile
1 #
2 # Copyright (C) 2010 Gianluigi Tiesi <sherpya@netfarm.it>
3 # Copyright (C) 2011-2013 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.60~bpo70+1
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_MD5SUM:=6d4e3b97981b9e0bb86f49d8edac91af
19
20 UNPACK_CMD=ar -p "$(DL_DIR)/$(PKG_SOURCE)" data.tar.xz | xzcat | tar -C $(1) -xf -
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/debootstrap
25 SECTION:=admin
26 CATEGORY:=Administration
27 TITLE:=Bootstrap a basic Debian system
28 URL:=http://wiki.debian.org/Debootstrap
29 DEPENDS:= +coreutils +coreutils-chroot +coreutils-sha1sum
30 endef
31
32 define Package/debootstrap/description
33 debootstrap is used to create a Debian base system from scratch, without
34 requiring the availability of dpkg or apt. It does this by downloading .deb
35 files from a mirror site, and carefully unpacking them into a directory which
36 can eventually be chrooted into.
37 endef
38
39 define Build/Compile
40 # file pkgdetails.c was imported from debian package base-installer version 1.130
41 $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) ./files/pkgdetails.c -o $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails
42 endef
43
44 define Package/debootstrap/install
45 $(INSTALL_DIR) $(1)/usr/sbin
46 $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/sbin
47 $(INSTALL_DIR) $(1)/usr/share/debootstrap
48 $(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails $(1)/usr/share/debootstrap
49 $(INSTALL_DATA) $(PKG_BUILD_DIR)/usr/share/debootstrap/functions $(1)/usr/share/debootstrap
50 $(INSTALL_DATA) $(PKG_BUILD_DIR)/usr/share/debootstrap/devices.tar.gz $(1)/usr/share/debootstrap
51 $(INSTALL_DIR) $(1)/usr/share/debootstrap/scripts
52 $(INSTALL_DATA) $(PKG_BUILD_DIR)/usr/share/debootstrap/scripts/* $(1)/usr/share/debootstrap/scripts
53 endef
54
55 $(eval $(call BuildPackage,debootstrap))