Skip to content

Commit

Permalink
Add makefile for publishing on Flathub.
Browse files Browse the repository at this point in the history
  • Loading branch information
luleyleo committed Sep 30, 2024
1 parent d0e8d69 commit 6aeb68c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
10 changes: 5 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ install: build
install -Dm0755 {{icon-svg-src}} {{icon-svg-dst}}
cp -r {{po-src}} {{po-dst}}

make-makefile:
echo "# This file was generated by 'just make-makefile'" > build-aux/Makefile
echo ".PHONY: all" >> build-aux/Makefile
echo "all:" >> build-aux/Makefile
just -n release={{release}} prefix=/app install 2>&1 | sed 's/^/\t/' | sed 's/\$/$$/g' >> build-aux/Makefile
make-makefile target='build-aux/Makefile':
echo "# This file was generated by 'just make-makefile'" > {{target}}
echo ".PHONY: install" >> {{target}}
echo "install:" >> {{target}}
just -n release={{release}} prefix=/app install 2>&1 | sed 's/^/\t/' | sed 's/\$/$$/g' >> {{target}}

make-cargo-sources:
python3 build-aux/flatpak-cargo-generator.py ./Cargo.lock -o build-aux/cargo-sources.json
Expand Down
11 changes: 11 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file was generated by 'just make-makefile'
.PHONY: install
install:
cat po/LINGUAS | while read lang; do mkdir -p assets/locale/$$lang/LC_MESSAGES; msgfmt -o assets/locale/$$lang/LC_MESSAGES/de.leopoldluley.Clapgrep.mo po/$$lang.po; done
cargo build --package clapgrep-gnome --release
mkdir -p /app/share/locale
install -Dm0755 target/release/clapgrep-gnome /app/bin/clapgrep
install -Dm0755 assets/de.leopoldluley.Clapgrep.desktop /app/share/applications/de.leopoldluley.Clapgrep.desktop
install -Dm0755 assets/de.leopoldluley.Clapgrep.metainfo.xml /app/share/metainfo/de.leopoldluley.Clapgrep.metainfo.xml
install -Dm0755 assets/icons/hicolor/scalable/apps/de.leopoldluley.Clapgrep.svg /app/share/icons/hicolor/scalable/apps/de.leopoldluley.Clapgrep.svg
cp -r assets/locale /app/share/locale

0 comments on commit 6aeb68c

Please sign in to comment.