summaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-12-06 19:53:13 -0500
committermidipix <writeonce@midipix.org>2018-12-06 21:34:00 -0500
commit1ff94f00148d255b95c5dff0175f6ac186f56f89 (patch)
tree10515cce0680737a1d7f156ceec420369f571999 /project
parente98fff55cf94c3355a4a9fe1804bb6b2f16c82c2 (diff)
downloadsbpython2-1ff94f00148d255b95c5dff0175f6ac186f56f89.tar.bz2
sbpython2-1ff94f00148d255b95c5dff0175f6ac186f56f89.tar.xz
project: added the bits for python's custom install steps.
Diffstat (limited to 'project')
-rw-r--r--project/extras.mk3
-rw-r--r--project/pyinst.mk49
2 files changed, 52 insertions, 0 deletions
diff --git a/project/extras.mk b/project/extras.mk
index d11402d..99fa4f6 100644
--- a/project/extras.mk
+++ b/project/extras.mk
@@ -108,3 +108,6 @@ include $(PROJECT_DIR)/project/pycgen.mk
# pytools (python's {prefix}/bin script-based tools)
include $(PROJECT_DIR)/project/pytools.mk
+
+# pyinst (python's custom install bits)
+include $(PROJECT_DIR)/project/pyinst.mk
diff --git a/project/pyinst.mk b/project/pyinst.mk
new file mode 100644
index 0000000..bf50414
--- /dev/null
+++ b/project/pyinst.mk
@@ -0,0 +1,49 @@
+# install-symlink
+PYTHON_APP_VER = $(NICKNAME)$(OS_APP_SUFFIX)
+PYTHON_APP_MAJOR = $(NICKNAME:$(PYTHON_VER)=$(PYTHON_MAJOR))$(OS_APP_SUFFIX)
+
+PYTHON_MAN_VER = $(NICKNAME).1
+PYTHON_MAN_MAJOR = $(NICKNAME:$(PYTHON_VER)=$(PYTHON_MAJOR)).1
+
+PYTHON_APP_EXTDIR = $(DESTDIR)/$(LIBDIR)/$(PACKAGE)/lib-dynload
+PYTHON_APP_MANDIR = $(DESTDIR)/$(MANDIR)/man1
+
+install-man:
+ mkdir -p $(PYTHON_APP_MANDIR)
+ cp -p $(SOURCE_DIR)/Misc/python.man $(PYTHON_APP_MANDIR)/$(PYTHON_MAN_VER)
+ ln -s $(PYTHON_MAN_VER) $(PYTHON_APP_MANDIR)/$(PYTHON_MAN_MAJOR).tmp
+ mv $(PYTHON_APP_MANDIR)/$(PYTHON_MAN_MAJOR).tmp $(PYTHON_APP_MANDIR)/$(PYTHON_MAN_MAJOR)
+
+
+# install-app-libdir
+install-app-extdir:
+ mkdir -p $(PYTHON_APP_EXTDIR)
+
+install-app-symlink:
+ mkdir -p $(DESTDIR)/$(BINDIR)
+ ln -s $(PYTHON_APP_VER) $(DESTDIR)/$(BINDIR)/$(PYTHON_APP_MAJOR).tmp
+ mv $(DESTDIR)/$(BINDIR)/$(PYTHON_APP_MAJOR).tmp $(DESTDIR)/$(BINDIR)/$(PYTHON_APP_MAJOR)
+
+# install-pyext
+install-pyext: $(PYEXT_SHARED)
+ mkdir -p $(PYTHON_APP_EXTDIR)
+ cp -a $(PYEXT_SHARED) $(PYTHON_APP_EXTDIR)
+
+# install-pyhdr
+install-pyhdr: config.tag
+ mkdir -p $(DESTDIR)/$(INCLUDEDIR)/$(PACKAGE)
+ cp -p $(API_HEADERS) $(DESTDIR)/$(INCLUDEDIR)/$(PACKAGE)
+
+install-shared: install-pyext
+install-shared: install-pyhdr
+
+install-app: install-man
+install-app: install-app-extdir
+install-app: install-app-symlink
+install-app: pydist-install-py
+install-app: pydist-install-pyc
+
+.PHONE: install-app-symlink
+.PHONE: install-man
+.PHONE: install-pyext
+.PHONE: install-pyhdr