summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteamedFish2023-12-12 17:50:13 +0800
committerSteamedFish2023-12-12 17:50:13 +0800
commitbc1010fd02e1f753fb100030b551eb8377dfd60a (patch)
tree77c3e9a802e108b50e71cd7ec129fbbe39308b45
downloadaur-bc1010fd02e1f753fb100030b551eb8377dfd60a.tar.gz
init commit
-rw-r--r--.SRCINFO50
-rw-r--r--PKGBUILD74
-rw-r--r--change_tonewav_dir.patch19
-rw-r--r--dsd-fme.install16
4 files changed, 159 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..fc1ff0298593
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,50 @@
+pkgbase = dsd-fme
+ pkgdesc = Digital Speech Decoder - Florida Man Edition
+ pkgver = 20230915
+ pkgrel = 1
+ url = https://github.com/lwvmobile/dsd-fme.git
+ install = dsd-fme.install
+ arch = i686
+ arch = x86_64
+ license = custom:copyright
+ makedepends = cmake
+ makedepends = patch
+ 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-20230915.tar.gz::https://github.com/lwvmobile/dsd-fme/archive/refs/tags/20230915.tar.gz
+ source = change_tonewav_dir.patch
+ sha256sums = 4092fb0e6e6b240e035993447a73c8b1a862269004eb9f1d14d41184bedc53e2
+ sha256sums = 27ee31d00d2a474e252251828c4dc53b958dbdab34de218bfb4b638b0373b001
+
+pkgname = dsd-fme
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..22f89f75a433
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,74 @@
+# Maintainer: SteamedFish <steamedfish@hotmail.com>
+# Contributor: nemanjan00 <nemanjan00@gmail.com>
+
+pkgname=dsd-fme
+pkgver=20230915
+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')
+provides=('dsd')
+conflicts=('dsd')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/lwvmobile/$pkgname/archive/refs/tags/$pkgver.tar.gz" change_tonewav_dir.patch)
+sha256sums=('4092fb0e6e6b240e035993447a73c8b1a862269004eb9f1d14d41184bedc53e2' '27ee31d00d2a474e252251828c4dc53b958dbdab34de218bfb4b638b0373b001')
+
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -p1 < $srcdir/change_tonewav_dir.patch
+}
+
+build() {
+ cmake -B build -S "$srcdir/$pkgname-$pkgver" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -Wno-dev
+ make -C build
+}
+
+package() {
+ make -C build DESTDIR="$pkgdir/" install
+
+ cd "$srcdir/$pkgname-$pkgver"
+
+ 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.install b/dsd-fme.install
new file mode 100644
index 000000000000..e565ee3bef71
--- /dev/null
+++ b/dsd-fme.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
+}