From: Adam Duskett <adam.duskett@amarulasolutions.com>
To: buildroot@buildroot.org
Cc: Adam Duskett <adam.duskett@amarulasolutions.com>
Subject: [Buildroot] [PATCH/next v2 1/9] package/xdg-user-dirs: new package
Date: Sat, 18 Nov 2023 15:11:57 -0700 [thread overview]
Message-ID: <20231118221206.1369389-1-adam.duskett@amarulasolutions.com> (raw)
This is needed to fix flutter-gallery
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/xdg-user-dirs/Config.in | 14 +++++++
package/xdg-user-dirs/S22xdg-user-dirs-update | 26 +++++++++++++
.../xdg-user-dirs-update.service | 10 +++++
package/xdg-user-dirs/xdg-user-dirs.hash | 3 ++
package/xdg-user-dirs/xdg-user-dirs.mk | 37 +++++++++++++++++++
7 files changed, 92 insertions(+)
create mode 100644 package/xdg-user-dirs/Config.in
create mode 100644 package/xdg-user-dirs/S22xdg-user-dirs-update
create mode 100644 package/xdg-user-dirs/xdg-user-dirs-update.service
create mode 100644 package/xdg-user-dirs/xdg-user-dirs.hash
create mode 100644 package/xdg-user-dirs/xdg-user-dirs.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 1f26e9bc81..ab0ef81639 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -39,6 +39,7 @@ F: package/flutter-pi/
F: package/flutter-sdk-bin/
F: package/python-kmod/
F: package/python-versioneer/
+F: package/xdg-user-dirs/
F: support/testing/tests/package/test_firewalld.py
F: support/testing/tests/package/test_flutter.py
diff --git a/package/Config.in b/package/Config.in
index 5a3410d758..3bdf5e92b1 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2783,6 +2783,7 @@ menu "System tools"
source "package/watchdog/Config.in"
source "package/watchdogd/Config.in"
source "package/xdg-dbus-proxy/Config.in"
+ source "package/xdg-user-dirs/Config.in"
source "package/xen/Config.in"
source "package/xvisor/Config.in"
endmenu
diff --git a/package/xdg-user-dirs/Config.in b/package/xdg-user-dirs/Config.in
new file mode 100644
index 0000000000..ba122606f2
--- /dev/null
+++ b/package/xdg-user-dirs/Config.in
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_XDG_USER_DIRS
+ bool "xdg-user-dirs"
+ depends on BR2_ENABLE_LOCALE
+ depends on BR2_USE_WCHAR # libglib2 -> gettext
+ help
+ xdg-user-dirs is a tool to help manage "well known" user
+ directories like the desktop folder and the music folder.
+ It also handles localization (i.e. translation) of the
+ filenames.
+
+ https://freedesktop.org/wiki/Software/xdg-user-dirs/
+
+comment "xdg-user-dirs needs a toolchain w/ wchar, locale"
+ depends on !BR2_USE_WCHAR || !BR2_ENABLE_LOCALE
diff --git a/package/xdg-user-dirs/S22xdg-user-dirs-update b/package/xdg-user-dirs/S22xdg-user-dirs-update
new file mode 100644
index 0000000000..ec8f2039b3
--- /dev/null
+++ b/package/xdg-user-dirs/S22xdg-user-dirs-update
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -e
+
+DAEMON="xdg-user-dirs-update"
+XDG_USER_DIRS_UPDATE_ARGS="--force"
+
+start() {
+ printf "Starting %s: " "${DAEMON}"
+ su - root -c "${DAEMON} ${XDG_USER_DIRS_UPDATE_ARGS}"
+ status=$?
+ if [ "${status}" -eq 0 ]; then
+ echo "OK"
+ else
+ echo "FAIL"
+ fi
+ return "${status}"
+}
+
+case "$1" in
+ start)
+ "$1";;
+ *)
+ echo "Usage: xdg-user-dirs-update start"
+ exit 1
+ ;;
+esac
diff --git a/package/xdg-user-dirs/xdg-user-dirs-update.service b/package/xdg-user-dirs/xdg-user-dirs-update.service
new file mode 100644
index 0000000000..438df4a8da
--- /dev/null
+++ b/package/xdg-user-dirs/xdg-user-dirs-update.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Update XDG user dir configuration
+
+[Service]
+Type=oneshot
+EnvironmentFile=-/etc/locale.conf
+ExecStart=/usr/bin/xdg-user-dirs-update --force
+
+[Install]
+WantedBy=default.target
diff --git a/package/xdg-user-dirs/xdg-user-dirs.hash b/package/xdg-user-dirs/xdg-user-dirs.hash
new file mode 100644
index 0000000000..a4d911ee7d
--- /dev/null
+++ b/package/xdg-user-dirs/xdg-user-dirs.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 ec6f06d7495cdba37a732039f9b5e1578bcb296576fde0da40edb2f52220df3c xdg-user-dirs-0.18.tar.gz
+sha256 32b1062f7da84967e7019d01ab805935caa7ab7321a7ced0e30ebe75e5df1670 COPYING
diff --git a/package/xdg-user-dirs/xdg-user-dirs.mk b/package/xdg-user-dirs/xdg-user-dirs.mk
new file mode 100644
index 0000000000..43febe3215
--- /dev/null
+++ b/package/xdg-user-dirs/xdg-user-dirs.mk
@@ -0,0 +1,37 @@
+################################################################################
+#
+# xdg-user-dirs
+#
+################################################################################
+
+XDG_USER_DIRS_VERSION = 0.18
+XDG_USER_DIRS_SITE = http://user-dirs.freedesktop.org/releases
+XDG_USER_DIRS_LICENSE = GPL-2.0
+XDG_USER_DIRS_LICENSE_FILES = COPYING
+XDG_USER_DIRS_CONF_OPTS = \
+ --disable-rpath \
+ --with-gnu-ld
+
+ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
+XDG_USER_DIRS_CONF_OPTS += --with-libintl-prefix=$(STAGING_DIR)/usr
+else
+XDG_USER_DIRS_CONF_OPTS += --without-libintl-prefix
+endif
+
+# We do not want nor need the desktop file.
+define XDG_USER_DIRS_REMOVE_DESKTOP_FILE
+ $(RM) -r $(TARGET_DIR)/etc/xdg/autostart/
+endef
+XDG_USER_DIRS_POST_INSTALL_TARGET_HOOKS += XDG_USER_DIRS_REMOVE_DESKTOP_FILE
+
+define XDG_USER_DIRS_INSTALL_INIT_SYSTEMD
+ $(INSTALL) -D -m 0644 $(XDG_USER_DIRS_PKGDIR)/xdg-user-dirs-update.service \
+ $(TARGET_DIR)/usr/lib/systemd/system/xdg-user-dirs-update.service
+endef
+
+define XDG_USER_DIRS_INSTALL_INIT_SYSV
+ $(INSTALL) -D -m 0755 $(XDG_USER_DIRS_PKGDIR)/S22xdg-user-dirs-update \
+ $(TARGET_DIR)/etc/init.d/S22xdg-user-dirs-update
+endef
+
+$(eval $(autotools-package))
--
2.42.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2023-11-18 22:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-18 22:11 Adam Duskett [this message]
2023-11-18 22:11 ` [Buildroot] [PATCH/next v2 2/9] package/flutter-sdk-bin: bump version to 3.16.0 Adam Duskett
2023-11-18 22:11 ` [Buildroot] [PATCH/next v2 3/9] package/flutter-engine: " Adam Duskett
2023-11-18 22:12 ` [Buildroot] [PATCH/next v2 4/9] package/flutter-engine: Add profile runtime mode selection Adam Duskett
2023-11-18 22:12 ` [Buildroot] [PATCH/next v2 5/9] package/flutter-sdk-bin/Config.in.host: add pub-cache location option Adam Duskett
2023-11-19 8:21 ` Yann E. MORIN
2023-11-19 17:47 ` Adam Duskett
2023-11-19 19:45 ` Yann E. MORIN
2023-11-19 20:41 ` Arnout Vandecappelle via buildroot
2023-11-19 20:43 ` Arnout Vandecappelle via buildroot
2023-11-19 21:08 ` Adam Duskett
2023-11-19 21:53 ` Yann E. MORIN
2023-11-20 16:40 ` Adam Duskett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231118221206.1369389-1-adam.duskett@amarulasolutions.com \
--to=adam.duskett@amarulasolutions.com \
--cc=buildroot@buildroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox