marioortizmanero / polybar-pulseaudio-control

A feature-full Polybar module to control PulseAudio
MIT License
471 stars 49 forks source link

AUR packaging #35

Closed marioortizmanero closed 3 years ago

marioortizmanero commented 3 years ago

I'll make a PKGBUILD soon so that it can be uploaded.

OJFord commented 3 years ago

How's:

# Maintainer: Mario Ortiz Manero <omitted here>
# Maintainer: Oliver Ford <omitted here>
# shellcheck disable=SC2034,SC2154
pkgname=polybar-pulseaudio-control
pkgver=1.3
pkgrel=1
pkgdesc='Polybar module to control PulseAudio'
url='https://github.com/marioortizmanero/polybar-pulseaudio-control'
license=('MIT')
source=("${url}/archive/v${pkgver}.tar.gz")
md5sums=('e6693e35cb023fd1c4a02dc4ddc6b765')
arch=('any')
depends=(
    'bash'
    'libpulse'
    'pulseaudio'
)
optdepends=(
)
conflicts=(
)

package() {
    set -e
    cd "$pkgname-$pkgver"

    install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

    mkdir -p "$pkgdir/usr/bin"
    install -D -m755 "./pulseaudio-control.bash" "$pkgdir/usr/bin/$pkgname"
}
marioortizmanero commented 3 years ago

Here's what I was writing:

# Maintainer: Mario Ortiz Manero <...>
# Maintainer: (OJFord's info)
pkgname=pulseaudio-control
_pkgname=polybar-pulseaudio-control
pkgver=1.3
pkgrel=1
pkgdesc="A feature-full Polybar module to control PulseAudio"
arch=("any")
url="https://github.com/marioortizmanero/polybar-pulseaudio-control"
license=("custom:MIT")
depends=("pulseaudio")
source=("https://github.com/marioortizmanero/polybar-pulseaudio-control/archive/v$pkgver.tar.gz")
md5sums=('e6693e35cb023fd1c4a02dc4ddc6b765')

package() {
    cd "$_pkgname-$pkgver"
    install -Dm755 "polybar-pulseaudio" "$pkgdir/usr/bin/polybar_pulseaudio"
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

Yours seems more complete. Not sure if libpulse is an actual dependency, we only need pacmd and pactl, which are provided by the pulseaudio package. The MIT license is custom, so you might want to use custom:MIT. Also, you can just remove the optdepends and conflicts lines IMO. Do you want to add it yourself and add me as a co-maintainer then? I'll release v2.0 now.

I also wanted to use pulseaudio-control as the name as I'll very likely change it soon if I manage to support other status bars (see #36).

OJFord commented 3 years ago

libpulse is probably a dependency of pulseaudio - I just did -Qo on pacmd/pactl and the latter was libpulse.

Didn't know about custom:, :+1: thanks.

Ack re name.

Happy to make those changes and add it (and you as co-maintainer) - but equally for you to, didn't mean to step on your toes, I just had this semi-ready from when I started previously, before I hit the 'ah but I can't configure it without editing the file post-install' issue.

marioortizmanero commented 3 years ago

Don't worry! I imagined you had something ready, I just wanted to give it a try :P

OJFord commented 3 years ago

https://aur.archlinux.org/packages/pulseaudio-control/

I reworded the description slightly to make it easy/smooth to generalise beyond polybar, but feel free to tweak that of course.

marioortizmanero commented 3 years ago

Great! Can you open a small PR with a link to the package in the README?