[packages] zaptel-1.4.x: split builds of kernel & userland stuff, use $(CP) instead of $(INSTALL_DATA) for shared library, bump release number

git-svn-id: svn://svn.openwrt.org/openwrt/packages@14352 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2009-02-02 13:39:24 +00:00
parent 65a23d17a7
commit 42db38ce99

View File

@ -1,17 +1,17 @@
# #
# Copyright (C) 2006 OpenWrt.org # Copyright (C) 2006-2009 OpenWrt.org
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
# #
# $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $ # $Id$
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=zaptel PKG_NAME:=zaptel
PKG_VERSION:=1.4.9.2 PKG_VERSION:=1.4.9.2
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://ftp.digium.com/pub/zaptel/releases/ PKG_SOURCE_URL:=http://ftp.digium.com/pub/zaptel/releases/
@ -25,17 +25,16 @@ define Package/zaptel14/Default
endef endef
define KernelPackage/zaptel14 define KernelPackage/zaptel14
SUBMENU:=Other modules
$(call Package/zaptel14/Default) $(call Package/zaptel14/Default)
SUBMENU:=Other modules
TITLE+= (kernel module) TITLE+= (kernel module)
VERSION:=$(LINUX_VERSION)-$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
FILES:=$(PKG_BUILD_DIR)/kernel/zaptel.$(LINUX_KMOD_SUFFIX) \ FILES:=$(PKG_BUILD_DIR)/kernel/zaptel.$(LINUX_KMOD_SUFFIX) \
$(PKG_BUILD_DIR)/kernel/ztdummy.$(LINUX_KMOD_SUFFIX) $(PKG_BUILD_DIR)/kernel/ztdummy.$(LINUX_KMOD_SUFFIX)
AUTOLOAD:=$(call AutoLoad,70,zaptel ztdummy) AUTOLOAD:=$(call AutoLoad,70,zaptel ztdummy)
endef endef
define KernelPackage/zaptel14/description define KernelPackage/zaptel14/description
This package contains the Zaptel core module and ztdummy driver. This package contains the Zaptel core module and ztdummy driver.
endef endef
define Package/zaptel14-util define Package/zaptel14-util
@ -47,7 +46,7 @@ define Package/zaptel14-util
endef endef
define Package/zaptel14-util/description define Package/zaptel14-util/description
This package contains the zttest program This package contains the zttest program
endef endef
define Package/zaptel14-libtonezone define Package/zaptel14-libtonezone
@ -59,50 +58,36 @@ define Package/zaptel14-libtonezone
endef endef
define Package/zaptel14-libtonezone/description define Package/zaptel14-libtonezone/description
This package contains the libraries for accessing zaptel/dummy drivers. This package contains the libraries for accessing zaptel/dummy drivers.
endef endef
define Build/Compile/zaptel14-template define Build/Compile/kmod
$(MAKE) -C $(PKG_BUILD_DIR) \ $(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \ ARCH="$(LINUX_KARCH)" \
ARCH="$(LINUX_KARCH)" \ CROSS_COMPILE="$(TARGET_CROSS)" \
LD="$(TARGET_CROSS)ld" \
AR="$(TARGET_CROSS)ar" \
HOSTCC="$(HOSTCC)" \
DEB_HOST_GNU_TYPE="$(ARCH)" \
KVERS="$(LINUX_VERSION)" \ KVERS="$(LINUX_VERSION)" \
KSRC="$(LINUX_DIR)" \ KSRC="$(LINUX_DIR)" \
$(1)
endef
define Build/Compile/zaptel14
$(call Build/Compile/zaptel14-template, \
CC="$(KERNEL_CC)" \
KFLAGS_PPC="-G 0 -mno-abicalls -fno-pic -pipe -finline-limit=100000 -mabi=32 $(TARGET_CFLAGS) -mlong-calls -fno-common -nostdinc -iwithprefix include" \
TOPDIR_MODULES="zaptel ztdummy" \ TOPDIR_MODULES="zaptel ztdummy" \
SUBDIR_MODULES="" \ SUBDIR_MODULES="" \
modules zttest \ modules
)
endef endef
define Build/Compile/zaptel14-libtonezone define Build/Compile/user
$(call Build/Compile/zaptel14-template, \ $(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" \ DESTDIR="$(PKG_INSTALL_DIR)" \
install-libs install-include \ install-libs install-include zttest
)
endef endef
define Build/Compile define Build/Compile
$(call Build/Compile/zaptel14) $(call Build/Compile/kmod)
$(call Build/Compile/zaptel14-libtonezone) $(call Build/Compile/user)
endef endef
define Build/InstallDev define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/zaptel/ $(INSTALL_DIR) $(STAGING_DIR)/usr/include
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/zaptel/zaptel.h $(STAGING_DIR)/usr/include/zaptel/ $(CP) $(PKG_INSTALL_DIR)/usr/include/zaptel $(STAGING_DIR)/usr/include/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/zaptel/tonezone.h $(STAGING_DIR)/usr/include/zaptel/ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
$(INSTALL_DIR) $(STAGING_DIR)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.* $(STAGING_DIR)/usr/lib/
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libtonezone* $(STAGING_DIR)/usr/lib/
endef endef
define Package/zaptel14-util/install define Package/zaptel14-util/install
@ -112,7 +97,7 @@ endef
define Package/zaptel14-libtonezone/install define Package/zaptel14-libtonezone/install
$(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so.* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so.* $(1)/usr/lib/
endef endef
$(eval $(call KernelPackage,zaptel14)) $(eval $(call KernelPackage,zaptel14))