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 filmulator #136

Open
wants to merge 1 commit 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.filmulator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
squashfs-root
.linglong-target
binaries
filmulator
filmulator-gui.desktop
Filmulator_v0.11.1.AppImage
54 changes: 54 additions & 0 deletions io.github.filmulator/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.PHONY: all
all: desktop binary

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

DESKTOP_FILE ?= filmulator-gui.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 ?= Filmulator_v0.11.1.AppImage
.PHONY: extract
extract: squashfs-root
squashfs-root: $(APPIMAGE)
chmod +x $(APPIMAGE)
./$(APPIMAGE) --appimage-extract

APPIMAGE_URL ?= https://github.com/CarVac/filmulator-gui/releases/download/v0.11.1/Filmulator_v0.11.1.AppImage
$(APPIMAGE):
wget $(APPIMAGE_URL) -O $(APPIMAGE)

PREFIX ?= opt/$(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.filmulator/linglong.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package:
id: io.github.filmulator
name: 'filmulator'
version: 0.11.1
kind: app
description: |
Filmulator accepts raw files from cameras and simulates the development of film as if exposed to the same light as the camera's sensor.

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

source:
kind: local

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