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.

56 lines
1.4 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../sam/sam.conf
  5. # Copyright (C) 2006 The OpenSDE Project
  6. # Copyright (C) 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. srctar=none
  16. autoextract=0
  17. makeopt=
  18. makeinstopt=
  19. datadir=$datadir/sam
  20. hook_add postmake 5 'sam_install'
  21. sam_install() {
  22. cat <<-EOT > $root$bindir/sam
  23. #!/bin/sh
  24. exec lua $datadir/sam.lua "\$@"
  25. EOT
  26. chmod +x $root$bindir/sam
  27. # install modules
  28. cp -vf $confdir/*.lua $root$datadir/
  29. # install sam extensions
  30. pkgdatadir=$root$( lua-config --pkgdatadir )/sam
  31. pkglibdir=$root$( lua-config --pkglibdir )/sam
  32. mkdir -p $pkgdatadir
  33. mkdir -p $pkglibdir
  34. # scripts
  35. cp -vf $confdir/sam/*.lua $pkgdatadir/
  36. # libraries
  37. for src in $confdir/sam/*.c; do
  38. [ -f $src ] || continue
  39. base=${src%.c} ; base=${base##*/}
  40. $CC -O2 $CFLAGS -fpic -fPIC -c -o $pkglibdir/$base.o $src
  41. $LD $LDFLAGS -shared -E -o $pkglibdir/$base.so $pkglibdir/$base.o
  42. rm -f $pkglibdir/$src.so
  43. done
  44. }