summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2013-09-25 13:23:18 +0000
committerJonathan Maw <jonathan.maw@codethink.co.uk>2013-09-26 10:11:00 +0000
commitbc45874c7ba5a6a95f032b48ab78115b3e2238ad (patch)
tree42c728d2c3fa6045e5eded9f2879ef7451783db2
parent84ecca61bcea04b358261a9d33dfbba4023ba1b1 (diff)
downloadgdk-pixbuf-baserock/morph.tar.gz
Cache loaders on first boot instead of during buildbaserock/morph
-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