aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/sndio/README21
-rw-r--r--audio/sndio/slack-desc10
-rw-r--r--audio/sndio/sndio.SlackBuild35
3 files changed, 41 insertions, 25 deletions
diff --git a/audio/sndio/README b/audio/sndio/README
index 31ad90d588..6e31f8daea 100644
--- a/audio/sndio/README
+++ b/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
diff --git a/audio/sndio/slack-desc b/audio/sndio/slack-desc
index 87cacbd87d..f01a6cb85c 100644
--- a/audio/sndio/slack-desc
+++ b/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:
diff --git a/audio/sndio/sndio.SlackBuild b/audio/sndio/sndio.SlackBuild
index b134b9ebc7..6d88ed6f42 100644
--- a/audio/sndio/sndio.SlackBuild
+++ b/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.