Split package
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Gitlab repository
|
||||||
|
REPO="pulseaudio/pulseaudio"
|
||||||
|
|
||||||
|
# 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.freedesktop.org/api/v4/projects/"$REPO"/repository/tags | jq -r '.[0].name')
|
||||||
|
|
||||||
|
# Trim '-gitlab' suffix
|
||||||
|
TAG_NAME=$(echo "$TAG_NAME" | sed 's/-gitlab//g')
|
||||||
|
|
||||||
|
# Get version number from tag name
|
||||||
|
VERSION=$(echo "$TAG_NAME" | rev | cut -d'-' -f1 | rev)
|
||||||
|
|
||||||
|
# Trim 'v' character in VERSION variable
|
||||||
|
VERSION=$(echo "$VERSION" | tr -d 'v')
|
||||||
|
|
||||||
|
echo "$VERSION"
|
||||||
@@ -1,9 +1,15 @@
|
|||||||
name: pulseaudio
|
name: pulseaudio
|
||||||
description: Sound server for POSIX OSes including Linux
|
description: Sound server for POSIX OSes including Linux
|
||||||
version: 17.0
|
version: 17.0
|
||||||
|
revision: 2
|
||||||
url: https://www.freedesktop.org/wiki/Software/PulseAudio/
|
url: https://www.freedesktop.org/wiki/Software/PulseAudio/
|
||||||
license: LGPL2.1-or-later
|
license: LGPL2.1-or-later
|
||||||
architecture: any
|
architecture: any
|
||||||
depends: ["alsa-lib","dbus","elogind","fftw","gcc","glib","glibc","libcap","libice","libsm","libsndfile","libtool","libxtst","speexdsp"]
|
make_depends: ["alsa-lib","dbus","elogind","fftw","gcc","glib","glibc","libcap","libice","libsm","libsndfile","libtool","libxtst","speexdsp","attr","check","gtk3","meson","openssl","perl-xml-parser","valgrind"]
|
||||||
make_depends: ["attr","check","gtk3","meson","openssl","perl-xml-parser","valgrind"]
|
|
||||||
type: source
|
type: source
|
||||||
|
split_packages:
|
||||||
|
- name: pulseaudio
|
||||||
|
depends: ["alsa-lib","dbus","elogind","fftw","gcc","glib","glibc","libcap","libice","libpulse","libsm","libsndfile","libtool","libxtst","speexdsp"]
|
||||||
|
- name: libpulse
|
||||||
|
description: Pulseaudio shared libraries
|
||||||
|
depends: ["dbus","glib","glibc","libsndfile","libxcb"]
|
||||||
|
|||||||
@@ -37,11 +37,41 @@ check() {
|
|||||||
ninja test
|
ninja test
|
||||||
}
|
}
|
||||||
|
|
||||||
# The package function is executed in the source directory
|
package_libpulse() {
|
||||||
# This function is used to move the compiled files into the output directory
|
|
||||||
package() {
|
|
||||||
cd build
|
cd build
|
||||||
DESTDIR="$BPM_OUTPUT" ninja install
|
|
||||||
|
|
||||||
|
# Replace 'output' directory with 'output-libpulse'
|
||||||
|
rmdir "$BPM_OUTPUT"
|
||||||
|
mv "$BPM_SOURCE"/output-libpulse "$BPM_OUTPUT"
|
||||||
|
|
||||||
|
# Install package license
|
||||||
|
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/pulseaudio/LICENSE
|
||||||
|
}
|
||||||
|
|
||||||
|
package_pulseaudio() {
|
||||||
|
cd build
|
||||||
|
|
||||||
|
DESTDIR="$BPM_OUTPUT" ninja install
|
||||||
|
|
||||||
|
# Move libraries to temporary directory for libpulse package
|
||||||
|
mkdir "$BPM_SOURCE"/output-libpulse
|
||||||
|
install -d "$BPM_SOURCE"/output-libpulse/usr/bin
|
||||||
|
install -d "$BPM_SOURCE"/output-libpulse/usr/lib
|
||||||
|
install -d "$BPM_SOURCE"/output-libpulse/usr/share/{,man/man1,man/man5,bash-completion/completions}
|
||||||
|
mv "$BPM_OUTPUT"/usr/bin/pa{cat,ctl,dsp,mon,play,rec,record} -t "$BPM_SOURCE"/output-libpulse/usr/bin/
|
||||||
|
mv "$BPM_OUTPUT"/usr/lib/*.so* -t "$BPM_SOURCE"/output-libpulse/usr/lib/
|
||||||
|
mv "$BPM_OUTPUT"/usr/lib/pulseaudio -t "$BPM_SOURCE"/output-libpulse/usr/lib/
|
||||||
|
mv "$BPM_OUTPUT"/usr/lib/{cmake,pkgconfig} -t "$BPM_SOURCE"/output-libpulse/usr/lib/
|
||||||
|
mv "$BPM_OUTPUT"/usr/include -t "$BPM_SOURCE"/output-libpulse/usr/
|
||||||
|
mv "$BPM_OUTPUT"/usr/share/vala -t "$BPM_SOURCE"/output-libpulse/usr/share
|
||||||
|
mv "$BPM_OUTPUT"/usr/share/bash-completion/completions/{pulseaudio,pacat,pactl,padsp,paplay,parec,parecord} -t "$BPM_SOURCE"/output-libpulse/usr/share/bash-completion/completions/
|
||||||
|
mv "$BPM_OUTPUT"/usr/share/zsh -t "$BPM_SOURCE"/output-libpulse/usr/share
|
||||||
|
mv "$BPM_OUTPUT"/usr/share/man/man1/{pacat,pactl,padsp,paplay,parec,parecord}.1 -t "$BPM_SOURCE"/output-libpulse/usr/share/man/man1/
|
||||||
|
mv "$BPM_OUTPUT"/usr/share/man/man5/pulse-client.conf.5 -t "$BPM_SOURCE"/output-libpulse/usr/share/man/man5/
|
||||||
|
|
||||||
|
# Remove system-wide dbus service
|
||||||
|
rm "$BPM_OUTPUT"/usr/share/dbus-1/system.d/pulseaudio-system.conf
|
||||||
|
|
||||||
|
# Install package license
|
||||||
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/pulseaudio/LICENSE
|
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/pulseaudio/LICENSE
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user