Makefile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(TOPDIR)/rules.mk
  4. include $(TOPDIR)/mk/rootfs.mk
  5. PKG_NAME:= base-files
  6. PKG_VERSION:= 1.0
  7. PKG_RELEASE:= 9
  8. PKG_DESCR:= basic filesystem structure and scripts
  9. PKG_SECTION:= base
  10. WRKDIST= ${WRKDIR}/base-files
  11. NO_DISTFILES:= 1
  12. include $(TOPDIR)/mk/package.mk
  13. $(eval $(call PKG_template,BASE_FILES,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  14. PKGDFLT_BASE_FILES= y if !ADK_TOOLCHAIN_ONLY
  15. BUILD_STYLE:= manual
  16. INSTALL_STYLE:= manual
  17. do-install:
  18. $(CP) ./extra/* $(IDIR_BASE_FILES)
  19. $(CP) $(TOPDIR)/target/$(ADK_TARGET)/files/* $(IDIR_BASE_FILES)
  20. $(SED) 's,@TARGET@,$(ADK_TARGET),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
  21. $(SED) 's,@VERSION@,$(ADK_VERSION),g' $(IDIR_BASE_FILES)/etc/ipkg.conf
  22. echo /bin/sh >${IDIR_BASE_FILES}/etc/shells
  23. echo /bin/ash >>${IDIR_BASE_FILES}/etc/shells
  24. ifneq (${ADK_PACKAGE_BASH},)
  25. echo /bin/bash >>${IDIR_BASE_FILES}/etc/shells
  26. endif
  27. ifneq (${ADK_PACKAGE_MKSH},)
  28. echo /bin/mksh >>${IDIR_BASE_FILES}/etc/shells
  29. endif
  30. ifneq (${ADK_PACKAGE_ZSH},)
  31. echo /bin/zsh >>${IDIR_BASE_FILES}/etc/shells
  32. endif
  33. mkdir -p $(IDIR_BASE_FILES)/dev
  34. mkdir -p $(IDIR_BASE_FILES)/boot
  35. mkdir -p $(IDIR_BASE_FILES)/root
  36. mkdir -p $(IDIR_BASE_FILES)/sys
  37. mkdir -p $(IDIR_BASE_FILES)/etc/crontabs
  38. mkdir -p $(IDIR_BASE_FILES)/etc/network/if-pre-up.d
  39. mkdir -p $(IDIR_BASE_FILES)/etc/network/if-up.d
  40. mkdir -p $(IDIR_BASE_FILES)/etc/network/if-down.d
  41. mkdir -p $(IDIR_BASE_FILES)/etc/network/if-post-down.d
  42. mkdir -p $(IDIR_BASE_FILES)/mnt
  43. mkdir -p $(IDIR_BASE_FILES)/proc
  44. mkdir -p $(IDIR_BASE_FILES)/tmp
  45. mkdir -p $(IDIR_BASE_FILES)/usr/lib
  46. mkdir -p $(IDIR_BASE_FILES)/usr/bin
  47. chmod 755 $(IDIR_BASE_FILES)/lib/mdev/init
  48. chmod 600 $(IDIR_BASE_FILES)/etc/shadow
  49. ln -sf ../tmp/resolv.conf $(IDIR_BASE_FILES)/etc/resolv.conf
  50. ln -sf ../proc/mounts $(IDIR_BASE_FILES)/etc/mtab
  51. rm -rf $(IDIR_BASE_FILES)/var
  52. ln -sf tmp $(IDIR_BASE_FILES)/var
  53. ifneq (${ADK_PACKAGE_CONFIG_IN_ETC},)
  54. gzip -9c ${TOPDIR}/.config >$(IDIR_BASE_FILES)/etc/adkconfig.gz
  55. endif
  56. include ${TOPDIR}/mk/pkg-bottom.mk