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.
62 lines
1.5 KiB
62 lines
1.5 KiB
18 years ago
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||
|
#
|
||
|
# Filename: package/.../adgen/adgen.conf
|
||
|
# Copyright (C) 2007 The OpenSDE Project
|
||
|
#
|
||
|
# More information can be found in the files COPYING and README.
|
||
|
#
|
||
|
# This program is free software; you can redistribute it and/or modify
|
||
|
# it under the terms of the GNU General Public License as published by
|
||
|
# the Free Software Foundation; version 2 of the License. A copy of the
|
||
|
# GNU General Public License can be found in the file COPYING.
|
||
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
||
|
|
||
|
# Prevent executing normal make and install build steps.
|
||
|
# This package has custom make and install.
|
||
|
makeopt=''
|
||
|
makeinstopt=''
|
||
|
|
||
|
pkgprefix -t python
|
||
|
|
||
|
adgen_postmake () {
|
||
|
BINDIR="$root$bindir"
|
||
|
LIBDIR="$root$libdir/ADGen"
|
||
|
|
||
|
# creating directory layout
|
||
|
mkdir -pv $BINDIR $LIBDIR
|
||
|
|
||
|
# Make sure the adgen script know where the libraries will
|
||
|
# be installed.
|
||
|
sed -i "s,\$LIBDIR,$LIBDIR," ADGen.py
|
||
|
|
||
|
# Make it executable
|
||
|
chmod 755 ADGen.py
|
||
|
mv ADGen.py adgen
|
||
|
|
||
|
# Create the script to pre compile .py files
|
||
|
cat <<-EOT > compile.py
|
||
|
#!/usr/bin/env python
|
||
|
import sys
|
||
|
import py_compile
|
||
|
|
||
|
for lib in sys.argv:
|
||
|
try:
|
||
|
py_compile.compile(lib)
|
||
|
except PyCompileError:
|
||
|
print "Error Compiling: " + lib
|
||
|
sys.exit()
|
||
|
EOT
|
||
|
|
||
|
# Have the libraries compiled.
|
||
|
$(pkgprefix bindir python)/python compile.py *.py
|
||
|
rm -f compile.*
|
||
|
|
||
|
# Install the whole bunch
|
||
|
cp -av adgen $BINDIR/adgen
|
||
|
cp -av *.py $LIBDIR
|
||
|
cp -av *.pyc $LIBDIR
|
||
|
}
|
||
|
|
||
|
hook_add postmake 5 adgen_postmake
|