diff options
author | MusicalArtist12 | 2023-11-23 10:09:14 -0700 |
---|---|---|
committer | MusicalArtist12 | 2023-11-23 10:09:14 -0700 |
commit | fdc5b48b4b6eb346a5955a309a7fbdbe34c56c38 (patch) | |
tree | 50cfc9406cf7369ffac33ec38d25a469aa26ced3 /PKGBUILD | |
parent | ec2eb28de252f52fd101511df6c4e99cfeb739d0 (diff) | |
download | aur-fdc5b48b4b6eb346a5955a309a7fbdbe34c56c38.tar.gz |
i RTFM and realized how bad the previous system is
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 27 |
1 files changed, 17 insertions, 10 deletions
@@ -4,17 +4,19 @@ # shellcheck disable=SC2034,2164,2154 pkgname=auto-cpufreq pkgver=2.1.0 -pkgrel=3 +pkgrel=4 pkgdesc="Automatic CPU speed & power optimizer" arch=('any') url="https://github.com/AdnanHodzic/auto-cpufreq" license=('LGPL3') -depends=('python' 'python-pip' 'python-setuptools' 'dmidecode' 'gobject-introspection' 'gtk3') +depends=('python' 'python-setuptools' 'python-psutil' 'python-click' 'python-distro' 'python-requests' 'python-gobject' 'dmidecode' 'gobject-introspection' 'gtk3') +makedepends=('python-build' 'python-installer' 'python-wheel' 'python-poetry-core' 'python-poetry-dynamic-versioning' ) install="$pkgname.install" source=( "$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz" + "$pkgname.service" "001-fix-icon-n-style-locations.patch" "002-fix-other-icon-path.patch" ) @@ -24,25 +26,30 @@ prepare() { sed -i 's|usr/local|usr|g' "scripts/${pkgname}.service" auto_cpufreq/core.py patch --strip=2 --input=../001-fix-icon-n-style-locations.patch patch --strip=2 --input=../002-fix-other-icon-path.patch + } sha256sums=('77a5ce9dc8044c5e5bf5770a6c3e16a252f8cef8c80ecc6eed9fefddc6ec825b' + '296fe1fce542643ee21d1714ce8986f493ddaec6ac63b7aea5bdcbfb1b73d89e' 'afe7e64dbde2ea599b319e8632d72a3c237b5c4275dd31d0f40e39719193a67b' 'c89514e12efcb161d678e6c0c978e08faf41a08625bd4a83b893c1e05cd8429e' ) -package() { - cd "$srcdir" - mkdir -p $pkgdir/opt/$pkgname/ - mkdir -p $pkgdir/opt/$pkgname/venv/ +build() { + cd "$srcdir/$pkgname-$pkgver" - cp -R $pkgname-$pkgver $pkgdir/opt/$pkgname/src + POETRY_DYNAMIC_VERSIONING_BYPASS=1 python -m build --wheel --no-isolation +} +package() { + cd "$srcdir" cd $pkgname-$pkgver - install -Dm755 scripts/auto-cpufreq-venv-wrapper "$pkgdir/usr/bin/auto-cpufreq" - install -Dm755 scripts/start_app "$pkgdir/usr/bin/auto-cpufreq-gtk" + python -m installer --destdir="$pkgdir" dist/*.whl + + # install -Dm755 scripts/auto-cpufreq-venv-wrapper "$pkgdir/usr/bin/auto-cpufreq" + # install -Dm755 scripts/start_app "$pkgdir/usr/bin/auto-cpufreq-gtk" install -Dm644 scripts/org.auto-cpufreq.pkexec.policy -t "$pkgdir/usr/share/polkit-1/actions/" install -Dm644 images/icon.png "$pkgdir/usr/share/pixmaps/auto-cpufreq.png" install -Dm644 images/icon.png -t "$pkgdir/usr/share/$pkgname/" @@ -51,7 +58,7 @@ package() { install -Dm755 scripts/auto-cpufreq-install.sh "$pkgdir/usr/share/$pkgname/scripts/" install -Dm755 scripts/auto-cpufreq-remove.sh "$pkgdir/usr/share/$pkgname/scripts/" - install -Dm644 scripts/auto-cpufreq.service "$pkgdir/etc/systemd/system/$pkgname.service" + install -Dm644 $srcdir/auto-cpufreq.service "$pkgdir/etc/systemd/system/$pkgname.service" install -Dm755 scripts/cpufreqctl.sh "$pkgdir/usr/share/$pkgname/scripts/" install -Dm644 scripts/style.css "$pkgdir/usr/share/$pkgname/scripts/" install -Dm644 scripts/auto-cpufreq-gtk.desktop -t "$pkgdir/usr/share/applications/" |