You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.2 KiB

  1. #
  2. # Copyright (C) 2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=smstools3
  9. PKG_VERSION:=3.1.15
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Gérald Kerma <dreagle@doukki.net>
  12. PKG_LICENSE:=GPL-2.0
  13. PKG_LICENSE_FILES:=LICENSE
  14. PKG_BUILD_PARALLEL:=0
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  16. PKG_SOURCE_URL:=http://smstools3.kekekasvi.com/packages/
  17. PKG_MD5SUM:=0241ef60e646fac1a06254a848e61ed7
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
  19. PKG_BUILD_DEPENDS:=libiconv-full iconv
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/smstools3
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=SMS Server Tools 3
  25. DEPENDS:=+libiconv-full +iconv
  26. URL:=http://smstools3.kekekasvi.com/
  27. endef
  28. define Package/smstools3/description
  29. The SMS Server Tools 3 is a SMS Gateway software which can send and receive
  30. short messages through GSM modems and mobile phones.
  31. endef
  32. TARGET_CFLAGS = -D NUMBER_OF_MODEMS=1
  33. TARGET_CFLAGS += -D USE_ICONV
  34. TARGET_CFLAGS += -D DISABLE_INET_SOCKET
  35. TARGET_CFLAGS += -W -Wall
  36. TARGET_CFLAGS += -D_FILE_OFFSET_BITS=64
  37. TARGET_LDFLAGS += -liconv
  38. BINDIR=/usr/local/bin
  39. define Build/Compile
  40. $(MAKE) -C "$(PKG_BUILD_DIR)"/src \
  41. CC="$(TARGET_CC)" \
  42. USER_CFLAGS='$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS) \
  43. -I"$(STAGING_DIR)/usr/lib/libiconv-full/include"' \
  44. USER_LDFLAGS='$(TARGET_LFLAGS) $(EXTRA_LDFLAGS) -L"$(STAGING_DIR)/usr/lib/libiconv-full/lib"' \
  45. all
  46. endef
  47. define Package/smstools3/install
  48. $(INSTALL_DIR) $(1)/$(BINDIR)
  49. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/smsd $(1)/$(BINDIR)/smsd
  50. $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/sendsms $(1)/$(BINDIR)/sendsms
  51. $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/sms2html $(1)/$(BINDIR)/sms2html
  52. $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/sms2unicode $(1)/$(BINDIR)/sms2unicode
  53. $(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/unicode2sms $(1)/$(BINDIR)/unicode2sms
  54. $(INSTALL_DIR) $(1)/etc/init.d
  55. $(INSTALL_DATA) -m 0755 ./files/smstools3.init $(1)/etc/init.d/smstools3
  56. $(INSTALL_DIR) $(1)/etc
  57. $(INSTALL_DATA) -m 0755 ./files/smstools3.conf $(1)/etc/smsd.conf
  58. endef
  59. $(eval $(call BuildPackage,smstools3))