Skip to content

Commit

Permalink
rpt_install.sh: Fix broken Makefile patches. (#438)
Browse files Browse the repository at this point in the history
* Recreate patches, since the channels patch fails with Asterisk 21
  due to a change within the patch context.
* Update install command to include --alsa, which is required.
  • Loading branch information
InterLinked1 authored Jan 11, 2025
1 parent 15141ab commit 604328d
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 31 deletions.
27 changes: 0 additions & 27 deletions Makefiles.diff

This file was deleted.

8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ Step 1: Install DAHDI and Asterisk

```
cd /usr/src && wget https://docs.phreaknet.org/script/phreaknet.sh && chmod +x phreaknet.sh && ./phreaknet.sh make
phreaknet install -d -b -v 20 # install in developer mode (for backtraces and assertions), add -s for chan_sip (if you need it still) and DAHDI (required)
phreaknet install --alsa --d -b -v 20` # install in developer mode (for backtraces and assertions), add -s for chan_sip (if you need it still) and DAHDI (required)
```

The critical flags here are `--alsa`, which adds ALSA support to the build system (required for `chan_simpleusb` and `chan_usbradio` to build) and `-d`, to install DAHDI.

Step 2: Install app_rpt modules

- Clone this repo into `/usr/src` on your system: `cd /usr/src; git clone https://github.com/AllStarLink/app_rpt.git`
Expand All @@ -60,7 +62,9 @@ If you want to manually install app_rpt et al., here is how:

### Compiling

Add this near the bottom of `apps/Makefile`:
First, detection of the ALSA library needs to be readded to the build system, by applying the following patch: https://github.com/InterLinked1/phreakscript/blob/master/patches/alsa.diff

Then, add this near the bottom of `apps/Makefile`:

`$(call MOD_ADD_C,app_rpt,$(wildcard app_rpt/rpt_*.c))`

Expand Down
13 changes: 13 additions & 0 deletions apps/Makefile.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/apps/Makefile b/apps/Makefile
index 50b3fccc8f..207a568933 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -49,6 +49,8 @@ include $(ASTTOPDIR)/Makefile.moddir_rules

$(call MOD_ADD_C,app_confbridge,$(wildcard confbridge/*.c))

+$(call MOD_ADD_C,app_rpt,$(wildcard app_rpt/rpt_*.c))
+
app_confbridge.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
app_meetme.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
app_minivm.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
14 changes: 14 additions & 0 deletions channels/Makefile.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/channels/Makefile b/channels/Makefile
index 0f8d1328c5..c9523f6d69 100644
--- a/channels/Makefile
+++ b/channels/Makefile
@@ -22,6 +22,9 @@ include $(ASTTOPDIR)/Makefile.moddir_rules
$(call MOD_ADD_C,chan_iax2,$(wildcard iax2/*.c))
iax2/parser.o: _ASTCFLAGS+=$(call get_menuselect_cflags,MALLOC_DEBUG)

+chan_simpleusb.so: LIBS+=-lusb -lasound
+chan_usbradio.so: LIBS+=-lusb -lasound
+
$(call MOD_ADD_C,chan_pjsip,$(wildcard pjsip/*.c))
$(call MOD_ADD_C,chan_dahdi,$(wildcard dahdi/*.c) sig_analog.c sig_pri.c sig_ss7.c)

7 changes: 5 additions & 2 deletions rpt_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ apt-get install -y libusb-dev # chan_simpleusb and chan_usbradio require libusb-
modprobe snd-pcm-oss # /dev/dsp1 needs to exist for chan_simpleusb and chan_usbradio to work
echo "snd-pcm-oss" >> /etc/modules # load module at startup for USB

cp ../$MYDIR/Makefiles.diff /tmp/rpt.diff
git apply /tmp/rpt.diff
cp ../$MYDIR/apps/Makefile.diff /tmp/app_Makefile.diff
git apply /tmp/app_Makefile.diff

cp ../$MYDIR/channels/Makefile.diff /tmp/channels_Makefile.diff
git apply /tmp/channels_Makefile.diff

cp ../$MYDIR/utils/Makefile.diff /tmp/utils_makefile.diff
git apply /tmp/utils_makefile.diff
Expand Down

0 comments on commit 604328d

Please sign in to comment.