debian swirl logo

Back to the packages list dahdi-firmware

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk

FILENAME := dahdi-firmware_$(DEB_UPSTREAM_VERSION).orig.tar.gz
REAL_UPSTREAM_VER := $(shell echo $(DEB_UPSTREAM_VERSION) | sed -e 's/~rc/-rc/')
URL := http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-$(REAL_UPSTREAM_VER).tar.gz

# Beware of attempting to run a plain 'make' in the build rules here.
# If you e.g. see the package starting to download firmware, this is what
# you're doing. This package only packages some files that happen to be
# included in the tarball. The same tarball is properly built in
# dahdi-linux

drivers/dahdi/makefw: drivers/dahdi/makefw.c
		$(CC) $(CFLAGS) -Wall -Wextra -o $@ $<

drivers/dahdi/dahdi-fw-tor2.bin: drivers/dahdi/tormenta2.rbt drivers/dahdi/makefw
		drivers/dahdi/makefw $< -b > $@

drivers/dahdi/dahdi-fw-pciradio.bin: drivers/dahdi/pciradio.rbt drivers/dahdi/makefw
		drivers/dahdi/makefw $< -b > $@

build/dahdi-firmware-nonfree:: drivers/dahdi/dahdi-fw-tor2.bin drivers/dahdi/dahdi-fw-pciradio.bin

clean::
		rm -f drivers/dahdi/makefw drivers/dahdi/dahdi-fw-*.bin

get-orig-source:
		@@dh_testdir
		@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
		@@echo Downloading $(FILENAME) from $(URL) ...
		@@wget -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)

Builds:

dahdi-firmware-nonfree
dahdi non-free firmware