net/chan-sccp-b: version bump and fixes

- Bump to revision 6728.
- Remove '-fi' from PKG_FIXUP. Trust in the build system to do the right
  thing.
- Set PKG_INSTALL:=1 so "make install" doesn't need to be called
  manually anymore. This also drops LOW_MEMORY from CFLAGS, which is not
  needed as chan-sccp-b looks into asterisk's headers to find out if
  LOW_MEMORY is enabled or not.
  The build output actually looks much more pleasant afterward.
- Disable chan-sccp-b's optimization which it enables by default. It
  sets -O3 and all that jazz. To make it simply use the OpenWrt/LEDE
  flags optimization needs to be disabled.
- With optimization disabled chan-sccp-b still adds -Og to the end of
  the CFLAGS. Add a small patch to prevent that.
- Disable debug which is enabled by default. This brings down the size
  of the installed binary from 14 MByte (!) to a little over 2 MByte
  (checked on ARM).

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
Sebastian Kemper 2017-07-28 22:01:49 +02:00
parent 0a193b2af4
commit e1ce116eea
2 changed files with 18 additions and 10 deletions

View file

@ -9,9 +9,9 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=chan-sccp-b PKG_NAME:=chan-sccp-b
PKG_REV:=6647 PKG_REV:=6728
PKG_VERSION:=v4.2.3-r$(PKG_REV) PKG_VERSION:=v4.2.3-r$(PKG_REV)
PKG_RELEASE:=2 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://svn.code.sf.net/p/chan-sccp-b/code/branches/v4.2 PKG_SOURCE_URL:=http://svn.code.sf.net/p/chan-sccp-b/code/branches/v4.2
@ -19,12 +19,14 @@ PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV) PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_PROTO:=svn PKG_SOURCE_PROTO:=svn
PKG_FIXUP:=autoreconf -fi PKG_FIXUP:=autoreconf
PKG_LICENSE:=GPL-1.0 PKG_LICENSE:=GPL-1.0
PKG_LICENSE_FILES:=COPYING LICENSE PKG_LICENSE_FILES:=COPYING LICENSE
PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu> PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
define Package/chan-sccp-b/Default define Package/chan-sccp-b/Default
@ -59,6 +61,8 @@ Package/asterisk11-chan-sccp-b/description = $(Package/description/Default)
Package/asterisk13-chan-sccp-b/description = $(Package/description/Default) Package/asterisk13-chan-sccp-b/description = $(Package/description/Default)
CONFIGURE_ARGS += \ CONFIGURE_ARGS += \
--enable-debug=no \
--enable-optimization=no \
--enable-conference \ --enable-conference \
--enable-advanced-functions \ --enable-advanced-functions \
--enable-video --enable-video
@ -82,13 +86,6 @@ endef
Package/asterisk11-chan-sccp-b/conffiles = $(Package/conffiles/Default) Package/asterisk11-chan-sccp-b/conffiles = $(Package/conffiles/Default)
Package/asterisk13-chan-sccp-b/conffiles = $(Package/conffiles/Default) Package/asterisk13-chan-sccp-b/conffiles = $(Package/conffiles/Default)
define Build/Compile
$(MAKE) -C "$(PKG_BUILD_DIR)" \
CFLAGS="$(CFLAGS) -I$(PKG_BUILD_DIR)/src -DLOW_MEMORY" \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install
endef
define Package/Install/Default define Package/Install/Default
$(INSTALL_DIR) $(1)/etc/asterisk $(INSTALL_DIR) $(1)/etc/asterisk
$(CP) ./files/sccp.conf $(1)/etc/asterisk/sccp.conf $(CP) ./files/sccp.conf $(1)/etc/asterisk/sccp.conf

View file

@ -0,0 +1,11 @@
--- a/autoconf/extra.m4
+++ b/autoconf/extra.m4
@@ -501,7 +501,7 @@ AC_DEFUN([CS_ENABLE_OPTIMIZATION], [
])
;;
esac
- CFLAGS_saved="${CFLAGS_saved} ${optimize_flag} "
+ CFLAGS_saved="${CFLAGS_saved} "
])
AS_IF([test "X${enable_debug}" == "Xyes"], [