source: debwrt/trunk/debian/rootfs/debian.mk @ 62

Last change on this file since 62 was 62, checked in by amain, 8 years ago

Create debian rootfs

File size: 2.0 KB
Line 
1# DebWrt - Debian on Embedded devices
2#
3# Copyright (C) 2010 Johan van Zoomeren <amain@debwrt.net>
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18DEBIAN_ROOTFS_INCLUDE_PACKAGES:=$(call qstrip,$(CONFIG_DEBIAN_ROOTFS_INCLUDE_PACKAGES))
19
20debian/rootfs: debian/rootfs/bootstrap debian/rootfs/debwrt-packages
21        touch $@
22
23debian/rootfs/bootstrap: debian/rootfs/clean-rootfs-dir
24        sudo debootstrap --arch=$(TARGET_ARCH)\
25                     --foreign \
26                         --include="$(DEBIAN_ROOTFS_INCLUDE_PACKAGES)" \
27                     $(DEBIAN_BUILD_VERSION) \
28                     $(ROOTFS_BUILD_DIR) \
29                     $(CONFIG_DEBIAN_BUILDENV_REPOSITORY)
30        touch $@
31
32debian/rootfs/debwrt-packages: debian/rootfs/bootstrap
33        ls ${INSTALL_DIR_DEBIAN_PACKAGES}/*.deb | grep -v "debwrt-kernel-headers" | while read package; do \
34                pfname=`basename $$package`; \
35                pname=`echo $$pfname | sed 's/_.*//'`; \
36                echo "Installing DebWrt package: $$pname"; \
37                sudo cp $$package $(ROOTFS_BUILD_DIR)/var/cache/apt/archives; \
38                sudo dpkg-deb -x $$package $(ROOTFS_BUILD_DIR); \
39                sudo bash -c "echo \"$$pname /var/cache/apt/archives/$$pfname\" >>$(ROOTFS_BUILD_DIR)/debootstrap/debpaths" ;\
40        done
41        touch $@
42       
43debian/rootfs/clean-rootfs-dir:
44        sudo rm -rf $(ROOTFS_BUILD_DIR)
45        touch $@
46
47debian/rootfs/clean: 
48        sudo rm -rf $(ROOTFS_BUILD_DIR)
49        rm -rf debian/rootfs/debwrt-packages
50        rm -rf debian/rootfs/bootstrap
51        rm -rf debian/rootfs
52
Note: See TracBrowser for help on using the repository browser.