Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add io.github.arso-project.archipel #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions io.github.arso-project.archipel/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
squashfs-root
binaries
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个其实不用忽略啊 根本不会有这个文件的吧?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build之后会有binaries文件啊?
2023-07-04_11-46

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不是很确定是哪里来的(
那你留着吧

.linglong-target
Archipel
@archipelelectron.desktop
archipel-0.1.0.AppImage
54 changes: 54 additions & 0 deletions io.github.arso-project.archipel/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.PHONY: all
all: desktop binary

BINNAME ?= Archipel
APP_PREFIX ?= archipel
.PHONY: binary
binary: $(BINNAME)
$(BINNAME):
echo "#!/usr/bin/env bash" > $(BINNAME)
echo "cd /$(PREFIX)/lib/$(APP_PREFIX) && ./AppRun $$@" >> $(BINNAME)

DESKTOP_FILE ?= @archipelelectron.desktop
.PHONY: desktop
desktop: extract $(DESKTOP_FILE)
$(DESKTOP_FILE): squashfs-root/$(DESKTOP_FILE)
cp squashfs-root/$(DESKTOP_FILE) .
sed -i \
"s/Exec=.*/Exec=\/$(subst /,\/,$(PREFIX))\/bin\/$(BINNAME)/" \
$(DESKTOP_FILE)

APPIMAGE ?= archipel-0.1.0.AppImage
.PHONY: extract
extract: squashfs-root
squashfs-root: $(APPIMAGE)
chmod +x $(APPIMAGE)
./$(APPIMAGE) --appimage-extract

APPIMAGE_URL ?= https://github.com/arso-project/archipel/releases/download/v0.1.0/archipel-0.1.0.AppImage
$(APPIMAGE):
wget $(APPIMAGE_URL) -O $(APPIMAGE)

PREFIX ?= opt/apps/$(APP_PREFIX)
DESTDIR ?=
.PHONY: install
install: binary desktop
( \
cd squashfs-root && \
find -type f -exec \
install -D "{}" "$(DESTDIR)/$(PREFIX)/lib/$(APP_PREFIX)/{}" \; && \
find -type l -exec bash -c " \
ln -s \$$(readlink {}) \
\"$(DESTDIR)/$(PREFIX)/lib/$(APP_PREFIX)/{}\" \
" \; \
)
install -D $(BINNAME) \
$(DESTDIR)/$(PREFIX)/bin/$(BINNAME)
install -D $(DESKTOP_FILE) \
$(DESTDIR)/$(PREFIX)/share/applications/$(DESKTOP_FILE)

.PHONY: clean
clean:
rm -r squashfs-root || true
rm $(DESKTOP_FILE) || true
rm $(BINNAME) || true
22 changes: 22 additions & 0 deletions io.github.arso-project.archipel/linglong.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package:
id: io.github.arso-project.archipel
name: archipel
version: 0.1.0
kind: app
description: |
archipel is a decentralized archiving and media library system.

runtime:
id: org.deepin.Runtime
version: 23.0.0

source:
kind: local

build:
kind: manual
manual:
build: |
make
install: |
make install