diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-03-03 19:36:13 +0100 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-03-04 17:59:39 +0100 |
commit | 7b8e68af09e20fd95656b8909f4fc027440c1c30 (patch) | |
tree | a4b7d605767e46198c5ea470ee28c8bdbb4d032a /Makefile | |
parent | 57e275a08d46f976ab2a2edf9b7b507bbca1d1ca (diff) | |
download | mkinitcpio-7b8e68af09e20fd95656b8909f4fc027440c1c30.tar.gz mkinitcpio-7b8e68af09e20fd95656b8909f4fc027440c1c30.tar.xz |
add support for HOOKDIR/INSTDIR as arrays
This is a really ugly patch, but allows mkinitcpio to read hooks from
multiple locations, namely:
/usr/lib/initcpio/{install,hooks}
/lib/initcpio/{install,hooks}
Preference is given to the first, and all files included with mkinitcpio
are moved there.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -6,9 +6,9 @@ DIRS = \ /usr/bin \ /etc/bash_completion.d \ /etc/mkinitcpio.d \ - /lib/initcpio/hooks \ - /lib/initcpio/install \ - /lib/initcpio/udev \ + /usr/lib/initcpio/hooks \ + /usr/lib/initcpio/install \ + /usr/lib/initcpio/udev \ /usr/share/man/man8 DIST_EXTRA = \ @@ -20,26 +20,26 @@ install: all $(foreach dir,${DIRS},install -dm755 ${DESTDIR}${dir};) sed -e 's|^CONFIG=.*|CONFIG=/etc/mkinitcpio.conf|' \ - -e 's|^FUNCTIONS=.*|FUNCTIONS=/lib/initcpio/functions|' \ - -e 's|^HOOKDIR=.*|HOOKDIR=/lib/initcpio/hooks|' \ - -e 's|^INSTDIR=.*|INSTDIR=/lib/initcpio/install|' \ + -e 's|^FUNCTIONS=.*|FUNCTIONS=/usr/lib/initcpio/functions|' \ + -e 's|^HOOKDIR=.*|HOOKDIR=({/usr,}/lib/initcpio/hooks)|' \ + -e 's|^INSTDIR=.*|INSTDIR=({/usr,}/lib/initcpio/install)|' \ -e 's|^PRESETDIR=.*|PRESETDIR=/etc/mkinitcpio.d|' \ -e 's|%VERSION%|${VERSION}|g' \ < mkinitcpio > ${DESTDIR}/usr/bin/mkinitcpio - sed -e 's|\(^declare FUNCTIONS\)=.*|\1=/lib/initcpio/functions|' \ + sed -e 's|\(^declare FUNCTIONS\)=.*|\1=/usr/lib/initcpio/functions|' \ -e 's|%VERSION%|${VERSION}|g' \ < lsinitcpio > ${DESTDIR}/usr/bin/lsinitcpio chmod 755 ${DESTDIR}/usr/bin/lsinitcpio ${DESTDIR}/usr/bin/mkinitcpio install -m644 mkinitcpio.conf ${DESTDIR}/etc/mkinitcpio.conf - install -m755 -t ${DESTDIR}/lib/initcpio init shutdown - install -m644 -t ${DESTDIR}/lib/initcpio init_functions functions - install -m644 01-memdisk.rules ${DESTDIR}/lib/initcpio/udev/01-memdisk.rules + install -m755 -t ${DESTDIR}/usr/lib/initcpio init shutdown + install -m644 -t ${DESTDIR}/usr/lib/initcpio init_functions functions + install -m644 01-memdisk.rules ${DESTDIR}/usr/lib/initcpio/udev/01-memdisk.rules - install -m644 -t ${DESTDIR}/lib/initcpio/hooks hooks/* - install -m644 -t ${DESTDIR}/lib/initcpio/install install/* + install -m644 -t ${DESTDIR}/usr/lib/initcpio/hooks hooks/* + install -m644 -t ${DESTDIR}/usr/lib/initcpio/install install/* install -m644 -t ${DESTDIR}/etc/mkinitcpio.d mkinitcpio.d/* install -m644 mkinitcpio.8 ${DESTDIR}/usr/share/man/man8/mkinitcpio.8 |