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.

134 lines
4.2 KiB

  1. #
  2. # Copyright (C) 2016 Velocloud Inc.
  3. # Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=modemmanager
  9. PKG_VERSION:=1.14.8
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=ModemManager-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://www.freedesktop.org/software/ModemManager
  13. PKG_HASH:=fe1a26ba51b4bda7abd09ad4dadedd87d8b8154809fc9d88e94f75fdfff19295
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/ModemManager-$(PKG_VERSION)
  15. PKG_MAINTAINER:=Nicholas Smith <nicholas.smith@telcoantennas.com.au>
  16. PKG_LICENSE:=GPL-2.0-or-later
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. define Package/modemmanager/config
  23. source "$(SOURCE)/Config.in"
  24. endef
  25. define Package/modemmanager
  26. SECTION:=net
  27. CATEGORY:=Network
  28. TITLE:=Control utility for any kind of mobile broadband modem
  29. URL:=https://www.freedesktop.org/wiki/Software/ModemManager
  30. DEPENDS:= \
  31. $(INTL_DEPENDS) \
  32. +glib2 \
  33. +dbus \
  34. +ppp \
  35. +MODEMMANAGER_WITH_MBIM:libmbim \
  36. +MODEMMANAGER_WITH_QMI:libqmi
  37. endef
  38. define Package/modemmanager/description
  39. ModemManager is a D-Bus-activated service which allows controlling mobile
  40. broadband modems. Add kernel modules for your modems as needed.
  41. Select Utilities/usb-modeswitch if needed.
  42. endef
  43. CONFIGURE_ARGS += \
  44. --without-polkit \
  45. --without-udev \
  46. --without-systemdsystemunitdir \
  47. --disable-rpath \
  48. --disable-gtk-doc
  49. ifdef CONFIG_MODEMMANAGER_WITH_MBIM
  50. CONFIGURE_ARGS += --with-mbim
  51. else
  52. CONFIGURE_ARGS += --without-mbim
  53. endif
  54. ifdef CONFIG_MODEMMANAGER_WITH_QMI
  55. CONFIGURE_ARGS += --with-qmi
  56. else
  57. CONFIGURE_ARGS += --without-qmi
  58. endif
  59. define Build/Prepare
  60. $(call Build/Prepare/Default)
  61. ( cd "$(PKG_BUILD_DIR)"; \
  62. printf "all:\ninstall:\n" >po/Makefile.in.in; \
  63. )
  64. endef
  65. define Build/InstallDev
  66. $(INSTALL_DIR) $(1)/usr/include/ModemManager
  67. $(CP) $(PKG_INSTALL_DIR)/usr/include/ModemManager/*.h $(1)/usr/include/ModemManager
  68. $(INSTALL_DIR) $(1)/usr/include/libmm-glib
  69. $(CP) $(PKG_INSTALL_DIR)/usr/include/libmm-glib/*.h $(1)/usr/include/libmm-glib
  70. $(INSTALL_DIR) $(1)/usr/lib
  71. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmm-glib.so* $(1)/usr/lib
  72. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  73. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ModemManager.pc $(1)/usr/lib/pkgconfig
  74. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mm-glib.pc $(1)/usr/lib/pkgconfig
  75. endef
  76. define Package/modemmanager/install
  77. $(INSTALL_DIR) $(1)/lib/udev/rules.d
  78. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/lib/udev/rules.d/*.rules $(1)/lib/udev/rules.d
  79. $(INSTALL_DIR) $(1)/usr/sbin
  80. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ModemManager $(1)/usr/sbin
  81. $(INSTALL_DIR) $(1)/usr/bin
  82. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mmcli $(1)/usr/bin
  83. $(INSTALL_DIR) $(1)/usr/lib
  84. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmm-glib.so.* $(1)/usr/lib
  85. $(INSTALL_DIR) $(1)/usr/lib/ModemManager
  86. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ModemManager/libmm-shared-*.so* $(1)/usr/lib/ModemManager
  87. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ModemManager/libmm-plugin-*.so* $(1)/usr/lib/ModemManager
  88. $(INSTALL_DIR) $(1)/etc/dbus-1/system.d
  89. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/org.freedesktop.ModemManager1.conf $(1)/etc/dbus-1/system.d
  90. $(INSTALL_DIR) $(1)/usr/share/dbus-1/system-services
  91. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/dbus-1/system-services/org.freedesktop.ModemManager1.service $(1)/usr/share/dbus-1/system-services
  92. $(INSTALL_DIR) $(1)/usr/share/ModemManager
  93. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ModemManager/*.conf $(1)/usr/share/ModemManager
  94. $(INSTALL_DATA) ./files/modemmanager.common $(1)/usr/share/ModemManager
  95. $(INSTALL_DIR) $(1)/etc/init.d
  96. $(INSTALL_BIN) ./files/modemmanager.init $(1)/etc/init.d/modemmanager
  97. $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
  98. $(INSTALL_DATA) ./files/25-modemmanager-usb $(1)/etc/hotplug.d/usb
  99. $(INSTALL_DIR) $(1)/etc/hotplug.d/net
  100. $(INSTALL_DATA) ./files/25-modemmanager-net $(1)/etc/hotplug.d/net
  101. $(INSTALL_DIR) $(1)/etc/hotplug.d/tty
  102. $(INSTALL_DATA) ./files/25-modemmanager-tty $(1)/etc/hotplug.d/tty
  103. $(INSTALL_DIR) $(1)/lib/netifd/proto
  104. $(INSTALL_BIN) ./files/modemmanager.proto $(1)/lib/netifd/proto/modemmanager.sh
  105. endef
  106. $(eval $(call BuildPackage,modemmanager))