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.

63 lines
1.6 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../execwrap/execwrap.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. if [ $prefix_auto -eq 1 ]; then
  15. # if lighttpd is installed, we take it's prefix
  16. if pkginstalled lighttpd; then
  17. pkgprefix -t lighttpd
  18. prefix=$( pkgprefix lighttpd )
  19. set_confopt
  20. fi
  21. fi
  22. # the tarball doesn't include a folder, so fake one
  23. custextract=execwrap_extract
  24. execwrap_extract() {
  25. mkdir -p 'execwrap'
  26. taropt="-C execwrap $taropt"
  27. autoextract_tar_bz2 "$@"
  28. }
  29. PARENT_UID=80
  30. TARGET_MIN_UID=500
  31. TARGET_MIN_GID=100
  32. TARGET_PATH_PREFIX=$bindir
  33. # no configure
  34. hook_add premake 5 'execwrap_config'
  35. execwrap_config() {
  36. sed -i -e "s,@@PARENT_UID@@,$PARENT_UID," \
  37. -e "s,@@TARGET_MIN_UID@@,$TARGET_MIN_UID," \
  38. -e "s,@@TARGET_MIN_GID@@,$TARGET_MIN_GID," \
  39. -e "s,@@TARGET_PATH_PREFIX@@,$TARGET_PATH_PREFIX," \
  40. execwrap_config.h
  41. cat execwrap_config.h
  42. }
  43. # no Makefile
  44. makeopt=
  45. hook_add inmake 5 '$CC -o execwrap execwrap.c && $STRIP execwrap'
  46. makeinstopt=
  47. hook_add postmake 5 'execwrap_install'
  48. execwrap_install() {
  49. # binary
  50. chown 0:80 execwrap
  51. chmod og-w,+rx,u+s execwrap
  52. cp -vaf execwrap $root$bindir/
  53. # README
  54. cp -vf README $root$docdir/
  55. }