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.

70 lines
2.1 KiB

  1. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # T2 SDE: package/.../sancp/sancp.conf
  5. # Copyright (C) 2004 - 2006 The T2 SDE 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. # --- T2-COPYRIGHT-NOTE-END ---
  14. if [ "$prefix_auto" == 1 ]; then
  15. prefix=opt/sancp
  16. set_confopt
  17. fi
  18. makeinstopt=""
  19. pkg_sancp_prelude_prepatch() {
  20. # creating a temporary directory
  21. tempdir=`mktemp -d`
  22. # getting the full path of the original patch
  23. orig_sancp_prelude_patch="`match_source_file -p prelude`"
  24. # name of the patch we will include
  25. sancp_prelude_patch="sancp-$ver-prelude-3.patch"
  26. # removing "/root/" from the path of the effected files in the original patch
  27. # and creating the sanitized patch in tempdir
  28. sed -e "s/^\(\+\+\+\ \)\/root\//\1/g" $orig_sancp_prelude_patch > $tempdir/$sancp_prelude_patch
  29. # including the sanitized patch
  30. echo_status "Enabling Prelude-IDS Support by including ($sancp_prelude_patch)"
  31. var_append patchfiles ' ' "$tempdir/$sancp_prelude_patch"
  32. }
  33. pkg_sancp_premake() {
  34. # adjusting default config file location
  35. sed -i "/CONFIG_DIR/s,/.*,$sysconfdir\"," sancp.h
  36. }
  37. pkg_sancp_install() {
  38. # copying sancp binary
  39. mkdir -p $root/$prefix/bin
  40. cp -v sancp $root/$prefix/bin/sancp
  41. # copying default config file
  42. mkdir -p $root/$sysconfdir
  43. cp -v etc/sancp/sancp.conf $root/$sysconfdir/
  44. # creating log directory
  45. mkdir -p $root/$localstatedir/log
  46. }
  47. hook_add premake 5 'pkg_sancp_premake'
  48. hook_add postmake 5 'pkg_sancp_install'
  49. # including the officially released sancp patches from our package
  50. var_append patchfiles ' ' "`match_source_file -p patch | tr '\n' ' '`"
  51. # if libprelude is available patch sancp to become a prelude sensor
  52. if pkginstalled libprelude ; then
  53. hook_add prepatch 5 'pkg_sancp_prelude_prepatch'
  54. fi