summaryrefslogtreecommitdiffstats
path: root/utils/fwupd/Makefile
blob: ec78687352cb1a2877ec8ea4102dfae6b4df9589 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
#
# Copyright (C) 2024 TDT AG <development@tdt.de>
#
# This is free software, licensed under the GNU General Public License v2.
# See https://www.gnu.org/licenses/gpl-2.0.txt for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=fwupd
PKG_VERSION:=2.0.1
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/fwupd/fwupd/releases/download/$(PKG_VERSION)
PKG_HASH:=04226d0c689a56cc51de017e736f18f1f5e951b9a7c1b18e3281eb923c435891

PKG_MAINTAINER:=Lukas Voegl <lvoegl@tdt.de>
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:fwupd:fwupd

PKG_BUILD_DEPENDS:= \
	glib2/host \
	python3/host \
	python-packaging/host \
	python-jinja2/host

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/meson.mk
include ../../lang/python/python3-host.mk

define Package/fwupd/Default
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=fwupd
  URL:=https://fwupd.org
  DEPENDS:= \
	+glib2 \
	+dbus \
	+libxmlb \
	+libjcat \
	+libprotobuf-c \
	+libusb-1.0 \
	+FWUPD_LIBARCHIVE:libarchive \
	+FWUPD_LIBDRM:libdrm \
	+FWUPD_CBOR:libcbor \
	+FWUPD_LZMA:liblzma \
	+FWUPD_CURL:libcurl \
	+FWUPD_PLUGIN_MODEMMANAGER:modemmanager \
	+FWUPD_PLUGIN_MODEMMANAGER:libqmi \
	+FWUPD_PLUGIN_MODEMMANAGER:libmbim
endef

define Package/fwupd/Default/description
  A simple system daemon to allow session software to easily update firmware on
  your local machine.
endef

define Package/fwupd-libs
  $(call Package/fwupd/Default)
  TITLE:=fwupd-libs
endef

define Package/fwupd-libs/description
  $(call Package/fwupd/Default/description)
  This package contains the fwupd libraries.
endef

define Package/fwupd-libs/config
  source "$(SOURCE)/Config.in"
endef

define Package/fwupd-tools
  $(call Package/fwupd/Default)
  DEPENDS:=+fwupd-libs
  TITLE:=fwupd-tools
endef

define Package/fwupd-tools/description
  $(call Package/fwupd/Default/description)
  This package contains the fwupd cli tools.
endef

define Package/fwupd-daemon
  $(call Package/fwupd/Default)
  DEPENDS:=+fwupd-libs
  TITLE:=fwupd-daemon
endef

define Package/fwupd-daemon/description
  $(call Package/fwupd/Default/description)
  This package contains the fwupd daemon.
endef

MESON_ARGS += \
	-Db_lto=true \
	-Dbuild=all \
	-Dpython=$(HOST_PYTHON3_BIN) \
	-Dsupported_build=enabled \
	-Dstatic_analysis=false \
	-Dtests=false \
	-Dmetainfo=false \
	-Dbash_completion=false \
	-Dfish_completion=false \
	-Dman=false \
	-Dconsolekit=disabled \
	-Ddocs=disabled \
	-Dintrospection=disabled \
	-Dbluez=disabled \
	-Dvendor_ids_dir=/usr/share/hwdata \
	-Dpolkit=disabled \
	-Dgnutls=disabled \
	-Dpassim=disabled \
	-Dsqlite=disabled \
	-Dudev=enabled \
	-Dplugin_acpi_phat=disabled \
	-Dplugin_amdgpu=disabled \
	-Dplugin_android_boot=disabled \
	-Dplugin_bcm57xx=disabled \
	-Dplugin_cfu=disabled \
	-Dplugin_cpu=disabled \
	-Dplugin_emmc=disabled \
	-Dplugin_ep963x=disabled \
	-Dplugin_gpio=disabled \
	-Dplugin_igsc=disabled \
	-Dplugin_kinetic_dp=disabled \
	-Dplugin_logitech_bulkcontroller=disabled \
	-Dplugin_logitech_scribe=disabled \
	-Dplugin_logitech_tap=disabled \
	-Dplugin_parade_lspcon=disabled \
	-Dplugin_pixart_rf=disabled \
	-Dplugin_realtek_mst=disabled \
	-Dplugin_synaptics_mst=disabled \
	-Dplugin_mediatek_scaler=disabled \
	-Dplugin_synaptics_rmi=disabled \
	-Dplugin_scsi=disabled \
	-Dplugin_tpm=disabled \
	-Dplugin_redfish=disabled \
	-Dplugin_uefi_capsule=disabled \
	-Dplugin_uefi_pk=disabled \
	-Dplugin_nitrokey=disabled \
	-Dplugin_nvme=disabled \
	-Dplugin_msr=disabled \
	-Dplugin_mtd=disabled \
	-Dplugin_flashrom=disabled \
	-Dplugin_intel_me=disabled \
	-Dplugin_uf2=disabled \
	-Dplugin_upower=disabled \
	-Dplugin_powerd=disabled \
	-Dsystemd=disabled \
	-Dlaunchd=disabled \
	-Delogind=disabled \
	-Dfirmware-packager=$(if $(CONFIG_FWUPD_FIRMWARE_PACKAGER),true,false) \
	-Dhsi=$(if $(CONFIG_FWUPD_HSI),enabled,disabled) \
	-Dlvfs=$(if $(CONFIG_FWUPD_LVFS),true,false) \
	-Dcbor=$(if $(CONFIG_FWUPD_CBOR),enabled,disabled) \
	-Dlzma=$(if $(CONFIG_FWUPD_LZMA),enabled,disabled) \
	-Dcurl=$(if $(CONFIG_FWUPD_CURL),enabled,disabled) \
	-Dlibarchive=$(if $(CONFIG_FWUPD_LIBARCHIVE),enabled,disabled) \
	-Dlibdrm=$(if $(CONFIG_FWUPD_LIBDRM),enabled,disabled) \
	-Dplugin_modem_manager=$(if $(CONFIG_FWUPD_PLUGIN_MODEMMANAGER),enabled,disabled) \
	-Dplugin_fastboot=$(if $(CONFIG_FWUPD_PLUGIN_FASTBOOT),enabled,disabled)

