From 34752c30460f0338325590cb8bc13aba68a01038 Mon Sep 17 00:00:00 2001 From: Jelmer van Arnhem Date: Thu, 7 Nov 2024 16:13:48 +0100 Subject: [PATCH] add release scripts + add docs for fedora repo --- README.md | 29 +++++++++++++++++++++-------- release_fpm.sh | 17 +++++++++++++++++ release_jfpm.sh | 5 +++++ 3 files changed, 43 insertions(+), 8 deletions(-) create mode 100755 release_fpm.sh create mode 100755 release_jfpm.sh diff --git a/README.md b/README.md index e706582..6ece26c 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,7 @@ carafe is a tiny management tool for wine ~~bottles~~ carafes. (carafe is both the name of the program and for a wine bottle created through this program) -## Simple usage, get going fast - -There are two examples provided here, -both of which assume you have the setup stored inside the `~/Downloads` folder. -It's recommended to read both examples before starting, -to get a good idea of the different ways to configure carafe. +## Installation To start carafe as `carafe`, you need to install it: @@ -32,6 +27,24 @@ The first option is used in this readme, because it's shorter. The `carafe.py` script is all you need to manage carafes, you can download and move it wherever you want. +### Fedora + +I host a custom DNF repository that you can use for carafe and some of my other programs. + +```bash +sudo dnf config-manager addrepo --from-repofile=https://jelmerro.nl/fedora/jelmerro.repo +sudo dnf install carafe +``` + +You still need Python 3 for this installation method, but not pip. + +## Examples + +There are two main examples provided here, +both of which assume you have the setup stored inside the `~/Downloads` folder. +It's recommended to read both examples before starting, +to get a good idea of the different ways to configure carafe. + ### Example for Steam installer The following commands will setup a new carafe with steam installed. @@ -586,6 +599,6 @@ which will automatically be deleted when all carafes are removed. ## License -carafe itself is made by [Jelmer van Arnhem](https://github.com/jelmerro) and is licensed as MIT, see LICENSE for details. +carafe itself is made by [Jelmer van Arnhem](https://github.com/Jelmerro) and is licensed as MIT, see LICENSE for details. -Dependencies such as wine have no relation to carafe and are be covered by different licenses. +Dependencies such as wine have no relation to carafe and are covered by different licenses. diff --git a/release_fpm.sh b/release_fpm.sh new file mode 100755 index 0000000..52d9392 --- /dev/null +++ b/release_fpm.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +cd "$(dirname "$(realpath "$0")")" || exit +rm -rf dist/ +mkdir -p dist/ +name=$(grep "^name=" pyproject.toml | sed 's/.*=//g' | tr -d '"') +version=$(grep "^version=" pyproject.toml | sed 's/.*=//g' | tr -d '"') +description=$(grep "^description=" pyproject.toml | sed 's/.*=//g' | tr -d '"') +url=$(grep "^Repository=" pyproject.toml | sed 's/.*=//g' | tr -d '"') +author=$(grep "^authors=" pyproject.toml | sed 's/.*=//g' | sed 's/}]$//g' | tr -d '"') +license=$(grep "^license=" pyproject.toml | sed 's/.*=//g' | sed 's/}$//g' | tr -d '"') +for rel in "rpm" "deb" "pacman";do + fpm -s dir -t $rel \ + --package "dist/$name-$version.any.$rel" \ + --name "$name" --license "$license" --version "$version" --url "$url" \ + --architecture all --depends python3 --description "$description" \ + --maintainer "$author" "$name.py=/usr/bin/$name" +done diff --git a/release_jfpm.sh b/release_jfpm.sh new file mode 100755 index 0000000..7650875 --- /dev/null +++ b/release_jfpm.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +cd "$(dirname "$(realpath "$0")")" || exit +shopt -s expand_aliases +alias fpm="../jfpm/fpm.sh" +source ./release_fpm.sh