summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdk-pixbuf.morph6
-rw-r--r--systemd/gdk-pixbuf-cache-loaders.service11
2 files changed, 16 insertions, 1 deletions
diff --git a/gdk-pixbuf.morph b/gdk-pixbuf.morph
index c89c75c89..c070c83cc 100644
--- a/gdk-pixbuf.morph
+++ b/gdk-pixbuf.morph
@@ -3,4 +3,8 @@ kind: chunk
build-system: autotools
install-commands:
- make DESTDIR=$DESTDIR install
-- LD_LIBRARY_PATH=$DESTDIR/usr/lib $DESTDIR/usr/bin/gdk-pixbuf-query-loaders > $DESTDIR/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
+- install -d "$DESTDIR/lib/systemd/system/multi-user.target.wants"
+- install -m 0644 systemd/gdk-pixbuf-cache-loaders.service
+ "$DESTDIR/lib/systemd/system"
+- ln -s ../gdk-pixbuf-cache-loaders.service
+ "$DESTDIR/lib/systemd/system/multi-user.target.wants/gdk-pixbuf-cache-loaders.service"
diff --git a/systemd/gdk-pixbuf-cache-loaders.service b/systemd/gdk-pixbuf-cache-loaders.service
new file mode 100644
index 000000000..5dd4fd77c
--- /dev/null
+++ b/systemd/gdk-pixbuf-cache-loaders.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Cache all the gdk-pixbuf loaders
+After=multi-user.target
+ConditionPathExists=!/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
+
+[Service]
+Type=oneshot
+ExecStart=/bin/sh -c 'gdk-pixbuf-query-loaders > /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache'
+
+[Install]
+WantedBy=multi-user.target