OpenSDE Packages Database (without history before r20070)
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.

61 lines
1.6 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../fhs/fhs.conf
  5. # Copyright (C) 2006 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; version 2 of the License. A copy of the
  12. # GNU General Public License can be found in the file COPYING.
  13. # --- SDE-COPYRIGHT-NOTE-END ---
  14. srctar=none
  15. createprefix=0
  16. createdocs=0
  17. check_usrlocal=0
  18. makeopt=
  19. makeinstopt=
  20. fhs_create_helper() {
  21. while read cmd name attribute; do
  22. if [ -e "$sysroot/$name" ]; then
  23. echo "Skipping: $name"
  24. # continue
  25. elif [ "$cmd" == "m" ]; then
  26. echo "Creating: $name"
  27. mkdir "$sysroot/$name"
  28. [ -z "$attribute" ] ||
  29. chmod "$attribute" "$sysroot/$name"
  30. elif [ "$cmd" == "l" -a -n "$attribute" ]; then
  31. echo "Symlinking: $name -> $attribute"
  32. ln -s "$attribute" "$sysroot/$name"
  33. else
  34. echo_error "Syntax Error: $cmd $name $attribute"
  35. false
  36. fi
  37. add_flist "$sysroot/$name"
  38. done
  39. }
  40. fhsfiles="$( ls $confdir/fhs-*.{txt,sh} 2> /dev/null | sort )"
  41. fhs_create() {
  42. local file=
  43. for file in $fhsfiles; do
  44. case "$file" in
  45. *.sh) echo "loading $file..." 1>&2
  46. sh $file ;;
  47. *.txt) echo "loading $file..." 1>&2
  48. sed -e '/^[ \t]*$/d;' -e '/^#/d;' $file ;;
  49. esac | fhs_create_helper
  50. done
  51. }
  52. hook_add postmake 5 fhs_create
  53. hook_add postdoc 7 "mkdir -p $root$docdir/; cp -vf $( match_source_file -p fhs ) $root$docdir/"