At build time: autoconf
At runtime: python
, numpy
, click
, rich
and pyyaml
Our standard builds use pyproject, mainly with poetry.
The dist files are template files, which means you must first autoconf
them. You could also just sed
all the .in
files if you don't want to use autotools
.
git clone https://github.com/mcgillij/amdfan.git
cd amdfan
autoconf
./configure --prefix=/usr --libdir=/usr/lib --bindir=/usr/bin
There are two ways to obtain the systemd service file. One is available during runtime, through the amdfan --service
command, but takes some assumptions of your system. May not work.
amdfan print-default --service | sudo tee /usr/lib/systemd/system/amdfan.service
If you ran ./configure
successfully, you'll also find the service files for OpenRC, Runit and systemd under dist/${init}/
.
Similarly as above, you can obtain the sources from the runtime. This is not necessary, as this file is generated automatically after the daemon runs for the first time.
amdfan print-default --configuration | sudo tee /etc/amdfan.yml
The executable files are contained within amdfan. This directory is a python module, and can either be loaded as python -m amdfan
. If you want to import the module, you may be interested in checking out amdfan.commands
, which contains most of the subcommands.
Otherwise, just use python-exec with something like
import sys
from amdfan.__main__ import main
if __name__ == '__main__':
sys.exit(main())
You can also install amdfan from PyPi using something like poetry.
poetry init
poetry add amdfan
poetry run amdfan --help
Requires poetry to be installed.
git clone git@github.com:mcgillij/amdfan.git
cd amdfan/
poetry build
Building the Arch package assumes you already have a chroot env setup to build packages.
git clone https://aur.archlinux.org/amdfan.git
cd amdfan/
autoconf --libdir=/usr
./configure
cp dist/pacman/PKGBUILD ./PKGBUILD
makechrootpkg -c -r $HOME/$CHROOT
sudo pacman -U --asdeps amdfan-*-any.pkg.tar.zst