diff options
author | AlphaJack | 2022-02-23 13:30:04 +0100 |
---|---|---|
committer | AlphaJack | 2022-02-23 13:30:04 +0100 |
commit | fd3ca008e8d49bd569ee692843f606446f2df344 (patch) | |
tree | 1dce8c41e2cdc4c4814b409e1172af6158c5e0b3 | |
parent | 7970c25559a22599239dc9252b88eef2cdb2c139 (diff) | |
download | aur-ices0.tar.gz |
Added dedicated user, unit and example configuration
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 30 | ||||
-rw-r--r-- | example.xml | 39 | ||||
-rw-r--r-- | ices0.install | 10 | ||||
-rw-r--r-- | ices0.sysusers | 1 | ||||
-rw-r--r-- | ices0.tmpfiles | 2 | ||||
-rw-r--r-- | ices0@.service | 12 |
7 files changed, 90 insertions, 15 deletions
@@ -1,12 +1,13 @@ pkgbase = ices0 pkgdesc = A source client for broadcasting in MP3, FLAC, AAC and OGG Vorbis formats to an icecast2 server pkgver = 0.4.11 - pkgrel = 6 + pkgrel = 7 url = https://github.com/Moonbase59/ices0 install = ices0.install arch = i686 arch = x86_64 arch = armv7h + arch = aarch64 license = GPL2 makedepends = autoconf makedepends = automake @@ -23,6 +24,14 @@ pkgbase = ices0 optdepends = python2: playlist scripting engine options = !docs source = https://github.com/Moonbase59/ices0/archive/v0.4.11.tar.gz + source = example.xml + source = ices0@.service + source = ices0.sysusers + source = ices0.tmpfiles sha256sums = 9179496149e763a75fea37bf6ec12947cad4bdb868b401d34728b353b836047a + sha256sums = 4bef8de900f69fe7b252d0d7bc0478100483a7372a3969bb7a79cc9a6edd442c + sha256sums = af5bd06ee8d6c528b3067956162755b11cf3c340f3c6a15f8951fbb2ec2a73c6 + sha256sums = f9d80a8af448036c256db7ab16f2cf1996275c33d69c948a45eeb7d3f1a14223 + sha256sums = a7b7d8d462e4fd98964ccdb59d4b09aefb7086471844be9f29ac91568634b1cb pkgname = ices0 @@ -5,10 +5,10 @@ pkgname="ices0" pkgver=0.4.11 -pkgrel=6 +pkgrel=7 pkgdesc="A source client for broadcasting in MP3, FLAC, AAC and OGG Vorbis formats to an icecast2 server" license=("GPL2") -arch=("i686" "x86_64" "armv7h") +arch=("i686" "x86_64" "armv7h" "aarch64") url="https://github.com/Moonbase59/ices0" depends=("lame" "libxml2" "libshout") optdepends=("flac: flac audio support" @@ -19,8 +19,16 @@ optdepends=("flac: flac audio support" "perl: playlist scripting engine" "python2: playlist scripting engine") makedepends=("autoconf" "automake" "pkgconf") -source=("$url/archive/v$pkgver.tar.gz") -sha256sums=("9179496149e763a75fea37bf6ec12947cad4bdb868b401d34728b353b836047a") +source=("$url/archive/v$pkgver.tar.gz" + "example.xml" + "ices0@.service" + "ices0.sysusers" + "ices0.tmpfiles") +sha256sums=('9179496149e763a75fea37bf6ec12947cad4bdb868b401d34728b353b836047a' + '4bef8de900f69fe7b252d0d7bc0478100483a7372a3969bb7a79cc9a6edd442c' + 'af5bd06ee8d6c528b3067956162755b11cf3c340f3c6a15f8951fbb2ec2a73c6' + 'f9d80a8af448036c256db7ab16f2cf1996275c33d69c948a45eeb7d3f1a14223' + 'a7b7d8d462e4fd98964ccdb59d4b09aefb7086471844be9f29ac91568634b1cb') options=("!docs") install="$pkgname.install" @@ -30,21 +38,25 @@ build(){ autoreconf -fi automake --add-missing if [ -f "/usr/bin/python2" ]; then - ./configure --prefix="/usr" --sysconfdir="/usr/share/$pkgname" -mandir="/usr/share" --with-python="/usr/bin/python2" + ./configure --prefix="/usr" --sysconfdir="/usr/share/$pkgname" --mandir="/usr/share" --with-python="/usr/bin/python2" else - ./configure --prefix="/usr" --sysconfdir="/usr/share/$pkgname" -mandir="/usr/share" + ./configure --prefix="/usr" --sysconfdir="/usr/share/$pkgname" --mandir="/usr/share" fi echo "Please check that all the features you want are available, otherwise install optional dependencies before installing ices0" - echo "Waiting 10 seconds" - sleep 10 + echo "Waiting 5 seconds" + sleep 5 make } package(){ cd "$pkgname-$pkgver" make DESTDIR="$pkgdir" install - # Rename files to avoid conflict with ices2 + # rename files to avoid conflict with ices2 mv "$pkgdir/usr/bin/ices" "$pkgdir/usr/bin/ices0" mv "$pkgdir/usr/share/man1/ices.1" "$pkgdir/usr/share/man1/ices0.1" install -D -m 644 "COPYING" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -D -m 644 "$srcdir/example.xml" "$pkgdir/etc/ices0/example.conf" + install -D -m 644 "$srcdir/ices0@.service" "$pkgdir/usr/lib/systemd/system/ices0@.service" + install -D -m 644 "$srcdir/ices0.sysusers" "$pkgdir/usr/lib/sysusers.d/ices0.conf" + install -D -m 644 "$srcdir/ices0.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/ices0.conf" } diff --git a/example.xml b/example.xml new file mode 100644 index 000000000000..90c84e0449aa --- /dev/null +++ b/example.xml @@ -0,0 +1,39 @@ +<?xml version="1.0"?> +<ices:Configuration xmlns:ices="http://www.icecast.org/projects/ices"> + <Execution> + <Background>0</Background> + <Verbose>0</Verbose> + <BaseDirectory>/tmp/ices0/example</BaseDirectory> + <CueFile>0</CueFile> + </Execution> + + <Playlist> + <File>/path/to/playlist.txt</File> + <Randomize>1</Randomize> + <Type>builtin</Type> + <Module>ices</Module> + <CrossMix>0</CrossMix> + <Crossfade>2</Crossfade> + <MinCrossfade>30</MinCrossfade> + </Playlist> + + <Stream> + <Server> + <Hostname>127.0.0.1</Hostname> + <Port>4040</Port> + <Username>source</Username> + <Password>XXXXXX</Password> + <Protocol>http</Protocol> + </Server> + <Mountpoint>/example</Mountpoint> + <Name>Example</Name> + <Genre>Example</Genre> + <Description>Example</Description> + <URL>https://example.org/radio/example</URL> + <Public>0</Public> + <Bitrate>320</Bitrate> + <Reencode>0</Reencode> + <Samplerate>44100</Samplerate> + <Channels>2</Channels> + </Stream> +</ices:Configuration> diff --git a/ices0.install b/ices0.install index 587406f77230..b873fa1afec3 100644 --- a/ices0.install +++ b/ices0.install @@ -1,8 +1,8 @@ post_install(){ - echo "To avoid conflict with ices2, ices binary has been renamed to ices0 (so as man page) -and sample config files have been installed in /usr/share/ices0/." -} + cat <<INFO + +To avoid conflict with ices2, ices binary has been renamed to ices0 (so as man page) +and sample config files have been installed in /usr/share/ices0/ -post_upgrade(){ - post_install $1 +INFO } diff --git a/ices0.sysusers b/ices0.sysusers new file mode 100644 index 000000000000..3a8078835df4 --- /dev/null +++ b/ices0.sysusers @@ -0,0 +1 @@ +u ices0 - "ices0 user" /var/lib/ices0 diff --git a/ices0.tmpfiles b/ices0.tmpfiles new file mode 100644 index 000000000000..b64cadbbde42 --- /dev/null +++ b/ices0.tmpfiles @@ -0,0 +1,2 @@ +d /etc/ices0 0750 root ices0 +d /var/lib/ices0 0700 ices0 ices0 diff --git a/ices0@.service b/ices0@.service new file mode 100644 index 000000000000..d74cd3dead5d --- /dev/null +++ b/ices0@.service @@ -0,0 +1,12 @@ +[Unit] +Description=Ices0 %i stream +After = icecast.service + +[Service] +User=ices0 +Type=simple +ExecStart=/usr/bin/ices0 -c /etc/ices0/%i.xml +Restart=on-failure + +[Install] +WantedBy=multi-user.target |