You are not logged in.
Hello AUR maintainers,
Planning submit new package: pulse-remote-git
GitHub: https://github.com/undg/pulse-remote
It's a remote controll for puleseaudio/pipewire
Any concerns before submission?
PKGBUILD
# Maintainer: Bartek Laskowski <bartek at undg dot dev>
pkgname=pulse-remote-git
pkgver=v0.8.4.r7.gd21f02f
pkgrel=1
pkgdesc="Remote Audio Control for PulseAudio/PipeWire. Use your phone to adjust volume on your PC."
arch=('x86_64')
url="https://github.com/undg/pulse-remote"
license=('MIT')
install="$pkgname.install"
depends=('go' 'libpulse')
makedepends=('git')
provides=($pkgname)
source=("$pkgname::git+https://github.com/undg/go-prapi.git" "$pkgname.install")
sha256sums=('SKIP' '01269ec7984af8c36157efb7bf8c12d4de847a8458406a64b637da9c975459ff')
build() {
cd "$pkgname"
make build
}
package() {
cd "$pkgname"
install -Dm755 "build/bin/pulse-remote-server" "$pkgdir/usr/bin/pulse-remote-server"
install -Dm644 "pulse-remote.service" "$pkgdir/usr/lib/systemd/user/pulse-remote.service"
install -Dm644 "../$pkgname.install" "$pkgdir/usr/share/libalpm/scripts/$pkgname.install"
}
pkgver() {
cd "$pkgname"
git describe --long --abbrev=7 --tags | sed 's/^v-//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
pulse-remote-git.install
R='\033[0;31m' #'0;31' is Red ANSI color code
G='\033[0;32m' #'0;32' is Green ANSI color code
Y='\033[1;33m' #'1;33' is Yellow ANSI color code
B='\033[0;34m' #'0;34' is Blue ANSI color code
M='\033[1;35m' #'1;33' is Magenta ANSI color code
C='\033[0;36m' #'0;36' is Cyan ANSI color code
NC='\033[0m' #'0' is back no color
user_info() {
echo -e ""
echo -e "$G=== PULSE REMOTE SETUP ===$NC"
echo -e ""
echo -e "$C>>> Run these commands:$NC"
echo -e "$Y systemctl --user enable pulse-remote.service"
echo -e " systemctl --user start pulse-remote.service$NC"
echo -e ""
echo -e "$C>>> Then visit:$NC"
echo -e "$B http://localhost:8448$NC"
}
post_install() {
user_info
}
post_upgrade() {
user_info
}
post_remove() {
echo -e ""
echo -e "$R=== CLEANUP STEPS ===$NC"
echo -e ""
echo -e "$C>>> Optional cleanup commands:$NC"
echo -e "$Y systemctl --user disable pulse-remote.service"
echo -e " systemctl --user stop pulse-remote.service$NC"
echo -e ""
}
Last edited by undg (2025-02-17 22:21:44)
Offline
I had a look at makefile to see if it handled CFLAGS/etc, it doesn't, so you need to follow https://wiki.archlinux.org/title/Go_package_guidelines
When I was there, I noticed the makefile does a git clone of another repo. That's...really bad and makes this package not work well. You have no versioning on that.
You need to strip the leading 'v' in the pkgver.
'go' should pretty much never be a runtime dep.
provides=($pkgname) is just nonsense.
Having the .install file in the source array isn't bad, but it's unusual. Installing it as part of the package is wrong, what's the point there?
Having basic systemd usage in the .install file is not the way to go.
You need to install the license, as every MIT license is different.
Offline
Thanks for review!
- You need to strip the leading 'v' in the pkgver.
- provides=($pkgname) is just nonsense.
- Having the .install file in the source array isn't bad, but it's unusual. Installing it as part of the package is wrong, what's the point there?
- You need to install the license, as every MIT license is different.
- Having basic systemd usage in the .install file is not the way to go.
- 'go' should pretty much never be a runtime dep.
I've fixed those issue, removed nonsense, replaced .install with manpage, installed license and moved GO from depends to makedepends.
I had a look at makefile to see if it handled CFLAGS/etc, it doesn't, so you need to follow https://wiki.archlinux.org/title/Go_package_guidelines
I've added CGO_* add GOFLAGS variables as in documentation. Thanks for link. Also moved test's from make build to check()
When I was there, I noticed the makefile does a git clone of another repo. That's...really bad and makes this package not work well. You have no versioning on that.
Yes you are right. Frontend is kept in separate repo but I embed its dist into go binary.
Could I get your advise? I'm considering few solutions for this:
* Merge Backend and Frontend into monorepo (one version for both)
* Include transpiled Frontend into Backend repository
* Distribute binary only from release page: https://github.com/undg/go-prapi/releases (I would not need to compile BE nor transpile FE at all)
edit: I've decided to add only static files from Frontend in web/dist/ folder and added version of current Frontend to web/version file. I'm worried about node and npm dependencies in building process. It will take to long time for user to install it. With static files only it's quicker and there is less points of failure.
Last edited by undg (2025-02-19 11:23:17)
Offline