Skip to content

Commit

Permalink
add packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
gabm committed Nov 7, 2023
1 parent a3f0797 commit 30f7e8d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ ifeq ($(PREFIX),)
endif

build:
cargo build

build-release:
cargo build --release
strip target/release/satty

clean:
cargo clean

install: build
install: build-release
install -Dm755 target/release/satty -t ${PREFIX}/bin/
install -Dm644 satty.desktop ${PREFIX}/share/applications/satty.desktop
install -Dm644 assets/satty.svg ${PREFIX}/share/icons/hicolor/scalable/apps/satty.svg
Expand All @@ -27,3 +31,18 @@ uninstall:

rm ${PREFIX}/share/licenses/satty/LICENSE
rmdir -p ${PREFIX}/share/licenses/satty || true


package: clean build-release
$(eval TMP := $(shell mktemp -d))
echo "Temporary folder ${TMP}"

# install to tmp
PREFIX=${TMP} make install

# create package
$(eval LATEST_TAG := $(shell git describe --tags --abbrev=0))
tar -czvf satty-${LATEST_TAG}-x86_64.tar.gz -C ${TMP} .

# clean up
rm -rf $(TMP)

0 comments on commit 30f7e8d

Please sign in to comment.