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.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.34.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:=5bc2508389d9b291ca0b8d4f210d0012
  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:=+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. define Build/Compile
  34. $(MAKE) -C $(PKG_BUILD_DIR) \
  35. $(TARGET_CONFIGURE_OPTS) \
  36. LDSHARED="$(TARGET_CROSS)ld -shared" \
  37. CFLAGS="$(TARGET_CFLAGS) $(FPIC)"
  38. endef
  39. define Build/Install
  40. $(MAKE) -C $(PKG_BUILD_DIR) \
  41. DESTDIR="$(PKG_INSTALL_DIR)" \
  42. install
  43. endef
  44. define Build/InstallDev
  45. mkdir -p $(1)/usr/include
  46. $(CP) -r $(PKG_INSTALL_DIR)/usr/include/gammu $(1)/usr/include/
  47. mkdir -p $(1)/usr/lib
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} $(1)/usr/lib/
  49. endef
  50. define Package/gammu/install
  51. $(INSTALL_DIR) $(1)/usr/bin
  52. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu $(1)/usr/bin
  53. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gammu-{smsd,smsd-inject,smsd-monitor} $(1)/usr/bin
  54. $(INSTALL_DIR) $(1)/usr/lib
  55. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/lib{Gammu*,gsmsd*} $(1)/usr/lib
  56. $(INSTALL_DIR) $(1)/etc
  57. $(INSTALL_CONF) ./files/gammurc $(1)/etc/gammurc
  58. endef
  59. define Package/gammu/conffiles
  60. /etc/gammurc
  61. endef
  62. $(eval $(call BuildPackage,gammu))