summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteamedFish2023-12-12 17:51:14 +0800
committerSteamedFish2023-12-12 17:51:14 +0800
commit365ed8610964b034cfc689eb8cb1830bb3a0d5f1 (patch)
tree1446dea15b51dcbb9aa59e9135db47b5ced65971
downloadaur-365ed8610964b034cfc689eb8cb1830bb3a0d5f1.tar.gz
init commit
-rw-r--r--.SRCINFO51
-rw-r--r--PKGBUILD84
-rw-r--r--change_tonewav_dir.patch19
-rw-r--r--dsd-fme-git.install16
4 files changed, 170 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0ed1addb9020
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,51 @@
+pkgbase = dsd-fme-git
+ pkgdesc = Digital Speech Decoder - Florida Man Edition
+ pkgver = 20230915.r7.g93a3145
+ pkgrel = 1
+ url = https://github.com/lwvmobile/dsd-fme.git
+ install = dsd-fme-git.install
+ arch = i686
+ arch = x86_64
+ license = custom:copyright
+ makedepends = cmake
+ makedepends = patch
+ makedepends = git
+ depends = libpulse
+ depends = ncurses
+ depends = rtl-sdr
+ depends = fftw
+ depends = codec2
+ depends = libsndfile
+ depends = itpp
+ depends = mbelib
+ depends = glibc
+ depends = gcc-libs
+ depends = libogg
+ depends = libvorbis
+ depends = flac
+ depends = lapack
+ depends = opus
+ depends = mpg123
+ depends = lame
+ depends = blas
+ depends = libusb
+ depends = dbus
+ depends = libxcb
+ depends = systemd-libs
+ depends = libasyncns
+ depends = libxau
+ depends = libxdmcp
+ depends = libcap
+ depends = lz4
+ depends = xz
+ depends = zstd
+ depends = libgpg-error
+ optdepends = pulseaudio: use pulse as audio input device
+ provides = dsd
+ conflicts = dsd
+ source = dsd-fme-git::git+https://github.com/lwvmobile/dsd-fme.git
+ source = change_tonewav_dir.patch
+ sha256sums = SKIP
+ sha256sums = 27ee31d00d2a474e252251828c4dc53b958dbdab34de218bfb4b638b0373b001
+
+pkgname = dsd-fme-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..87036643ee92
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,84 @@
+# Maintainer: SteamedFish <steamedfish@hotmail.com>
+# Contributor: nemanjan00 <nemanjan00@gmail.com>
+
+pkgname=dsd-fme-git
+_pkgname=dsd-fme
+pkgver=20230915.r7.g93a3145
+pkgrel=1
+pkgdesc="Digital Speech Decoder - Florida Man Edition"
+arch=('i686' 'x86_64')
+url="https://github.com/lwvmobile/dsd-fme.git"
+license=('custom:copyright')
+install="$pkgname.install"
+depends=(
+ 'libpulse'
+ 'ncurses'
+ 'rtl-sdr'
+ 'fftw'
+ 'codec2'
+ 'libsndfile'
+ 'itpp'
+ 'mbelib'
+ 'glibc'
+ 'gcc-libs'
+ 'libogg'
+ 'libvorbis'
+ 'flac'
+ 'lapack'
+ 'opus'
+ 'mpg123'
+ 'lame'
+ 'blas'
+ 'libusb'
+ 'dbus'
+ 'libxcb'
+ 'systemd-libs'
+ 'libasyncns'
+ 'libxau'
+ 'libxdmcp'
+ 'libcap'
+ 'lz4'
+ 'xz'
+ 'zstd'
+ 'libgpg-error'
+)
+optdepends=('pulseaudio: use pulse as audio input device')
+makedepends=('cmake' 'patch' 'git')
+provides=('dsd')
+conflicts=('dsd')
+source=("$pkgname::git+https://github.com/lwvmobile/$_pkgname.git" change_tonewav_dir.patch)
+sha256sums=('SKIP' '27ee31d00d2a474e252251828c4dc53b958dbdab34de218bfb4b638b0373b001')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ # use git tag or fall back to number of revisions
+ ( set -o pipefail
+ git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+prepare() {
+ cd "$srcdir/$pkgname"
+ patch -p1 < $srcdir/change_tonewav_dir.patch
+}
+
+build() {
+ cmake -B build -S "$srcdir/$pkgname" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -Wno-dev
+ make -C build
+}
+
+package() {
+ make -C build DESTDIR="$pkgdir/" install
+
+ cd "$srcdir/$pkgname"
+
+ for file in *.wav; do
+ install -Dm644 $file "$pkgdir/usr/share//$pkgname/$file"
+ done
+
+ install -Dm644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/COPYRIGHT"
+ install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/$pkgname.txt"
+}
diff --git a/change_tonewav_dir.patch b/change_tonewav_dir.patch
new file mode 100644
index 000000000000..4b555d7d1342
--- /dev/null
+++ b/change_tonewav_dir.patch
@@ -0,0 +1,19 @@
+diff --git a/src/dsd_ncurses.c b/src/dsd_ncurses.c
+index 96ab846..f498bcd 100644
+--- a/src/dsd_ncurses.c
++++ b/src/dsd_ncurses.c
+@@ -203,10 +203,10 @@ void beeper (dsd_opts * opts, dsd_state * state, int type)
+ FILE *beep;
+ char wav_name[1024] = {0};
+
+- if (opts->pulse_digi_rate_out == 8000) strncpy(wav_name, "/usr/share/tone8.wav", 1023);
+- if (opts->pulse_digi_rate_out == 48000) strncpy(wav_name, "/usr/share/tone48.wav", 1023);
+- if (opts->pulse_digi_rate_out == 24000) strncpy(wav_name, "/usr/share/tone24.wav", 1023);
+- if (opts->audio_out_type == 5) strncpy(wav_name, "/usr/share/tone24.wav", 1023);
++ if (opts->pulse_digi_rate_out == 8000) strncpy(wav_name, "/usr/share/dsd-fme/tone8.wav", 1023);
++ if (opts->pulse_digi_rate_out == 48000) strncpy(wav_name, "/usr/share/dsd-fme/tone48.wav", 1023);
++ if (opts->pulse_digi_rate_out == 24000) strncpy(wav_name, "/usr/share/dsd-fme/tone24.wav", 1023);
++ if (opts->audio_out_type == 5) strncpy(wav_name, "/usr/share/dsd-fme/tone24.wav", 1023);
+ wav_name[1023] = '\0';
+ struct stat stat_buf;
+ if (stat(wav_name, &stat_buf) == 0)
diff --git a/dsd-fme-git.install b/dsd-fme-git.install
new file mode 100644
index 000000000000..e565ee3bef71
--- /dev/null
+++ b/dsd-fme-git.install
@@ -0,0 +1,16 @@
+post_install() {
+ cat <<EOF
+
+MBELib is considered a requirement on this build.
+You must view and confirm MBELib's patent notice before using.
+The Patent Notice can be found at the site below.
+https://github.com/lwvmobile/mbelib#readme
+
+If you want to use pulse as audio input device, make sure pulseaudio is installed and running.
+Most desktop environments will automatically start pulseaudio if the package is installed.
+If you don't have any desktop environment installed, you can make sure pulseaudio will run automatically with the following command:
+systemctl --user enable --now pulseaudio.service
+Refer to https://wiki.archlinux.org/title/PulseAudio#Running for further details.
+
+EOF
+}