Table of Contents

accountservice

D-Bus interface for user account query and manipulation

runtime dependencies libglib2 (Libraries/Other)
libxcrypt (Libraries/Crypto)
polkit (System tools)
systemd (System tools)
shadow
make dependencies git (Development tools)
docbook-xsl
gtk-doc
meson
vala
xmlto
libglib2.0-dev
libpolkit-gobject-1-dev
libsystemd-dev
intltool
gobject-introspection

Pré requis

apt install gtk-doc intltool meson vala xmlto libglib2.0-dev libpolkit-gobject-1-dev libsystemd-dev gobject-introspection

Recette

mkdir /data/buildroot/package/accountsservice
cat > /data/buildroot/package/accountsservice/Config.in<< 'EOF'
config BR2_PACKAGE_ACCOUNTSSERVICE
        bool "accountsservice"
        depends on BR2_PACKAGE_LIBGLIB2
        depends on BR2_PACKAGE_POLKIT
        depends on BR2_PACKAGE_SYSTEMD
        depends on BR2_PACKAGE_LIBXCRYPT
        help
          D-Bus interface for user account query and manipulation
EOF

cat > /data/buildroot/package/accountsservice/accountsservice.mk<< 'EOF'
################################################################################
#
# accountsservice
#
################################################################################
ACCOUNTSSERVICE_VERSION = 0.6.50
ACCOUNTSSERVICE_SOURCE = $(ACCOUNTSSERVICE_VERSION).tar.gz
ACCOUNTSSERVICE_SITE = https://github.com/freedesktop/accountsservice/archive/refs/tags
ACCOUNTSSERVICE_INSTALL_STAGING = YES

ACCOUNTSSERVICE_DEPENDENCIES = libglib2 polkit systemd libxcrypt

define ACCOUNTSSERVICE_BUILD_CMDS
    cd $(@D)/ && \
    cp /usr/share/gtk-doc/data/gtk-doc.make $(@D)/ && \
    cp /usr/share/intltool/Makefile.in.in $(@D)/po/ && \
    autoreconf -i && \
    PKG_CONFIG_PATH="$(STAGING_DIR)/lib/pkgconfig/" ./configure --prefix=/usr            \
                --sysconfdir=/etc        \
                --localstatedir=/var     \
                --enable-admin-group=adm \
                --disable-introspection  \
                --disable-static && \
    CFLAGS="-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include" make
endef

define ACCOUNTSSERVICE_INSTALL_STAGING_CMDS
    cd $(@D)/ && \
    make DESTDIR="$(STAGING_DIR)/" install
endef

define ACCOUNTSSERVICE_INSTALL_TARGET_CMDS
    cd $(@D)/ && \
    make DESTDIR="$(TARGET_DIR)/" install
endef

$(eval $(generic-package))
EOF

sed -i '/menu "Custom packages"/a source "package/accountsservice/Config.in"' /data/buildroot/package/Config.in