summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Thill2006-12-30 16:23:02 +0000
committerNicolas Thill2006-12-30 16:23:02 +0000
commit61576baefcd04d1a3dffe0b936918aa7a18a8d2c (patch)
tree8f2a90da6b7bfdd0faaf421aa008c68ae0c41f42
parent027e5d5fa3e56e12c182c9e8fc3aaa9f569787d6 (diff)
downloadarchive-61576baefcd04d1a3dffe0b936918aa7a18a8d2c.tar.gz
add zaptel-libtonezone (closes: #1095), thanks to zandbelt
SVN-Revision: 5936
-rw-r--r--libs/zaptel/Makefile70
-rw-r--r--libs/zaptel/patches/110-Makefile-tonezone_install.patch19
2 files changed, 89 insertions, 0 deletions
diff --git a/libs/zaptel/Makefile b/libs/zaptel/Makefile
new file mode 100644
index 0000000000..2f64aad857
--- /dev/null
+++ b/libs/zaptel/Makefile
@@ -0,0 +1,70 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=zaptel
+PKG_VERSION:=1.2.12
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://ftp.digium.com/pub/zaptel/releases/ ftp://ftp.digium.com/pub/zaptel/releases/
+PKG_MD5SUM:=99b9f86556b903a32607b2751f920513
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/zaptel/Default
+ SECTION:=libs
+ CATEGORY:=Libraries
+ URL:=http://ftp.digium.com/pub/zaptel/releases
+endef
+
+define Package/zaptel-libtonezone
+ $(call Package/zaptel/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Zaptel tonezone library.
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ $(TARGET_CONFIGURE_OPTS) \
+ HOSTCC="$(HOSTCC)" \
+ CFLAGS="$(TARGET_CFLAGS) -I. -DBUILDING_TONEZONE" \
+ KSRC="$(LINUX_DIR)" \
+ DESTDIR="$(PKG_INSTALL_DIR)" \
+ install-tonezone
+endef
+
+define Build/InstallDev
+ mkdir -p $(STAGING_DIR)/usr/include/linux
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/linux/zaptel.h $(STAGING_DIR)/usr/include/linux/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/tonezone.h $(STAGING_DIR)/usr/include/
+ mkdir -p $(STAGING_DIR)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so* $(STAGING_DIR)/usr/lib/
+endef
+
+define Build/UninstallDev
+ rm -rf $(STAGING_DIR)/usr/include/linux/zaptel.h
+ rm -rf $(STAGING_DIR)/usr/include/tonezone.h
+ rm -rf $(STAGING_DIR)/usr/lib/libtonezone.so*
+endef
+
+define Package/zaptel-libtonezone/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so.* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,zaptel-libtonezone))
diff --git a/libs/zaptel/patches/110-Makefile-tonezone_install.patch b/libs/zaptel/patches/110-Makefile-tonezone_install.patch
new file mode 100644
index 0000000000..778cf0f9d4
--- /dev/null
+++ b/libs/zaptel/patches/110-Makefile-tonezone_install.patch
@@ -0,0 +1,19 @@
+--- zaptel-1.2.12.org/Makefile 2006-12-07 00:22:11.000000000 +0100
++++ zaptel-1.2.12/Makefile 2006-12-23 00:12:30.000000000 +0100
+@@ -357,6 +357,16 @@
+ /sbin/update-modules ; \
+ fi
+
++install-tonezone: $(LIBTONEZONE_SO)
++ install -D -m 755 $(LIBTONEZONE_SO) $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER)
++ rm -f $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO)
++ ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
++ $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER)
++ ln -sf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) \
++ $(INSTALL_PREFIX)/usr/lib/$(LIBTONEZONE_SO)
++ install -D -m 644 zaptel.h $(INSTALL_PREFIX)/usr/include/linux/zaptel.h
++ install -D -m 644 tonezone.h $(INSTALL_PREFIX)/usr/include/tonezone.h
++
+ install-udev: devices
+
+ firmware: