PYTHON=python PACKAGE = $(shell basename `pwd`) PYVER := $(shell $(PYTHON) -c 'import sys; print "%.3s" %(sys.version)') PYSYSDIR := $(shell $(PYTHON) -c 'import sys; print sys.prefix') PYLIBDIR = $(PYSYSDIR)/lib/python$(PYVER) SITEDIR = $(PYLIBDIR)/site-packages PKGDIR = $(SITEDIR)/$(PACKAGE) all: echo "Nothing to do" clean: rm -f *.pyc *.pyo *~ install: mkdir -p $(DESTDIR)/$(PKGDIR) #copy urpmgraph dir and set permissions for files and folders cp -rf . $(DESTDIR)/$(PKGDIR) #don't copy these files rm -f $(DESTDIR)/$(PKGDIR)/Makefile rm -f $(DESTDIR)/$(PKGDIR)/COPYING find $(DESTDIR)/$(PKGDIR) -type f |xargs -l chmod 644 $1 find $(DESTDIR)/$(PKGDIR) -type d |xargs -l chmod 775 $1 #compile python sources python -m compileall $(DESTDIR)/$(PKGDIR)