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
2.1 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../clockspeed/clockspeed.conf
  5. # Copyright (C) 2008 - 2010 The OpenSDE Project
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  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. makeopt="$makeopt sntpclock taiclock taiclockd clockspeed clockadd clockview leapsecs.dat"
  16. clockspeed_config() {
  17. echo $CC > conf-cc
  18. echo $CC > conf-ld
  19. echo /$prefix > conf-home
  20. # clockspeed is x86 / solaris only ...
  21. [[ $arch = x86* ]] || sed -i 's/ clockspeed / /' Makefile
  22. }
  23. # the included install procedure is gather grave and not cross compile aware,
  24. # since it builds a custom install binary doing the work ...
  25. makeinstopt=
  26. clockspeed_install() {
  27. while read dir file ; do
  28. # only available on x86*
  29. [[ $arch != x86* ]] && [[ $file = clockspeed* ]] && continue
  30. mkdir -p $root/$prefix/$dir
  31. cp $file $root/$prefix/$dir/$file
  32. done < <( grep "$installfiles" hier.c | cut -d'"' --output-delimiter ' ' -f 2,4 )
  33. # install leapsecs.dat
  34. mkdir -p $root/var/state/clockspeed
  35. cp leapsecs.dat $root/var/state/clockspeed/
  36. # install clockctl
  37. rock_substitute "$confdir/clockctl.sh" > "$root$bindir/clockctl"
  38. chmod +x "$root$bindir/clockctl"
  39. cp "$confdir/etc_conf_clockspeed.txt" "$root/etc/conf/clockspeed"
  40. # and clockspeed-adjust
  41. install -m 755 "$confdir/clockspeed-adjust.sh" "$root$bindir/clockspeed-adjust"
  42. }
  43. hook_add premake 5 'clockspeed_config'
  44. hook_add postmake 5 "clockspeed_install"
  45. hook_add preconf 5 "cp -v $( match_source_file -p leapsecs ) leapsecs.dat"
  46. # by default install binaries only
  47. installfiles="c(.*bin"
  48. # only build and install man pages if groff package is available
  49. if pkginstalled groff; then
  50. var_append makeopt ' ' "man"
  51. var_append installfiles "\|" "c(.*man"
  52. fi