3 include $(TOPDIR
)/rules.mk
7 PKG_BUILD_DIR
:=$(BUILD_DIR
)/base-files
9 include $(TOPDIR
)/package
/rules.mk
11 IDIR_BASE
:=$(PKG_BUILD_DIR
)/base-files
12 IPKG_BASE
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_RELEASE
)_
$(ARCH
).ipk
14 IDIR_HOTPLUG
:=$(PKG_BUILD_DIR
)/hotplug
15 IPKG_HOTPLUG
:=$(PACKAGE_DIR
)/hotplug_
$(PKG_RELEASE
)_
$(ARCH
).ipk
17 LIBC_VERSION
:=${shell cat
$(STAGING_DIR
)/uclibc_version
}
18 IDIR_LIBC
:=$(PKG_BUILD_DIR
)/uclibc
19 IPKG_LIBC
:=$(PACKAGE_DIR
)/uclibc_
$(LIBC_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
21 GCC_VERSION
:=${shell cat
$(STAGING_DIR
)/gcc_version
}
22 IDIR_GCC
:=$(PKG_BUILD_DIR
)/libgcc
23 IPKG_GCC
:=$(PACKAGE_DIR
)/libgcc_
$(GCC_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
25 PACKAGES
:=$(IPKG_BASE
) $(IPKG_LIBC
) $(IPKG_GCC
) $(IPKG_HOTPLUG
)
27 $(PKG_BUILD_DIR
)/.prepared
:
28 mkdir
-p
$(PKG_BUILD_DIR
) $(PACKAGE_DIR
)
31 $(PKG_BUILD_DIR
)/.built
:
35 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_BASE
) ipkg
/$(PKG_NAME
).control
$(PKG_RELEASE
) $(ARCH
)
36 cp
-a .
/default
/* $(IDIR_BASE
)
37 mkdir
-p
$(IDIR_BASE
)/jffs
38 mkdir
-p
$(IDIR_BASE
)/dev
39 mkdir
-p
$(IDIR_BASE
)/proc
40 mkdir
-p
$(IDIR_BASE
)/tmp
41 mkdir
-p
$(IDIR_BASE
)/lib
42 mkdir
-p
$(IDIR_BASE
)/usr
/lib
43 mkdir
-p
$(IDIR_BASE
)/usr
/bin
44 ln
-sf
/tmp
/resolv.conf
$(IDIR_BASE
)/etc
/resolv.conf
45 rm -rf
$(IDIR_BASE
)/var
46 ln
-sf
/tmp
$(IDIR_BASE
)/var
47 -find
$(IDIR_BASE
) -type d
-name CVS | xargs
rm -rf
48 -find
$(IDIR_BASE
) -type d
-name .svn | xargs
rm -rf
49 -find
$(IDIR_BASE
) -name
'.#*' | xargs
rm -f
50 mkdir
-p
$(IDIR_BASE
)/etc
51 -grep \^BR2_SYSCONF
$(TOPDIR
)/.config
> $(IDIR_BASE
)/etc
/sysconf
52 $(IPKG_BUILD
) $(IDIR_BASE
) $(PACKAGE_DIR
)
55 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_LIBC
) ipkg
/uclibc.control
$(LIBC_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
56 mkdir
-p
$(IDIR_LIBC
)/lib
57 cp
$(STAGING_DIR
)/lib
/ld-uClibc
*.so.
* $(IDIR_LIBC
)/lib
/
58 for file in c crypt dl m nsl resolv rt uClibc util
; do \
59 cp
$(STAGING_DIR
)/lib
/lib
$$file*.so.
* $(IDIR_LIBC
)/lib
/; \
61 -$(STRIP
) $(IDIR_LIBC
)/lib
/*
62 $(IPKG_BUILD
) $(IDIR_LIBC
) $(PACKAGE_DIR
)
65 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_GCC
) ipkg
/libgcc.control
$(GCC_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
66 mkdir
-p
$(IDIR_GCC
)/lib
67 cp
-fpR
$(STAGING_DIR
)/lib
/libgcc
*.so.
* $(IDIR_GCC
)/lib
/
68 -$(STRIP
) $(IDIR_GCC
)/lib
/*
69 $(IPKG_BUILD
) $(IDIR_GCC
) $(PACKAGE_DIR
)
72 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_HOTPLUG
) ipkg
/hotplug.control
$(PKG_RELEASE
) $(ARCH
)
73 mkdir
-p
$(IDIR_HOTPLUG
)/sbin
74 install -m0755 files
/hotplug
$(IDIR_HOTPLUG
)/sbin
75 $(IPKG_BUILD
) $(IDIR_HOTPLUG
) $(PACKAGE_DIR
)
83 mkdir
-p
$(TARGET_DIR
)
84 $(IPKG
) install $(PACKAGES
)