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.

67 lines
2.0 KiB

  1. #!/bin/sh
  2. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # T2 SDE: package/.../djbdns/djbdns.conf
  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. # --- T2-COPYRIGHT-NOTE-END ---
  15. if [ "$prefix_auto" == 1 ]; then
  16. prefix=opt/djbdns
  17. set_confopt
  18. fi
  19. makeopt="$makeopt prog"
  20. makeinstopt=""
  21. pkg_djbdns_config() {
  22. echo $CC > conf-cc
  23. echo $CC > conf-ld
  24. echo /$prefix > conf-home
  25. echo -e "#include \"auto_home.h\"
  26. const char auto_home[]=\"/$prefix\";" > auto_home.c
  27. }
  28. pkg_djbdns_install() {
  29. while read dir file ; do
  30. mkdir -p $root/$prefix/$dir
  31. cp $file $root/$prefix/$dir/$file
  32. done < <( grep "c(.*man\|c(.*bin" hier.c | cut -d \" --output-delimiter ' ' -f 2,4 )
  33. }
  34. hook_add premake 5 'pkg_djbdns_config'
  35. hook_add postmake 4 'pkg_djbdns_install'
  36. hook_add postmake 5 'pkg_djbdns_installman'
  37. pkg_djbdns_installman() {
  38. local x= saved_pwd=$PWD
  39. cd $builddir
  40. tar -v $taropt `match_source_file -p djbdns.*man`
  41. cd djbdns-man
  42. for x in 1 5 8; do
  43. gzip *.$x
  44. mkdir -p $root/$mandir/man$x/
  45. cp -v *.$x.gz $root/$mandir/man$x/
  46. done
  47. cd $saved_pwd
  48. }
  49. [ "$SDECFG_PKG_DJBDNS_SIGHUP" = "1" ] && \
  50. var_append patchfiles ' ' "`match_source_file -p tinydns_sighup`"
  51. [ "$SDECFG_PKG_DJBDNS_MULTIDATA" = "1" ] && \
  52. var_append patchfiles ' ' "`match_source_file -p multi_data`"
  53. if [ "$SDECFG_PKG_DJBDNS_DUMPCACHE" = "1" ]; then
  54. [ "$SDECFG_PKG_DJBDNS_SIGHUP" = "1" ] &&
  55. var_append patchfiles ' ' "`match_source_file -p dumpcache_over_sighup-v4`" ||
  56. var_append patchfiles ' ' "`match_source_file -p dumpcache-v4`"
  57. fi
  58. [ "$SDECFG_PKG_DJBDNS_FWDZONE" = "1" ] && \
  59. var_append patchfiles ' ' "`match_source_file -p fwdzone`"