l_template.orig 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # Template file for 'base-files'
  2. pkgname=base-files
  3. version=0.141
  4. revision=4
  5. bootstrap=yes
  6. depends="xbps-triggers"
  7. short_desc="Void Linux base system files"
  8. maintainer="Enno Boland <orphan@voidlinux.org>"
  9. license="Public Domain"
  10. homepage="https://www.voidlinux.org"
  11. conf_files="
  12. /etc/inputrc
  13. /etc/profile
  14. /etc/hosts
  15. /etc/host.conf
  16. /etc/securetty
  17. /etc/skel/.bash_profile
  18. /etc/skel/.bash_logout
  19. /etc/skel/.bashrc
  20. /etc/skel/.inputrc
  21. /etc/subuid
  22. /etc/subgid
  23. /etc/issue
  24. /etc/passwd
  25. /etc/group
  26. /etc/fstab
  27. /etc/crypttab
  28. /etc/nsswitch.conf"
  29. replaces="base-directories>=0"
  30. # New system groups
  31. system_groups="kvm:24"
  32. do_install() {
  33. # Create bin and lib dirs and symlinks.
  34. for d in bin lib; do
  35. vmkdir "usr/${d}"
  36. ln -snrf "${DESTDIR}/usr/${d}" "${DESTDIR}/${d}"
  37. done
  38. # Symlink sbin paths to /usr/bin.
  39. for d in sbin usr/sbin; do
  40. ln -snrf "${DESTDIR}/usr/bin" "${DESTDIR}/${d}"
  41. done
  42. # Symlink word-specific lib paths to /usr/lib.
  43. for d in lib usr/lib; do
  44. ln -snrf "${DESTDIR}/usr/lib" \
  45. "${DESTDIR}/${d}${XBPS_TARGET_WORDSIZE}"
  46. done
  47. # Populate 32-bit lib files on 64-bit systems, for multilib.
  48. if [ "${XBPS_TARGET_WORDSIZE}" = "64" ]; then
  49. vmkdir usr/lib32
  50. ln -snrf "${DESTDIR}/usr/lib32" "${DESTDIR}/lib32"
  51. ln -sf ../lib/locale "${DESTDIR}/usr/lib32/locale"
  52. vinstall "${FILESDIR}/ld.so.lib32.conf" 644 etc/ld.so.conf.d lib32.conf
  53. fi
  54. # Install misc config files.
  55. for f in bash_logout bash_profile bashrc inputrc; do
  56. vinstall ${FILESDIR}/dot_${f} 644 etc/skel .${f}
  57. done
  58. vinstall ${FILESDIR}/securetty 600 etc
  59. for f in profile hosts host.conf issue subuid subgid \
  60. inputrc fstab passwd group crypttab nsswitch.conf; do
  61. vinstall ${FILESDIR}/${f} 644 etc
  62. done
  63. vmkdir etc/colors
  64. vmkdir etc/profile.d
  65. vmkdir etc/xbps.d
  66. install -m644 ${FILESDIR}/*.sh ${DESTDIR}/etc/profile.d
  67. install -m644 ${FILESDIR}/DIR_COLORS* ${DESTDIR}/etc/colors
  68. install -m644 ${FILESDIR}/40-ymir-repo-libre.conf ${DESTDIR}/etc/xbps.d
  69. # modprobe(8) files
  70. vinstall ${FILESDIR}/usb-load-ehci-first 644 usr/lib/modprobe.d usb-load-ehci-first.conf
  71. vinstall ${FILESDIR}/blacklist.conf 644 usr/lib/modprobe.d
  72. # sysctl(8) files
  73. vinstall ${FILESDIR}/sysctl.conf 644 usr/lib/sysctl.d 10-void.conf
  74. # Install common licenses, from Debian.
  75. vmkdir usr/share/licenses
  76. install -m644 ${FILESDIR}/licenses/* ${DESTDIR}/usr/share/licenses
  77. # vkpurge
  78. vbin ${FILESDIR}/vkpurge
  79. vman ${FILESDIR}/vkpurge.8
  80. vbin ${FILESDIR}/lsb_release
  81. # Install default dracut configuration.
  82. vinstall ${FILESDIR}/dracut.conf.d.voidlinux.conf 644 \
  83. usr/lib/dracut/dracut.conf.d 00-void.conf
  84. # Create /proc/self/mounts -> /etc/mtab symlink.
  85. ln -sf /proc/self/mounts ${DESTDIR}/etc/mtab
  86. # udev rules
  87. vmkdir usr/lib/udev/rules.d
  88. install -m644 ${FILESDIR}/*.rules ${DESTDIR}/usr/lib/udev/rules.d
  89. }