define Build/InstallDev
	$(INSTALL_DIR) $(1)/usr/include/fwupd-3
	$(CP) $(PKG_INSTALL_DIR)/usr/include/fwupd-3/fwupd.h $(1)/usr/include/fwupd-3

	$(INSTALL_DIR) $(1)/usr/include/fwupd-3/libfwupd
	$(CP) $(PKG_INSTALL_DIR)/usr/include/fwupd-3/libfwupd/*.h $(1)/usr/include/fwupd-3/libfwupd

	$(INSTALL_DIR) $(1)/usr/lib
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfwupd.so* $(1)/usr/lib

	$(INSTALL_DIR) $(1)/usr/lib/fwupd-$(PKG_VERSION)
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/fwupd-$(PKG_VERSION)/*.so* $(1)/usr/lib/fwupd-$(PKG_VERSION)

	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fwupd.pc $(1)/usr/lib/pkgconfig

	$(INSTALL_DIR) $(1)/usr/share/dbus-1/interfaces
	$(CP) $(PKG_INSTALL_DIR)/usr/share/dbus-1/interfaces/*.xml $(1)/usr/share/dbus-1/interfaces
endef

define Package/fwupd-libs/install
	$(INSTALL_DIR) $(1)/etc/fwupd
	$(CP) $(PKG_INSTALL_DIR)/etc/fwupd/fwupd.conf $(1)/etc/fwupd

	$(INSTALL_DIR) $(1)/etc/fwupd/remotes.d
	$(CP) $(PKG_INSTALL_DIR)/etc/fwupd/remotes.d/*.conf $(1)/etc/fwupd/remotes.d

	$(INSTALL_DIR) $(1)/etc/pki
	$(CP) $(PKG_INSTALL_DIR)/etc/pki/fwupd $(1)/etc/pki
	$(CP) $(PKG_INSTALL_DIR)/etc/pki/fwupd-metadata $(1)/etc/pki

	$(INSTALL_DIR) $(1)/usr/share/dbus-1/system.d
	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/dbus-1/system.d/org.freedesktop.fwupd.conf $(1)/usr/share/dbus-1/system.d

	$(INSTALL_DIR) $(1)/usr/share/fwupd
	$(CP) $(PKG_INSTALL_DIR)/usr/share/fwupd/quirks.d $(1)/usr/share/fwupd

	$(INSTALL_DIR) $(1)/usr/lib
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libfwupd.so* $(1)/usr/lib

	$(INSTALL_DIR) $(1)/usr/lib/fwupd-$(PKG_VERSION)
	$(CP) $(PKG_INSTALL_DIR)/usr/lib/fwupd-$(PKG_VERSION)/*.so* $(1)/usr/lib/fwupd-$(PKG_VERSION)
endef

define Package/fwupd-tools/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fwupdtool $(1)/usr/bin
endef

define Package/fwupd-daemon/install
	$(INSTALL_DIR) $(1)/usr/bin
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fwupdmgr $(1)/usr/bin

	$(INSTALL_DIR) $(1)/usr/libexec/fwupd
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/fwupd/fwupd $(1)/usr/libexec/fwupd

	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) ./files/etc/init.d/fwupd $(1)/etc/init.d/fwupd
endef

$(eval $(call BuildPackage,fwupd-libs))
$(eval $(call BuildPackage,fwupd-tools))
$(eval $(call BuildPackage,fwupd-daemon))