Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fwupd: add package #24873

Merged
merged 4 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions libs/libgudev/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#
# Copyright (C) 2024 TDT AG <[email protected]>
#
# 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:=libgudev
PKG_VERSION:=238
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNOME/libgudev/$(basename $(PKG_VERSION))
PKG_HASH:=61266ab1afc9d73dbc60a8b2af73e99d2fdff47d99544d085760e4fa667b5dd1

PKG_MAINTAINER:=Lukas Voegl <[email protected]>
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING

PKG_BUILD_DEPENDS:=glib2/host

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/meson.mk

define Package/libgudev
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libgudev
URL:=https://gitlab.gnome.org/GNOME/libgudev
DEPENDS:= \
+glib2 \
+libudev
endef

define Package/libgusb/description
libgudev is a GObject-based wrapper library providing bindings for libudev.
endef

MESON_ARGS+= \
-Db_lto=true \
-Dtests=disabled \
-Dintrospection=disabled \
-Dvapi=disabled \
-Dgtk_doc=false

define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/gudev-1.0/gudev
$(CP) $(PKG_INSTALL_DIR)/usr/include/gudev-1.0/gudev/*.h $(1)/usr/include/gudev-1.0/gudev

$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgudev-1.0.so* $(1)/usr/lib

$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/gudev-1.0.pc $(1)/usr/lib/pkgconfig
endef

define Package/libgudev/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libgudev-1.0.so* $(1)/usr/lib
endef

$(eval $(call BuildPackage,libgudev))
22 changes: 22 additions & 0 deletions libs/libjcat/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
menu "Select libjcat options"
depends on PACKAGE_libjcat

config LIBJCAT_GPG
bool "GPG"
default y
help
Compile libjcat with GPG support

config LIBJCAT_PKCS7
bool "PKCS #7"
default y
help
Compile libjcat with PKCS #7 support

config LIBJCAT_ED25519
bool "ed25519"
default n
help
Compile libjcat with ed25519 support

endmenu
83 changes: 83 additions & 0 deletions libs/libjcat/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#
# Copyright (C) 2024 TDT AG <[email protected]>
#
# 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:=libjcat
PKG_VERSION:=0.2.1
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/hughsie/libjcat/releases/download/$(PKG_VERSION)
PKG_HASH:=a6232aeca3c3fab6dbb3bed06ec3832088b49a4b278a7119558d72be60ce921f

PKG_MAINTAINER:=Lukas Voegl <[email protected]>
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=LICENSE

PKG_BUILD_DEPENDS:=glib2/host

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/meson.mk

define Package/libjcat
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libjcat
URL:=https://github.com/hughsie/libjcat
DEPENDS:= \
lvoegl marked this conversation as resolved.
Show resolved Hide resolved
+glib2 \
+json-glib \
+LIBJCAT_GPG:libgpgme \
+LIBJCAT_GPG:libgpg-error \
+LIBJCAT_PKCS7:libgnutls \
+LIBJCAT_ED25519:libgnutls \
+LIBJCAT_ED25519:libnettle
endef

define Package/libjcat/description
libjcat allows reading and writing gzip-compressed JSON catalog files,
which can be used to store GPG, PKCS-7 and SHA-256 checksums for each file.
endef

define Package/libjcat/config
source "$(SOURCE)/Config.in"
endef

MESON_ARGS += \
-Db_lto=true \
-Dgtkdoc=false \
-Dintrospection=false \
-Dvapi=false \
-Dtests=false \
-Dman=false \
-Dcli=false \
-Dgpg=$(if $(CONFIG_LIBJCAT_GPG),true,false) \
-Dpkcs7=$(if $(CONFIG_LIBJCAT_PKCS7),true,false) \
-Ded25519=$(if $(CONFIG_LIBJCAT_ED25519),true,false)

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

$(INSTALL_DIR) $(1)/usr/include/libjcat-1/libjcat
$(CP) $(PKG_INSTALL_DIR)/usr/include/libjcat-1/libjcat/*.h $(1)/usr/include/libjcat-1/libjcat

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

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

define Package/libjcat/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libjcat.so* $(1)/usr/lib
endef

$(eval $(call BuildPackage,libjcat))
2 changes: 2 additions & 0 deletions libs/libqmi/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ choice

config LIBQMI_COLLECTION_MINIMAL
depends on !MODEMMANAGER_WITH_QMI
depends on !FWUPD_PLUGIN_MODEMMANAGER
bool "minimal"

config LIBQMI_COLLECTION_BASIC
depends on !FWUPD_PLUGIN_MODEMMANAGER
bool "basic (default)"

config LIBQMI_COLLECTION_FULL
Expand Down
5 changes: 5 additions & 0 deletions libs/libqmi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ PKG_BUILD_FLAGS:=gc-sections
PKG_MAINTAINER:=Nicholas Smith <[email protected]>
PKG_CPE_ID:=cpe:/a:libqmi_project:libqmi

PKG_CONFIG_DEPENDS:= \
CONFIG_LIBQMI_COLLECTION_FULL \
CONFIG_LIBQMI_COLLECTION_BASIC \
CONFIG_LIBQMI_COLLECTION_MINIMAL

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/meson.mk
Expand Down
16 changes: 16 additions & 0 deletions libs/libxmlb/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
menu "Select libxmlb options"
depends on PACKAGE_libxmlb

config LIBXMLB_LZMA
bool "LZMA"
default n
help
Compile libxmlb with LZMA support

config LIBXMLB_ZSTD
bool "zstd"
default n
help
Compile libxmlb with zstd support

endmenu
76 changes: 76 additions & 0 deletions libs/libxmlb/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#
# Copyright (C) 2024 TDT AG <[email protected]>
#
# 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:=libxmlb
PKG_VERSION:=0.3.19
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/hughsie/libxmlb/releases/download/$(PKG_VERSION)
PKG_HASH:=0a3ec258b12dbf10e5fe840b2421c84137eb7cc1b09c3de6210f3f7d51733733

PKG_MAINTAINER:=Lukas Voegl <[email protected]>
PKG_LICENSE:=LGPL-2.1-or-later
PKG_LICENSE_FILES:=LICENSE

PKG_BUILD_DEPENDS:=glib2/host

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
include $(INCLUDE_DIR)/meson.mk

define Package/libxmlb
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libxmlb
URL:=https://github.com/hughsie/libxmlb
DEPENDS:= \
+glib2 \
+LIBXMLB_LZMA:liblzma \
+LIBXMLB_ZSTD:libzstd
endef
lvoegl marked this conversation as resolved.
Show resolved Hide resolved

define Package/libxmlb/description
Library to help create and query binary XML blobs.
endef

define Package/libxmlb/config
source "$(SOURCE)/Config.in"
endef

MESON_ARGS += \
-Db_lto=true \
-Dgtkdoc=false \
-Dintrospection=false \
-Dtests=false \
-Dcli=false \
-Dstemmer=false \
-Dlzma=$(if $(CONFIG_LIBXMLB_LZMA),enabled,disabled) \
-Dzstd=$(if $(CONFIG_LIBXMLB_ZSTD),enabled,disabled)

define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/libxmlb-2
$(CP) $(PKG_INSTALL_DIR)/usr/include/libxmlb-2/xmlb.h $(1)/usr/include/libxmlb-2

$(INSTALL_DIR) $(1)/usr/include/libxmlb-2/libxmlb
$(CP) $(PKG_INSTALL_DIR)/usr/include/libxmlb-2/libxmlb/*.h $(1)/usr/include/libxmlb-2/libxmlb

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

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

define Package/libxmlb/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libxmlb.so* $(1)/usr/lib
endef

$(eval $(call BuildPackage,libxmlb))
65 changes: 65 additions & 0 deletions utils/fwupd/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
menu "Select fwupd options"
depends on PACKAGE_fwupd-libs

config FWUPD_FIRMWARE_PACKAGER
bool "firmware packager"
default n
help
Compile fwupd with firmware packager

config FWUPD_HSI
bool "Host Security ID"
default n
help
Compile fwupd with HSI support

config FWUPD_LVFS
bool "LVFS remote"
default y
help
Compile and install LVFS remote

config FWUPD_CBOR
bool "CBOR"
default n
help
Compile fwupd with cbor protocol support

config FWUPD_LZMA
bool "LZMA"
default n
help
Compile fwupd with LZMA support

config FWUPD_CURL
bool "curl"
default n
help
Compile fwupd with curl support

config FWUPD_SQLITE
bool "sqlite"
default n
help
Compile fwupd with sqlite support

config FWUPD_LIBARCHIVE
bool "libarchive"
default y
help
Compile fwupd with libarchive support

config FWUPD_GUDEV
bool "GUdev"
default n
help
Compile fwupd with GUdev support

config FWUPD_PLUGIN_MODEMMANAGER
bool "ModemManager plugin"
default y
select FWUPD_GUDEV
help
Compile fwupd with ModemManager plugin

endmenu
Loading