From 3a6d262c9f323afccab96c633b409b0971a3f70e Mon Sep 17 00:00:00 2001 From: EnumDev Date: Wed, 15 Oct 2025 14:21:33 +0300 Subject: [PATCH] Initial commit --- .gitignore | 2 ++ check-version.sh | 12 ++++++++++++ pkg.info | 24 ++++++++++++++++++++++++ source.sh | 19 +++++++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 .gitignore create mode 100644 check-version.sh create mode 100644 pkg.info create mode 100644 source.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3e58e5f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Exclude bpm archives +*.bpm \ No newline at end of file diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..78aa089 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Gitlab repository +REPO="panel-plugins/xfce4-pulseaudio-plugin" + +# Replace slash with URL encoded representation +REPO=$(echo "$REPO" | sed 's|/|%2F|g') + +# Get tag name using Gitlab Rest API +TAG_NAME=$(curl -s -L https://gitlab.xfce.org/api/v4/projects/"$REPO"/repository/tags | jq -r '.[].name' | cut -d'-' -f4 | grep -v 'pre' | sort -V | tail -n1) + +echo "$TAG_NAME" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..5ba0e2c --- /dev/null +++ b/pkg.info @@ -0,0 +1,24 @@ +name: xfce4-pulseaudio-plugin +description: Pulseaudio plugin for the Xfce4 panel +version: 0.5.1 +revision: 1 +url: https://docs.xfce.org/panel-plugins/xfce4-pulseaudio-plugin/start +license: GPL2-or-later +architecture: any +type: source +depends: + - libcanberra + - libkeybinder3 + - libnotify + - libpulse + - xfce4-panel +optional_depends: + - pavucontrol +make_depends: + - meson + - xfce4-dev-tools +downloads: + - url: https://gitlab.xfce.org/panel-plugins/xfce4-pulseaudio-plugin/-/archive/xfce4-pulseaudio-plugin-${BPM_PKG_VERSION}/xfce4-pulseaudio-plugin-xfce4-pulseaudio-plugin-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: 800a15886407f32c3e663d6c3ac463052f32d56f714c79f337af0a7838c43853 diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..60ae869 --- /dev/null +++ b/source.sh @@ -0,0 +1,19 @@ +# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE +# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT + +# The build function is executed in the source directory +# This function is used to compile the source code +build() { + meson setup --prefix=/usr --localstatedir=/var build + meson compile -C build +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + meson install -C build --destdir="$BPM_OUTPUT" + + # Install package license + install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/xfce4-pulseaudio-plugin/COPYING +}