Mnemosyne is a abstract distribution originally designed for ROCKLinux, but currently only support the trunk of OpenSDE.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.6 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: target/mnemosyne/parse-config
  5. # Copyright (C) 2006 - 2007 The OpenSDE Project
  6. # Copyright (C) 2002 - 2006 Alejandro Mery
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- SDE-COPYRIGHT-NOTE-END ---
  15. mnemosynedir=$base/target/$SDECFG_TRG_MNEMOSYNE
  16. # tweak config
  17. [ ! -f $mnemosynedir/pkg_conf/$pkg.conf ] || . $mnemosynedir/pkg_conf/$pkg.conf
  18. # append patches
  19. [ ! -f $mnemosynedir/pkg_patch/$pkg.patch ] || var_append patchfiles ' ' $mnemosynedir/pkg_patch/$pkg.patch
  20. unset mnemosynedir
  21. # postinstall extra hackery
  22. hook_add postinstall 5 'mnemosyne_postinstall'
  23. mnemosyne_postinstall() {
  24. local x=
  25. case "$pkg" in
  26. socklog)
  27. # socklog services active by default
  28. for x in klog syslog; do
  29. ln -svnf $sysconfdir/$x $root/service/$x
  30. done
  31. ;;
  32. bcron)
  33. # bcron services active by default
  34. for x in bcron-scheduler bcron-spooler bcron-updater; do
  35. ln -svnf $sysconfdir/$x $root/service/$x
  36. done
  37. ;;
  38. alsa-utils)
  39. # alsa configuration save/restore
  40. ln -svnf /sbin/init.d/alsa "$root/etc/runit/1.d/20alsa"
  41. ln -svnf /sbin/init.d/alsa "$root/etc/runit/3.d/80alsa"
  42. ;;
  43. kbd)
  44. # keyboard mappings
  45. ln -svnf /sbin/init.d/kbd "$root/etc/runit/1.d/05kbd"
  46. ;;
  47. rocknet|etcnet)
  48. # network
  49. ln -svnf /sbin/init.d/network "$root/etc/runit/1.d/15network"
  50. ;;
  51. esac
  52. }
  53. if [ "$SDECFG_TRG_MNEMOSYNE_DEVELOPMENT" != 1 ]; then
  54. echo_status "No developent files will be flisted"
  55. mnemosyne_flist_no_devel() {
  56. sed -i -e '/\.\(c\|h\|hpp\|hxx\|a\|la\|m4\|pc\)$/d;' \
  57. $builddir/flist.txt
  58. case "$pkg" in
  59. gcc)
  60. sed -i -e '/^usr\/\(bin\|include\|libexec\|lib\/gcc\|share\)/d;' -e '/lib\/cpp/d;' $builddir/flist.txt
  61. ;;
  62. glibc)
  63. sed -i -e '/^usr\/include/d;' $builddir/flist.txt
  64. ;;
  65. esac
  66. }
  67. hook_add postflist 5 "mnemosyne_flist_no_devel"
  68. fi
  69. if [ "$SDECFG_TRG_MNEMOSYNE_DOC" == "minimal" ]; then
  70. echo_status "Just minimal documentation files will be flisted"
  71. mnemosyne_flist_just_minimal_docs() {
  72. sed -i -e '/\.\(html\|pdf\|ps\|tex\)$/d;' \
  73. -e '/\.\(gif\|jpg\|png\)$/d;' \
  74. -e "/.*\/share\/\(doc\|gtk-doc\).*\/html\/.*/d;" \
  75. $builddir/flist.txt
  76. }
  77. hook_add postflist 5 "mnemosyne_flist_just_minimal_docs"
  78. fi