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) 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.39.0
  11. PKG_RELEASE:=1
  12. PKG_SOURCE_URL:=https://dl.cihar.com/gammu/releases
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  14. PKG_HASH:=66d1d991d7a993fdf254d4c425f0fdd38c9cca15b1735936695a486067a6a9f8
  15. PKG_MAINTAINER:=Vitaly Protsko <villy@sft.ru>
  16. PKG_LICENCE:=GPL-2.0
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/nls.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. define Package/gammu
  23. SECTION:=utils
  24. CATEGORY:=Utilities
  25. TITLE:=Cell phone/modem SMS and control tool
  26. URL:=https://wammu.eu/gammu/
  27. DEPENDS:=+libpthread +libcurl +glib2 $(ICONV_DEPENDS) $(INTL_DEPENDS)
  28. DEPENDS+=+PACKAGE_python:python +PACKAGE_bluez-libs:bluez-libs
  29. DEPENDS+=+PACKAGE_libmariadb:libmariadb +PACKAGE_unixodbc:unixodbc +PACKAGE_libpq:libpq
  30. DEPENDS+=+PACKAGE_libusb-1.0:libusb-1.0
  31. endef
  32. CMAKE_OPTIONS += -DWITH_LibDBI:BOOL=OFF
  33. ifneq ($(INTL_FULL),)
  34. CMAKE_OPTIONS += -DLIBINTL_INCLUDE_DIRS:PATH=$(INTL_PREFIX)/include
  35. CMAKE_OPTIONS += -DLIBINTL_LIBRARIES:STRING=intl
  36. endif
  37. ifneq ($(ICONV_FULL),)
  38. CMAKE_OPTIONS += -DDISABLE_ICONV=OFF
  39. CMAKE_OPTIONS += -DICONV_INCLUDE_DIRS:PATH=$(ICONV_PREFIX)/include
  40. CMAKE_OPTIONS += -DICONV_LIBRARIES:STRING=iconv
  41. endif
  42. define Build/InstallDev
  43. mkdir -p $(1)/usr/include
  44. $(CP) $(PKG_INSTALL_DIR)/usr/include/gammu $(1)/usr/include/
  45. mkdir -p $(1)/usr/lib
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib$(LIB_SUFFIX)/lib{Gammu*,gsmsd*} $(1)/usr/lib/
  47. endef
  48. define Package/gammu/install
  49. $(INSTALL_DIR) $(1)/usr/bin
  50. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu $(1)/usr/bin
  51. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu-{smsd,smsd-inject,smsd-monitor} $(1)/usr/bin
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib$(LIB_SUFFIX)/lib{Gammu*,gsmsd*} $(1)/usr/lib
  54. $(INSTALL_DIR) $(1)/etc/init.d
  55. $(INSTALL_DIR) $(1)/etc/config
  56. $(INSTALL_CONF) ./files/gammu $(1)/etc/config/gammu
  57. $(INSTALL_BIN) ./files/gammu.init $(1)/etc/init.d/gammu
  58. endef
  59. define Package/gammu/conffiles
  60. /etc/config/gammu
  61. endef
  62. $(eval $(call BuildPackage,gammu))