forked from gisquick/gisquick-qgis-plugin-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (43 loc) · 1.88 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#/***************************************************************************
# Gisquick plugin
# Publish your projects into Gisquick application
# ***************************************************************************/
# WARNING: Every line in Makefile recipe must begin with a tab character. Don't
# try to convert them spaces !
QGISDIR = .qgis2
GISQUICK_BUILDDIR = build
PLUGINNAME = gisquick
PY_FILES = webgisplugin.py wizard.py project.py topics.py confirmation.py publish.py utils.py __init__.py
EXTRAS = icon.png metadata.txt
UI_FILES = publish_dialog.ui
RESOURCE_FILES = resources_rc.py
ZIPNAME = gisquick-qgis
VERSION := $(shell grep version metadata.txt | awk -F "=" '{print $$2}')
default: compile
compile: $(RESOURCE_FILES)
%_rc.py : %.qrc
pyrcc4 -o $*_rc.py $<
# The deploy target only works on unix like operating system where the Python
# plugin directory is located at "$HOME/$(QGISDIR)/python/plugins"
deploy: compile
mkdir -p $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vf $(PY_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vf $(UI_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vf $(RESOURCE_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
cp -vf $(EXTRAS) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
# The derase deletes deployed plugin
derase:
rm -Rf $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)
# The zip target creates a zip file with the deployed content.
zip:
rm -f $(ZIPNAME)*.zip
rm -Rf $(GISQUICK_BUILDDIR)
mkdir -p $(GISQUICK_BUILDDIR)/$(PLUGINNAME)
cp -vf $(PY_FILES) $(GISQUICK_BUILDDIR)/$(PLUGINNAME)
cp -vf $(UI_FILES) $(GISQUICK_BUILDDIR)/$(PLUGINNAME)
cp -vf $(RESOURCE_FILES) $(GISQUICK_BUILDDIR)/$(PLUGINNAME)
cp -vf $(EXTRAS) $(GISQUICK_BUILDDIR)/$(PLUGINNAME)
cd $(GISQUICK_BUILDDIR); zip -9r $(CURDIR)/$(ZIPNAME)-$(VERSION).zip $(PLUGINNAME)
rm -Rf $(GISQUICK_BUILDDIR)
clean:
rm $(RESOURCE_FILES)