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

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../adgen/adgen.conf
  5. # Copyright (C) 2007 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. # Prevent executing normal make and install build steps.
  15. # This package has custom make and install.
  16. makeopt=''
  17. makeinstopt=''
  18. pkgprefix -t python
  19. adgen_postmake () {
  20. BINDIR="$root$bindir"
  21. LIBDIR="$root$libdir/ADGen"
  22. # creating directory layout
  23. mkdir -pv $BINDIR $LIBDIR
  24. # Make sure the adgen script know where the libraries will
  25. # be installed.
  26. sed -i "s,\$LIBDIR,$LIBDIR," ADGen.py
  27. # Make it executable
  28. chmod 755 ADGen.py
  29. mv ADGen.py adgen
  30. # Create the script to pre compile .py files
  31. cat <<-EOT > compile.py
  32. #!/usr/bin/env python
  33. import sys
  34. import py_compile
  35. for lib in sys.argv:
  36. try:
  37. py_compile.compile(lib)
  38. except PyCompileError:
  39. print "Error Compiling: " + lib
  40. sys.exit()
  41. EOT
  42. # Have the libraries compiled.
  43. $(pkgprefix bindir python)/python compile.py *.py
  44. rm -f compile.*
  45. # Install the whole bunch
  46. cp -av adgen $BINDIR/adgen
  47. cp -av *.py $LIBDIR
  48. cp -av *.pyc $LIBDIR
  49. }
  50. hook_add postmake 5 adgen_postmake