# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the CC0 1.0 License.
# Maintainer: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>

pkgname=gnutoo-i3-sway-config
pkgver=0.0.1
pkgrel=4
pkgdesc="GNUtoo's configuration for i3 and sway"
arch=('any')
url='https://git.sr.ht/~gnutoo/scripts'
# It also contains files under the BSD-3-clause and Expat licenses
license=('GPL3')
makedepends=('autoconf'
             'automake'
             'bemenu'
             'bemenu-wayland'
             'git'
             'python'
             'python-sh'
             'sed')
depends=(
    ########
    # Sway #
    ########
    'bemenu'
    'brightnessctl'
    'foot'
    'grim'
    'python'
    'python-sh'
    'swaylock'
    'wmenu'
    ######
    # i3 #
    ######
    'autorandr'
    'dex'
    'dmenu'
    'i3-wm'
    'i3status'
    'libpulse'
    'mpc'
    'network-manager-applet'
    'sway'
    'swaylock'
    'xf86-input-evdev'
    'xf86-input-libinput'
    'xf86-input-synaptics'
    'xf86-input-vmmouse'
    'xf86-input-void'
    'xf86-video-amdgpu'
    'xf86-video-ati'
    'xf86-video-dummy'
    'xf86-video-fbdev'
    'xf86-video-intel'
    'xf86-video-nouveau'
    'xf86-video-qxl'
    'xf86-video-vesa'
    'xf86-video-voodoo'
    'xorg-server'
    'xorg-setxkbmap'
    'xorg-xset'
    'xorg-xsetroot'
    'xss-lock'
)

_commit=('0f8b2c9d4ecb1e0ab879b6c37291c94a204691a9')
source=("git+https://git.sr.ht/~gnutoo/gnutoo-i3-sway-config#commit=${_commit}")
sha512sums=('SKIP')

build(){
    cd "${pkgname}"
    ./autogen.sh
    ./configure --prefix=/opt \
        --with-i3-config=distros/parabola/i3.conf \
        --with-sway-config=distros/parabola/sway.conf \
	--with-sway-applauncher-command="bemenu-run"
    make
}

package(){
    cd "${pkgname}"
    make install DESTDIR="${pkgdir}"
}
