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.

73 lines
2.0 KiB

  1. #
  2. # Copyright (C) 2006-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:=gammu
  9. PKG_VERSION:=1.33.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_URL:=http://dl.cihar.com/gammu/releases/
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_MD5SUM:=66b95afbde3085168c4a20266e8cb5c0
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  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:=@BUILD_NLS +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. endef
  28. CONFIGURE_ARGS:= \
  29. --prefix=/usr \
  30. --cross-root="$(STAGING_DIR) $(TOOLCHAIN_DIR)" \
  31. --enable-shared
  32. define Build/Compile
  33. $(MAKE) -C $(PKG_BUILD_DIR) \
  34. $(TARGET_CONFIGURE_OPTS) \
  35. LDSHARED="$(TARGET_CROSS)ld -shared" \
  36. CFLAGS="$(TARGET_CFLAGS) $(FPIC)"
  37. endef
  38. define Build/Install
  39. $(MAKE) -C $(PKG_BUILD_DIR) \
  40. DESTDIR="$(PKG_INSTALL_DIR)" \
  41. install
  42. endef
  43. define Build/InstallDev
  44. mkdir -p $(1)/usr/include
  45. $(CP) -r $(PKG_INSTALL_DIR)/usr/include/gammu $(1)/usr/include/
  46. mkdir -p $(1)/usr/lib
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} $(1)/usr/lib/
  48. endef
  49. define Package/gammu/install
  50. $(INSTALL_DIR) $(1)/usr/bin
  51. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu $(1)/usr/bin
  52. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu-{smsd,smsd-inject,smsd-monitor} $(1)/usr/bin
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} $(1)/usr/lib
  55. $(INSTALL_DIR) $(1)/etc
  56. $(INSTALL_BIN) ./files/gammurc $(1)/etc/gammurc
  57. endef
  58. define Package/gammu/conffiles
  59. /etc/gammurc
  60. endef
  61. $(eval $(call BuildPackage,gammu))