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.

77 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_MAINTAINER:=Vitaly Protsko <villy@sft.ru>
  16. PKG_LICENCE:=GPL-2.0
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/nls.mk
  19. define Package/gammu
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. TITLE:=Cell phone/modem SMS and control tool
  23. URL:=http://dl.cihar.com/gammu/releases/
  24. DEPENDS:=+libpthread +libcurl +glib2 $(ICONV_DEPENDS) $(INTL_DEPENDS)
  25. DEPENDS+=+PACKAGE_python:python +PACKAGE_bluez-libs:bluez-libs
  26. DEPENDS+=+PACKAGE_libmysqlclient:libmysqlclient +PACKAGE_unixodbc:unixodbc
  27. DEPENDS+=+PACKAGE_libusb-1.0:libusb-1.0
  28. endef
  29. CONFIGURE_ARGS:= \
  30. --prefix=/usr \
  31. --cross-root="$(STAGING_DIR) $(TOOLCHAIN_DIR)" \
  32. --enable-shared \
  33. --without-libdbi \
  34. define Build/Compile
  35. $(MAKE) -C $(PKG_BUILD_DIR) \
  36. $(TARGET_CONFIGURE_OPTS) \
  37. LDSHARED="$(TARGET_CROSS)ld -shared" \
  38. CFLAGS="$(TARGET_CFLAGS) $(FPIC)"
  39. endef
  40. define Build/Install
  41. $(MAKE) -C $(PKG_BUILD_DIR) \
  42. DESTDIR="$(PKG_INSTALL_DIR)" \
  43. install
  44. endef
  45. define Build/InstallDev
  46. mkdir -p $(1)/usr/include
  47. $(CP) -r $(PKG_INSTALL_DIR)/usr/include/gammu $(1)/usr/include/
  48. mkdir -p $(1)/usr/lib
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} $(1)/usr/lib/
  50. endef
  51. define Package/gammu/install
  52. $(INSTALL_DIR) $(1)/usr/bin
  53. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu $(1)/usr/bin
  54. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu-{smsd,smsd-inject,smsd-monitor} $(1)/usr/bin
  55. $(INSTALL_DIR) $(1)/usr/lib
  56. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} $(1)/usr/lib
  57. $(INSTALL_DIR) $(1)/etc/init.d
  58. $(INSTALL_DIR) $(1)/etc/config
  59. $(INSTALL_CONF) ./files/smsd $(1)/etc/config/smsd
  60. $(INSTALL_BIN) ./files/smsd.init $(1)/etc/init.d/smsd
  61. endef
  62. define Package/gammu/conffiles
  63. /etc/config/smsd
  64. endef
  65. $(eval $(call BuildPackage,gammu))