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.

140 lines
4.5 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.12.10
  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:=b2b3058bbb72adf98b24707fdbebe58e590644a38145e30d574f685f154bf8aa
  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_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. PKG_BUILD_PARALLEL:=1
  21. PKG_BUILD_DEPENDS:=glib2/host libxslt/host
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/nls.mk
  24. define Package/modemmanager/config
  25. source "$(SOURCE)/Config.in"
  26. endef
  27. define Package/modemmanager
  28. SECTION:=net
  29. CATEGORY:=Network
  30. TITLE:=Control utility for any kind of mobile broadband modem
  31. URL:=https://www.freedesktop.org/wiki/Software/ModemManager
  32. DEPENDS:= \
  33. $(INTL_DEPENDS) \
  34. +glib2 \
  35. +dbus \
  36. +ppp \
  37. +MODEMMANAGER_WITH_MBIM:libmbim \
  38. +MODEMMANAGER_WITH_QMI:libqmi
  39. endef
  40. define Package/modemmanager/description
  41. ModemManager is a D-Bus-activated service which allows controlling mobile
  42. broadband modems. Add kernel modules for your modems as needed.
  43. Select Utilities/usb-modeswitch if needed.
  44. endef
  45. CONFIGURE_ARGS += \
  46. --without-polkit \
  47. --without-udev \
  48. --without-systemdsystemunitdir \
  49. --disable-rpath \
  50. --disable-gtk-doc
  51. ifdef CONFIG_MODEMMANAGER_WITH_MBIM
  52. CONFIGURE_ARGS += --with-mbim
  53. else
  54. CONFIGURE_ARGS += --without-mbim
  55. endif
  56. ifdef CONFIG_MODEMMANAGER_WITH_QMI
  57. CONFIGURE_ARGS += --with-qmi
  58. else
  59. CONFIGURE_ARGS += --without-qmi
  60. endif
  61. define Build/Prepare
  62. $(call Build/Prepare/Default)
  63. ( cd "$(PKG_BUILD_DIR)"; \
  64. printf "all:\ninstall:\n" >po/Makefile.in.in; \
  65. )
  66. $(SED) 's|^\(GLIB_MKENUMS\)=.*|\1=$(STAGING_DIR_HOSTPKG)/bin/glib-mkenums|' \
  67. $(PKG_BUILD_DIR)/configure.ac
  68. $(SED) 's|^\(GDBUS_CODEGEN\)=.*|\1=$(STAGING_DIR_HOSTPKG)/bin/gdbus-codegen|' \
  69. $(PKG_BUILD_DIR)/configure.ac
  70. endef
  71. define Build/InstallDev
  72. $(INSTALL_DIR) $(1)/usr/include/ModemManager
  73. $(CP) $(PKG_INSTALL_DIR)/usr/include/ModemManager/*.h $(1)/usr/include/ModemManager
  74. $(INSTALL_DIR) $(1)/usr/include/libmm-glib
  75. $(CP) $(PKG_INSTALL_DIR)/usr/include/libmm-glib/*.h $(1)/usr/include/libmm-glib
  76. $(INSTALL_DIR) $(1)/usr/lib
  77. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmm-glib.so* $(1)/usr/lib
  78. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  79. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ModemManager.pc $(1)/usr/lib/pkgconfig
  80. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mm-glib.pc $(1)/usr/lib/pkgconfig
  81. endef
  82. define Package/modemmanager/install
  83. $(INSTALL_DIR) $(1)/lib/udev/rules.d
  84. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/lib/udev/rules.d/*.rules $(1)/lib/udev/rules.d
  85. $(INSTALL_DIR) $(1)/usr/sbin
  86. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ModemManager $(1)/usr/sbin
  87. $(INSTALL_DIR) $(1)/usr/bin
  88. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mmcli $(1)/usr/bin
  89. $(INSTALL_DIR) $(1)/usr/lib
  90. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmm-glib.so.* $(1)/usr/lib
  91. $(INSTALL_DIR) $(1)/usr/lib/ModemManager
  92. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ModemManager/libmm-shared-*.so* $(1)/usr/lib/ModemManager
  93. $(CP) $(PKG_INSTALL_DIR)/usr/lib/ModemManager/libmm-plugin-*.so* $(1)/usr/lib/ModemManager
  94. $(INSTALL_DIR) $(1)/etc/dbus-1/system.d
  95. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/org.freedesktop.ModemManager1.conf $(1)/etc/dbus-1/system.d
  96. $(INSTALL_DIR) $(1)/usr/share/dbus-1/system-services
  97. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/dbus-1/system-services/org.freedesktop.ModemManager1.service $(1)/usr/share/dbus-1/system-services
  98. $(INSTALL_DIR) $(1)/usr/share/ModemManager
  99. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ModemManager/*.conf $(1)/usr/share/ModemManager
  100. $(INSTALL_DATA) ./files/modemmanager.common $(1)/usr/share/ModemManager
  101. $(INSTALL_DIR) $(1)/etc/init.d
  102. $(INSTALL_BIN) ./files/modemmanager.init $(1)/etc/init.d/modemmanager
  103. $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
  104. $(INSTALL_DATA) ./files/25-modemmanager-usb $(1)/etc/hotplug.d/usb
  105. $(INSTALL_DIR) $(1)/etc/hotplug.d/net
  106. $(INSTALL_DATA) ./files/25-modemmanager-net $(1)/etc/hotplug.d/net
  107. $(INSTALL_DIR) $(1)/etc/hotplug.d/tty
  108. $(INSTALL_DATA) ./files/25-modemmanager-tty $(1)/etc/hotplug.d/tty
  109. $(INSTALL_DIR) $(1)/lib/netifd/proto
  110. $(INSTALL_BIN) ./files/modemmanager.proto $(1)/lib/netifd/proto/modemmanager.sh
  111. endef
  112. $(eval $(call BuildPackage,modemmanager))