summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJF Ding <jian-feng.ding@intel.com>2011-08-10 11:47:24 +0800
committerJF Ding <jian-feng.ding@intel.com>2011-08-10 11:47:24 +0800
commit96cb8032081dd7facbd1ff053491f79473cdce20 (patch)
tree23a0d83032f100a122a8bdaf1d4aef6b8ed520d3
parent98657e38015bb1c3b3e04ba7a1e8c1bc72906c46 (diff)
downloadmic-96cb8032081dd7facbd1ff053491f79473cdce20.tar.gz
mic-96cb8032081dd7facbd1ff053491f79473cdce20.tar.bz2
mic-96cb8032081dd7facbd1ff053491f79473cdce20.zip
Update Makefile for plugins installation
-rw-r--r--Makefile22
-rwxr-xr-x[-rw-r--r--]tools/micng0
2 files changed, 16 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 23a4b5c..c4fa678 100644
--- a/Makefile
+++ b/Makefile
@@ -4,26 +4,36 @@ TAGVER = $(shell cat VERSION | sed -e "s/\([0-9\.]*\).*/\1/")
PKGNAME = micng
+PLUGIN_DIR = /usr/lib/micng/plugins
+
ifeq ($(VERSION), $(TAGVER))
TAG = $(TAGVER)
else
TAG = "HEAD"
endif
+ifndef PREFIX
+ PREFIX = "/usr/local"
+endif
all:
$(PYTHON) setup.py build
dist-bz2:
- git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(TAG) | \
- bzip2 > $(PKGNAME)-$(VERSION).tar.bz2
+ git archive --format=tar --prefix=$(PKGNAME)-$(TAGVER)/ $(TAG) | \
+ bzip2 > $(PKGNAME)-$(TAGVER).tar.bz2
dist-gz:
- git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(TAG) | \
- gzip > $(PKGNAME)-$(VERSION).tar.gz
+ git archive --format=tar --prefix=$(PKGNAME)-$(TAGVER)/ $(TAG) | \
+ gzip > $(PKGNAME)-$(TAGVER).tar.gz
+
+install-plugins:
+ install -d ${DESTDIR}/${PLUGIN_DIR}
+ install -D -m 644 plugins/imager/* ${DESTDIR}/${PLUGIN_DIR}/imager
+ install -D -m 644 plugins/backend/* ${DESTDIR}/${PLUGIN_DIR}/backend
-install: all
- $(PYTHON) setup.py install --root=${DESTDIR}
+install: all install-plugins
+ $(PYTHON) setup.py install --prefix=$(DESTDIR)/$(PREFIX)
develop: all
$(PYTHON) setup.py develop
diff --git a/tools/micng b/tools/micng
index 86e81c0..86e81c0 100644..100755
--- a/tools/micng
+++ b/tools/micng