Skip to content

Instantly share code, notes, and snippets.

@ShapeShifter499
Created July 12, 2022 09:58
Show Gist options
  • Save ShapeShifter499/88ea14699d748530c7e948e2f6c3e12f to your computer and use it in GitHub Desktop.
Save ShapeShifter499/88ea14699d748530c7e948e2f6c3e12f to your computer and use it in GitHub Desktop.
caffeine 2.9.11 PKGBUILD and patch
# Maintainer: Michał Wojdyła < micwoj9292 at gmail dot com >
# Contributor: Simon Zack <simonzack@gmail.com>
# Contributor: Toasty <toastyyogurttime@gmail.com>
# Contributor: Stephen304 <stephen304@gmail.com>
_name=cups-of-caffeine
pkgname=caffeine
pkgver=2.9.11
pkgrel=1
pkgdesc="Keep your computer awake."
arch=(any)
url="https://launchpad.net/caffeine"
license=('GPL3')
depends=(python-xlib python-gobject python-ewmh)
makedepends=('python-setuptools')
optdepends=('libayatana-appindicator: caffeine-indicator (tray applet) support')
source=("${_name}-${pkgver}.tar.gz::https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-$pkgver.tar.gz"
setuptools.patch)
md5sums=('cd624f6d0a573771ff74df122376fbf8'
'afeee8e85507772316fecd8765456fdb')
prepare() {
cd "$srcdir/${_name}-${pkgver}"
patch -u -p0 --input="${srcdir}/setuptools.patch"
}
build() {
cd "$srcdir/${_name}-${pkgver}"
python setup.py build
}
check() {
cd "$srcdir/${_name}-${pkgver}"
python setup.py check
}
package() {
cd "$srcdir/${_name}-${pkgver}"
python setup.py install --root="$pkgdir" --optimize=1
cd "$pkgdir"
chmod -R +rx *
}
--- setup.py
+++ setup.py
@@ -68,4 +68,5 @@
data_files=data_files,
scripts=["caffeine", "caffeinate", "caffeine-indicator"],
+ py_modules=[]
)
@micwoj92
Copy link

Hello, ill post here to not spam aur comments, if you figure out what causes this perl/caffeine-indicator error with indicator then I can add it to optdepends with something like "install this for indicator on xyz". Thanks for the patch.

@ShapeShifter499
Copy link
Author

@micwoj92 are you making use of xdg-screensaver by any chance? I'm using Gnome and Wayland here but it seems to be down to the use of 'xdg-screensaver'. The 'xdg-utils' Arch Linux package has 'perl-net-dbus' and 'perl-x11-protocol' listed as optdepends for 'xdg-screensaver'.

@micwoj92
Copy link

No, I am using xlockmore and xscreensaver. Now i don't think I should include because it's already listed as optional in different package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment