This repository was archived by the owner on Feb 13, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (52 loc) · 1.85 KB
/
Makefile
File metadata and controls
62 lines (52 loc) · 1.85 KB
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
54
55
56
57
58
59
60
61
62
BASEDIR := $(shell git rev-parse --show-toplevel)
BUILDDIR := $(BASEDIR)/builddir
INSTALLDIR := /common/sw/containers/opt/appion/bin
VPATH = src $(BUILDDIR)
PYTHON_APPIMAGE := /opt/appimage/bin/python3.10.19-cp310-cp310-manylinux2014_x86_64.AppImage
APPIMAGETOOL := /opt/appimage/bin/appimagetool-x86_64.AppImage
CHMOD := /usr/bin/chmod
RM := /usr/bin/rm
CP := /usr/bin/cp
GIT := /usr/bin/git
APPION_REPO_URL := https://github.com/nysbc/appion.git
SINEDON_REPO_URL := https://github.com/nysbc/sinedon.git
$(BUILDDIR):
mkdir -p $@
appion.AppDir: | $(BUILDDIR)
cd $(BUILDDIR) ; \
$(PYTHON_APPIMAGE) --appimage-extract ; \
mv squashfs-root appion.AppDir
PYTHON_VENV := PATH=$(BUILDDIR)/appion.AppDir/opt/python3.10/bin:$$PATH PYTHONHOME=$(BUILDDIR)/appion.AppDir/opt/python3.10/ VIRTUAL_ENV=$(BUILDDIR)/appion.AppDir/opt/python3.10
appion.repo:
cd $(BUILDDIR) ; \
$(GIT) clone $(APPION_REPO_URL) appion.repo
sinedon.repo:
cd $(BUILDDIR) ; \
$(GIT) clone $(SINEDON_REPO_URL) sinedon.repo
appion: AppRun appion.AppDir appion.repo sinedon.repo
$(PYTHON_VENV) python3.10 -m pip install poetry ; \
cd $(BUILDDIR)/sinedon.repo ; \
$(PYTHON_VENV) poetry lock ; \
$(PYTHON_VENV) poetry install --no-root ; \
$(PYTHON_VENV) poetry build ; \
$(PYTHON_VENV) pip3.10 install dist/*.whl ; \
cd $(BUILDDIR)/appion.repo ; \
$(PYTHON_VENV) poetry lock ; \
$(PYTHON_VENV) poetry install --no-root ; \
$(PYTHON_VENV) poetry build ; \
$(PYTHON_VENV) pip3.10 install dist/*.whl ; \
$(CP) $(BUILDDIR)/appion.repo/bin/* $(BUILDDIR)/appion.AppDir/opt/python3.10/bin ; \
cd $(BUILDDIR) ; \
$(CP) $(BASEDIR)/src/AppRun appion.AppDir/AppRun ; \
$(APPIMAGETOOL) appion.AppDir appion ; \
$(CHMOD) +x appion
.PHONY: build
build: appion
.PHONY: install
install: build
$(CP) $(BUILDDIR)/appion $(INSTALLDIR)
.PHONY: clean
clean:
if [ -d $(BUILDDIR) ] ; then \
$(RM) -rf $(BUILDDIR);\
fi