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.

78 lines
2.1 KiB

  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. # 2014-2015 Vitaly Protsko
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=gammu
  10. PKG_VERSION:=1.34.0
  11. PKG_RELEASE:=1
  12. PKG_SOURCE_URL:=http://dl.cihar.com/gammu/releases/
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  14. PKG_MD5SUM:=5bc2508389d9b291ca0b8d4f210d0012
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_MAINTAINER:=Vitaly Protsko <villy@sft.ru>
  17. PKG_LICENCE:=GPL-2.0
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/nls.mk
  20. define Package/gammu
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. TITLE:=Cell phone/modem SMS and control tool
  24. URL:=http://dl.cihar.com/gammu/releases/
  25. DEPENDS:=+libpthread +libcurl +glib2 $(ICONV_DEPENDS) $(INTL_DEPENDS)
  26. DEPENDS+=+PACKAGE_python:python +PACKAGE_bluez-libs:bluez-libs
  27. DEPENDS+=+PACKAGE_libmysqlclient:libmysqlclient +PACKAGE_unixodbc:unixodbc
  28. DEPENDS+=+PACKAGE_libusb-1.0:libusb-1.0
  29. endef
  30. CONFIGURE_ARGS:= \
  31. --prefix=/usr \
  32. --cross-root="$(STAGING_DIR) $(TOOLCHAIN_DIR)" \
  33. --enable-shared \
  34. --without-libdbi \
  35. define Build/Compile
  36. $(MAKE) -C $(PKG_BUILD_DIR) \
  37. $(TARGET_CONFIGURE_OPTS) \
  38. LDSHARED="$(TARGET_CROSS)ld -shared" \
  39. CFLAGS="$(TARGET_CFLAGS) $(FPIC)"
  40. endef
  41. define Build/Install
  42. $(MAKE) -C $(PKG_BUILD_DIR) \
  43. DESTDIR="$(PKG_INSTALL_DIR)" \
  44. install
  45. endef
  46. define Build/InstallDev
  47. mkdir -p $(1)/usr/include
  48. $(CP) -r $(PKG_INSTALL_DIR)/usr/include/gammu $(1)/usr/include/
  49. mkdir -p $(1)/usr/lib
  50. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} $(1)/usr/lib/
  51. endef
  52. define Package/gammu/install
  53. $(INSTALL_DIR) $(1)/usr/bin
  54. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu $(1)/usr/bin
  55. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu-{smsd,smsd-inject,smsd-monitor} $(1)/usr/bin
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} $(1)/usr/lib
  58. $(INSTALL_DIR) $(1)/etc/init.d
  59. $(INSTALL_DIR) $(1)/etc/config
  60. $(INSTALL_CONF) ./files/smsd $(1)/etc/config/smsd
  61. $(INSTALL_BIN) ./files/smsd.init $(1)/etc/init.d/smsd
  62. endef
  63. define Package/gammu/conffiles
  64. /etc/config/smsd
  65. endef
  66. $(eval $(call BuildPackage,gammu))