Skip to content

Commit

Permalink
add release scripts + add docs for fedora repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelmerro committed Nov 7, 2024
1 parent 9d11701 commit 34752c3
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 8 deletions.
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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.
Expand Down Expand Up @@ -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.
17 changes: 17 additions & 0 deletions release_fpm.sh
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions release_jfpm.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 34752c3

Please sign in to comment.