Browse Source

audio/sndio: Use correct UID, fix 32-bit build.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
pull/299/head
B. Watson 5 months ago
committed by Willy Sudiarto Raharjo
parent
commit
f0ce5a3c8a
No known key found for this signature in database GPG Key ID: 3F617144D7238786
  1. 21
      audio/sndio/README
  2. 10
      audio/sndio/slack-desc
  3. 35
      audio/sndio/sndio.SlackBuild

21
audio/sndio/README

@ -1,8 +1,13 @@
Sndio is a small audio and MIDI framework part of the OpenBSD project
and ported to FreeBSD, Linux and NetBSD. It provides a lightweight audio
& MIDI server and a fully documented user-space API to access either the
server or the hardware directly in a uniform way. Sndio is designed to
work for desktop applications, but pays special attention to
synchronization mechanisms and reliability required by music
applications. Reliability through simplicity are part of the project
goals.
Sndio is a small audio and MIDI framework, part of the OpenBSD
project, and ported to FreeBSD, Linux and NetBSD. It provides a
lightweight audio & MIDI server and a fully documented user-space API
to access either the server or the hardware directly in a uniform
way. Sndio is designed to work for desktop applications, but pays
special attention to synchronization mechanisms and reliability
required by music applications. Reliability through simplicity are
part of the project goals.
Before running the SlackBuild script, you must create a sndiod user:
# mkdir -p /var/run/sndiod
# useradd -u 389 -g audio -d /var/run/sndiod sndiod

10
audio/sndio/slack-desc

@ -8,11 +8,11 @@
|-----handy-ruler------------------------------------------------------|
sndio: sndio (small audio and MIDI framework)
sndio:
sndio: Sndio is a small audio and MIDI framework part of the OpenBSD project
sndio: and ported to FreeBSD, Linux and NetBSD. It provides a lightweight
sndio: audio & MIDI server and a fully documented user-space API to access
sndio: either the server or the hardware directly in a uniform way.
sndio:
sndio: Sndio is a small audio and MIDI framework, part of the OpenBSD
sndio: project, and ported to FreeBSD, Linux and NetBSD. It provides
sndio: a lightweight audio & MIDI server and a fully documented
sndio: user-space API to access either the server or the hardware
sndio: directly in a uniform way.
sndio:
sndio:
sndio:

35
audio/sndio/sndio.SlackBuild

@ -22,16 +22,25 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20250602 bkw: Modified by SlackBuilds.org, BUILD=2:
# - assign UID 389 for sndiod.
# - use getent to check user existence (not grep /etc/passwd).
# - tiny punctuation fixes in README and slack-desc.
# - actually use SLKCFLAGS.
# - fix 32-bit build (hardcoded lib64).
# - add aarch64 lib64 support. untested.
# - fix .pc file (by adding --prefix to ./configure).
cd "$(dirname "$0")" ; CWD=$(pwd)
PRGNAM=sndio
VERSION=${VERSION:-1.9.0}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
NAMVER=$PRGNAM-$VERSION
SNDIO_GID='17' # Slackware's 'audio' group.
SNDIO_UID='377' # A chosen ID for sndiod user.
SNDIO_GRP='audio'
SNDIO_UID='389' # UID for sndiod user, see https://slackbuilds.org/uid_gid.txt
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
@ -51,13 +60,13 @@ SRC="$TMP/$NAMVER"
PKG="$TMP/package-$PRGNAM"
OUTPUT="${OUTPUT:-/tmp}"
# Bail out if user or group isn't valid on your system
# For slackbuilds.org, assigned postgres uid/gid are 377/377
# Bail out if user isn't valid on your system.
# For slackbuilds.org, assigned sndiod UID is 389.
# See http://slackbuilds.org/uid_gid.txt
if ! grep ^sndiod: /etc/passwd 2>&1 > /dev/null; then
echo " You must have 'sndiod' user to run this script."
echo " # mkdir /var/run/sndiod"
echo " # useradd -u $SNDIO_UID -g $SNDIO_GID -d /var/run/sndiod sndiod"
if ! getent passwd sndiod &>/dev/null; then
echo " You must have a 'sndiod' user to run this script."
echo " # mkdir -p /var/run/sndiod"
echo " # useradd -u $SNDIO_UID -g $SNDIO_GRP -d /var/run/sndiod sndiod"
exit 1
fi
@ -65,8 +74,9 @@ if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
elif [ "$ARCH" = "x86_64" -o "$ARCH" = "aarch64" ]; then
SLKCFLAGS="-O2 -fPIC"
LSUF="64"
else
SLKCFLAGS="-O2"
fi
@ -84,18 +94,19 @@ chmod -R u+w,go+r-w,a-s .
INSTPREFIX='/usr'
BINDIR="$INSTPREFIX/bin" # Binaries
LIBDIR="$INSTPREFIX/lib64" # Libraries
LIBDIR="$INSTPREFIX/lib$LSUF" # Libraries
PKGCONFDIR="$LIBDIR/pkgconfig" # pkg-config(1) files
INCLUDEDIR="$INSTPREFIX/include" # Headers
MANDIR="$INSTPREFIX/man" # Man pages
./configure \
--prefix=/usr \
--bindir="$BINDIR" \
--libdir="$LIBDIR" \
--pkgconfdir="$PKGCONFDIR" \
--includedir="$INCLUDEDIR" \
--mandir="$MANDIR"
make
make CFLAGS="$SLKCFLAGS"
make DESTDIR="$PKG" PREFIX="$INSTPREFIX" install
# Strip symbols.

Loading…
Cancel
Save