Skip to content

Commit

Permalink
ready for minimization
Browse files Browse the repository at this point in the history
  • Loading branch information
jxmx committed Feb 13, 2024
1 parent 2a0aa0a commit de2e449
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 9 deletions.
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
EPOCHVER = 1:
RELVER = 3.3.0
DEBVER = 3+asl
PKGNAME = dahdi-linux

deb:
( cd .. && \
rm -f $(PKGNAME)_$(RELVER).orig.tar.tgz && \
rm -rf $(PKGNAME)-$(RELVER) && \
wget -O $(PKGNAME)_$(RELVER).orig.tar.gz \
https://github.com/asterisk/dahdi-linux/releases/download/v$(RELVER)/$(PKGNAME)-$(RELVER).tar.gz && \
tar xvfz dahdi-linux_$(RELVER).orig.tar.gz && \
cp -r dahdi-linux/debian dahdi-linux-$(RELVER) )
cd ../dahdi-linux-$(RELVER) && debuild -uc -us

debchange:
debchange -v $(EPOCHVER)$(RELVER)-$(DEBVER)
debchange -r
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@ file issues/bugs with that project from these packages.

## Building the .deb

1. Download the latest release from https://github.com/asterisk/dahdi-linux
1. Edit Makefile for the right version and release

2. Rename the file to something like `dahdi-linux_3.3.0.orig.tar.gz`. Note
the underscore and the .orig notation.
2. `make debchange`

3. Uncompress the file using `tar xvfz`

4. Copy the `debian/` directory from this project to the `dahdi-linux-3.3.0`
folder.

5. Run `dpkg-buildpackage`
3. `make deb`
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
dahdi-linux (1:3.3.0-3+asl) unstable; urgency=medium

* Skinny build

-- Jason McCormick <[email protected]> Mon, 12 Feb 2024 19:42:37 -0500

dahdi-linux (1:3.3.0-1+asl) unstable; urgency=medium

* Native Dahdi 3.3.0
Expand Down
78 changes: 78 additions & 0 deletions debian/patches/minimize-modules
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
--- dahdi-linux-3.3.0/drivers/dahdi/Kbuild.orig 2024-02-12 19:38:13.088484407 -0500
+++ dahdi-linux-3.3.0/drivers/dahdi/Kbuild 2024-02-12 19:38:42.568329105 -0500
@@ -1,17 +1,17 @@
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI) += dahdi.o
-#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DUMMY) += dahdi_dummy.o
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC) += dahdi_dynamic.o
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC_LOC) += dahdi_dynamic_loc.o
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC_ETH) += dahdi_dynamic_eth.o
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC_ETHMF) += dahdi_dynamic_ethmf.o
+obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DUMMY) += dahdi_dummy.o
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC) += dahdi_dynamic.o
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC_LOC) += dahdi_dynamic_loc.o
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC_ETH) += dahdi_dynamic_eth.o
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_DYNAMIC_ETHMF) += dahdi_dynamic_ethmf.o
obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_TRANSCODE) += dahdi_transcode.o

ifdef CONFIG_PCI
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_OCT612X) += oct612x/
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT4XXP) += wct4xxp/
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTC4XXP) += wctc4xxp/
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM24XXP) += wctdm24xxp/
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE13XP) += wcte13xp.o
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_OCT612X) += oct612x/
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCT4XXP) += wct4xxp/
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTC4XXP) += wctc4xxp/
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM24XXP) += wctdm24xxp/
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE13XP) += wcte13xp.o

ifndef HOTPLUG_FIRMWARE
ifneq (,$(filter y m,$(CONFIG_FW_LOADER)))
@@ -28,7 +28,7 @@
CFLAGS_wcte13xp-base.o += -DHOTPLUG_FIRMWARE
endif

-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE43X) += wcte43x.o
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTE43X) += wcte43x.o

wcte43x-objs := wcte43x-base.o wcxb_spi.o wcxb.o wcxb_flash.o
CFLAGS_wcte43x-base.o += -I$(src)/oct612x -I$(src)/oct612x/include -I$(src)/oct612x/octdeviceapi -I$(src)/oct612x/octdeviceapi/oct6100api
@@ -36,7 +36,7 @@
CFLAGS_wcte43x-base.o += -DHOTPLUG_FIRMWARE
endif

-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCAXX) += wcaxx.o
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCAXX) += wcaxx.o

wcaxx-objs := wcaxx-base.o wcxb_spi.o wcxb.o wcxb_flash.o
CFLAGS_wcaxx-base.o += -I$(src)/oct612x/ -I$(src)/oct612x/include -I$(src)/oct612x/octdeviceapi -I$(src)/oct612x/octdeviceapi/oct6100api
@@ -44,20 +44,20 @@
CFLAGS_wcaxx-base.o += -DHOTPLUG_FIRMWARE
endif

-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM) += wctdm.o
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_VOICEBUS) += voicebus/
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCB4XXP) += wcb4xxp/
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCTDM) += wctdm.o
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_VOICEBUS) += voicebus/
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCB4XXP) += wcb4xxp/


endif

-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPP) += xpp/
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPP) += xpp/

-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_JPAH) += dahdi_echocan_jpah.o
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_STEVE) += dahdi_echocan_sec.o
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_STEVE2) += dahdi_echocan_sec2.o
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_KB1) += dahdi_echocan_kb1.o
-obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_MG2) += dahdi_echocan_mg2.o
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_JPAH) += dahdi_echocan_jpah.o
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_STEVE) += dahdi_echocan_sec.o
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_STEVE2) += dahdi_echocan_sec2.o
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_KB1) += dahdi_echocan_kb1.o
+#obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_MG2) += dahdi_echocan_mg2.o

obj-m += $(DAHDI_MODULES_EXTRA)

1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#version.patch
no_firmware_download
minimize-modules

0 comments on commit de2e449

Please sign in to comment.