Skip to content

Commit 183a945

Browse files
authored
add: sndio (#3876)
for #3851 (build dependency)
1 parent 3cfcdfa commit 183a945

File tree

3 files changed

+111
-0
lines changed

3 files changed

+111
-0
lines changed

anda/multimedia/sndio/anda.hcl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
project pkg {
2+
rpm {
3+
spec = "sndio.spec"
4+
}
5+
}

anda/multimedia/sndio/sndio.spec

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
Name: sndio
2+
Version: 1.10.0
3+
Release: 1%?dist
4+
Summary: A sound library
5+
#Group: Sound/Utilities
6+
7+
License: ISC
8+
URL: https://www.sndio.org
9+
Source0: https://www.sndio.org/%{name}-%{version}.tar.gz
10+
11+
Provides: %{name}d = %version-%release
12+
Provides: %{name}ctl = %version-%release
13+
Provides: midicat = %version-%release
14+
Provides: aucat = %version-%release
15+
16+
17+
BuildRequires: pkgconfig(alsa)
18+
BuildRequires: pkgconfig(libbsd)
19+
BuildRequires: systemd-rpm-macros
20+
BuildRequires: make gcc
21+
Requires: %name-libs = %{version}-%{release}
22+
23+
%description
24+
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.
25+
26+
%package libs
27+
Summary: Libraries for %{name}
28+
29+
%description libs
30+
This package contains libraries for %{name}.
31+
32+
%package devel
33+
Summary: Development files for %{name}
34+
Requires: %name-libs
35+
36+
%description devel
37+
This package contains development files for %{name}.
38+
39+
%prep
40+
%autosetup
41+
42+
cat<<EOF > sndiod.conf
43+
u sndiod - "sndio" / /usr/sbin/nologin
44+
EOF
45+
46+
cat<<EOF > 100-sndio.rules
47+
polkit.addRule(function(action, subject) {
48+
if (subject.isInGroup("sndiod")) {
49+
return polkit.Result.YES;
50+
}
51+
});
52+
EOF
53+
54+
%build
55+
./configure \
56+
--prefix=%{_prefix} \
57+
--libdir=%{_libdir} \
58+
--mandir=%{_mandir} \
59+
--with-libbsd
60+
%make_build
61+
62+
%install
63+
%make_install
64+
65+
# Install sndiod systemd service file
66+
install -Dpm755 contrib/%{name}d.service %{buildroot}%{_unitdir}/%{name}d.service
67+
install -Dpm644 contrib/default.%{name}d %{buildroot}%{_sysconfdir}/default/%{name}d
68+
69+
install -Dpm644 sndiod.conf -t %buildroot%_sysusersdir/
70+
install -Dpm644 100-sndio.rules -t %buildroot%_datadir/polkit-1/rules.d/
71+
72+
# Fix for installing pkgconfig to correct lib64 dir on 64-bit systems.
73+
%dnl %ifnarch %ix86
74+
%dnl %__mkdir_p %{buildroot}%{_libdir}/pkgconfig
75+
%dnl mv %{buildroot}/usr/lib/pkgconfig/sndio.pc %{buildroot}%{_libdir}/pkgconfig
76+
%dnl %endif
77+
78+
%post
79+
%systemd_post %{name}d.service
80+
81+
%preun
82+
%systemd_preun %{name}d.service
83+
84+
%postun
85+
%systemd_postun_with_restart %{name}d.service
86+
87+
%files
88+
%{_bindir}/aucat
89+
%{_bindir}/midicat
90+
%{_bindir}/sndiod
91+
%{_bindir}/sndioctl
92+
%{_datadir}/polkit-1/rules.d/100-sndio.rules
93+
%{_mandir}/man*/*
94+
%{_unitdir}/%{name}d.service
95+
%{_sysconfdir}/default/%{name}d
96+
%{_sysusersdir}/%{name}d.conf
97+
98+
%files libs
99+
%license LICENSE
100+
%{_libdir}/libsndio.so.7*
101+
102+
%files devel
103+
%{_libdir}/libsndio.so
104+
%{_libdir}/pkgconfig/sndio.pc
105+
%{_includedir}/sndio.h

anda/multimedia/sndio/update.rhai

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rpm.version(`<li><tt><a href="sndio-([\d.]+)\.tar\.gz">`.find(get("https://sndio.org"), 1));

0 commit comments

Comments
 (0)