3 include $(TOPDIR
)/rules.mk
7 PKG_BUILD_DIR
:=$(BUILD_DIR
)/base-files
9 REV
:=${shell svn
info | grep Revision | cut
-d
' ' -f
2}
14 include $(TOPDIR
)/package
/rules.mk
16 IDIR_BASE
:=$(PKG_BUILD_DIR
)/base-files
17 IPKG_BASE
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_RELEASE
)_
$(ARCH
).ipk
19 UCLIBC_VERSION
:=${shell cat
$(STAGING_DIR
)/uclibc_version
}
20 IDIR_UCLIBC
:=$(PKG_BUILD_DIR
)/uclibc
21 IPKG_UCLIBC
:=$(PACKAGE_DIR
)/uclibc_
$(UCLIBC_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
23 LIBGCC_VERSION
:=${shell cat
$(STAGING_DIR
)/gcc_version
}
24 IDIR_LIBGCC
:=$(PKG_BUILD_DIR
)/libgcc
25 IPKG_LIBGCC
:=$(PACKAGE_DIR
)/libgcc_
$(LIBGCC_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
27 PACKAGES
:=$(IPKG_BASE
) $(IPKG_UCLIBC
) $(IPKG_LIBGCC
)
29 $(PKG_BUILD_DIR
)/.prepared
:
30 mkdir
-p
$(PKG_BUILD_DIR
) $(PACKAGE_DIR
)
33 $(PKG_BUILD_DIR
)/.configured
:
36 $(PKG_BUILD_DIR
)/.built
:
40 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_BASE
) ipkg
/$(PKG_NAME
).control
$(PKG_RELEASE
) $(ARCH
)
41 cp
-a .
/default
/* $(IDIR_BASE
)
42 $(SED
) 's,$$R,r$(REV),g' $(IDIR_BASE
)/etc
/banner
43 mkdir
-p
$(IDIR_BASE
)/jffs
44 mkdir
-p
$(IDIR_BASE
)/dev
45 mkdir
-p
$(IDIR_BASE
)/proc
46 mkdir
-p
$(IDIR_BASE
)/tmp
47 mkdir
-p
$(IDIR_BASE
)/lib
48 mkdir
-p
$(IDIR_BASE
)/usr
/lib
49 mkdir
-p
$(IDIR_BASE
)/usr
/bin
50 ln
-sf
/tmp
/resolv.conf
$(IDIR_BASE
)/etc
/resolv.conf
51 rm -rf
$(IDIR_BASE
)/var
52 ln
-sf
/tmp
$(IDIR_BASE
)/var
53 -find
$(IDIR_BASE
) -type d
-name CVS | xargs
rm -rf
54 -find
$(IDIR_BASE
) -type d
-name .svn | xargs
rm -rf
55 -find
$(IDIR_BASE
) -name
'.#*' | xargs
rm -f
56 mkdir
-p
$(IDIR_BASE
)/etc
57 -grep \^BR2_SYSCONF
$(TOPDIR
)/.config
> $(IDIR_BASE
)/etc
/sysconf
58 $(IPKG_BUILD
) $(IDIR_BASE
) $(PACKAGE_DIR
)
61 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_UCLIBC
) ipkg
/uclibc.control
$(UCLIBC_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
62 mkdir
-p
$(IDIR_UCLIBC
)/lib
63 for file in ld-uClibc libc libcrypt libdl libm libnsl libresolv librt libuClibc libutil
; do \
64 cp
-fpR
$(STAGING_DIR
)/lib
/$$file.so.
* $(IDIR_UCLIBC
)/lib
/; \
65 cp
-fpR
$(STAGING_DIR
)/lib
/$$file-$(UCLIBC_VERSION
).so
$(IDIR_UCLIBC
)/lib
/; \
67 -$(STRIP
) $(IDIR_UCLIBC
)/lib
/*
68 $(IPKG_BUILD
) $(IDIR_UCLIBC
) $(PACKAGE_DIR
)
71 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_LIBGCC
) ipkg
/libgcc.control
$(LIBGCC_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
72 mkdir
-p
$(IDIR_LIBGCC
)/lib
73 cp
-fpR
$(STAGING_DIR
)/lib
/libgcc_s.so.
* $(IDIR_LIBGCC
)/lib
/
74 -$(STRIP
) $(IDIR_LIBGCC
)/lib
/*
75 $(IPKG_BUILD
) $(IDIR_LIBGCC
) $(PACKAGE_DIR
)
80 clean-targets
: package-clean
82 compile-targets
: $(PACKAGES
)
83 install-targets
: compile
84 mkdir
-p
$(TARGET_DIR
)
85 $(IPKG
) install $(PACKAGES
)