--- /dev/null
+PACKAGE_NAME=glite-yaim-myproxy
+####################################################################
+# Distribution Makefile
+####################################################################
+
+.PHONY: configure install clean
+
+all: configure
+
+####################################################################
+# Prepare
+####################################################################
+
+prepare:
+ rm -f *~ functions/*~ scripts/*~ examples/*~
+ @mkdir -p $(prefix)/doc/html/web
+ @mkdir -p $(prefix)/doc/man
+
+####################################################################
+# Configure
+####################################################################
+
+configure:
+ @echo "No configuration required, use either 'make install' or 'make rpm'."
+
+####################################################################
+# Compile
+####################################################################
+
+compile:
+ @echo "No compiling required, use either 'make install' or 'make rpm'."
+
+####################################################################
+# Install
+####################################################################
+
+install:
+ @echo installing ...
+ @mkdir -p $(prefix)/yaim/functions
+ @mkdir -p $(prefix)/yaim/node-info.d
+ @install -m 0644 config/functions/* $(prefix)/yaim/functions
+ @install -m 0644 config/node-info.d/* $(prefix)/yaim/node-info.d
+
+####################################################################
+# Documentation
+####################################################################
+
+doc: man html
+
+man: prepare
+
+html: prepare
+
+web: html
+
+####################################################################
+# Install Doc
+####################################################################
+
+install-doc: doc
+ @echo installing docs...
+
+####################################################################
+# Build Distribution
+####################################################################
+
+dist: prepare
+ @tar --gzip --exclude='*CVS*' -cf build/$(PACKAGE_NAME).src.tgz config doc examples src
+
+rpm: dist
+ @rpmbuild -ta build/$(PACKAGE_NAME).src.tgz
+
+clean::
+ rm -f *~ test/*~ etc/*~ doc/*~ src/*~ $(PACKAGE_NAME).src.tgz
+ rm -rf build ${prefix}
+
--- /dev/null
+config_proxy_server (){
+
+INSTALL_ROOT=${INSTALL_ROOT:-/opt}
+
+requires GRID_TRUSTED_BROKERS
+
+if [ -f ${INSTALL_ROOT}/edg/etc/edg-myproxy.conf ]; then
+ rm -f ${INSTALL_ROOT}/edg/etc/edg-myproxy.conf
+fi
+
+split_quoted_variable $GRID_TRUSTED_BROKERS | while read x; do
+ echo "$x" >> ${INSTALL_ROOT}/edg/etc/edg-myproxy.conf
+done
+
+/sbin/chkconfig --add myproxy
+
+yaimlog DEBUG "Stopping MyProxy server"
+/etc/init.d/myproxy stop < /dev/null
+yaimlog DEBUG "Waiting 3 second for a complete stop"
+sleep 3
+yaimlog DEBUG "Starting MyProxy server"
+/etc/init.d/myproxy start < /dev/null
+
+}