aboutsummaryrefslogtreecommitdiffstats
path: root/main/dahdi-linux
diff options
context:
space:
mode:
Diffstat (limited to 'main/dahdi-linux')
-rw-r--r--main/dahdi-linux/APKBUILD20
-rw-r--r--main/dahdi-linux/wget-tar.patch29
2 files changed, 39 insertions, 10 deletions
diff --git a/main/dahdi-linux/APKBUILD b/main/dahdi-linux/APKBUILD
index 394432befa..05950dcd88 100644
--- a/main/dahdi-linux/APKBUILD
+++ b/main/dahdi-linux/APKBUILD
@@ -9,12 +9,11 @@ url="http://www.asterisk.org"
arch="noarch"
license="GPL"
depends=
-# we need wget and tar because make install downloads firmware and uses fancy
-# options for tar and wget.
-makedepends="wget tar"
+makedepends=
install=
subpackages="$pkgname-dev"
-source="http://downloads.digium.com/pub/telephony/dahdi-linux/releases/$pkgname-$pkgver.tar.gz"
+source="http://downloads.digium.com/pub/telephony/dahdi-linux/releases/$pkgname-$pkgver.tar.gz
+ wget-tar.patch"
# We online install the firmwares in this package since those are common for all
# kernel flavors. We also install the headers for the -dev package.
@@ -22,10 +21,10 @@ source="http://downloads.digium.com/pub/telephony/dahdi-linux/releases/$pkgname-
# The kernel drivers themselves are built from separate build recipe.
prepare() {
cd "$srcdir"/$pkgname-$pkgver
- for i in ../*.patch ../*.diff; do
- [ -f "$i" ] || continue
- msg "Applying $i"
- patch -p1 < $i || return 1;
+ for i in $source; do
+ case $i in
+ *.patch|*.diff) patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
done
}
@@ -35,8 +34,9 @@ build() {
package() {
cd "$srcdir"/$pkgname-$pkgver
- make DESTDIR="$pkgdir" HOTPLUG_FIRMWARE=yes \
+ make -j1 DESTDIR="$pkgdir" HOTPLUG_FIRMWARE=yes \
install-include install-firmware
}
-md5sums="037afa01dfde872c6b4864699483e199 dahdi-linux-2.5.0.2.tar.gz"
+md5sums="037afa01dfde872c6b4864699483e199 dahdi-linux-2.5.0.2.tar.gz
+d72ac3aab69c427d69f657287c5d8475 wget-tar.patch"
diff --git a/main/dahdi-linux/wget-tar.patch b/main/dahdi-linux/wget-tar.patch
new file mode 100644
index 0000000000..ca3ebfa35d
--- /dev/null
+++ b/main/dahdi-linux/wget-tar.patch
@@ -0,0 +1,29 @@
+--- ./drivers/dahdi/firmware/Makefile.orig
++++ ./drivers/dahdi/firmware/Makefile
+@@ -60,7 +60,7 @@
+
+ # If "fetch" is used, --continue is not a valid option.
+ ifeq ($(WGET),wget)
+-WGET_ARGS:=--continue
++WGET_ARGS:=-c
+ endif
+
+ all: $(FIRMWARE)
+@@ -82,7 +82,7 @@
+ echo "Attempting to download $@"; \
+ if test ! -f $@; then $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi; \
+ if test ! -f $@; then exit 1; fi; \
+- (cat $@ | gzip -d | tar --no-same-owner -xf -) \
++ (cat $@ | gzip -d | tar -xf -) \
+ fi
+
+ firmware-loaders: $(FWLOADERS)
+@@ -91,7 +91,7 @@
+ dahdi-fwload-vpmadt032-$(VPMADT032_VERSION).tar.gz:
+ @if test ! -f $@; then echo "Attempting to download $@"; $(DOWNLOAD) $(WGET_ARGS) $(FIRMWARE_URL)/$@; fi; \
+ if test ! -f $@; then exit 1; fi; \
+- (cd ../../..; cat drivers/dahdi/firmware/$@ | gzip -d | tar --no-same-owner -xf -)
++ (cd ../../..; cat drivers/dahdi/firmware/$@ | gzip -d | tar -xf -)
+
+ # Create object files suitable for linking against
+ object-build: $(FIRMWARE) $(OBJECT_FILES)