diff --git a/olpc-utils.spec b/olpc-utils.spec index 91aeba6..33b6924 100644 --- a/olpc-utils.spec +++ b/olpc-utils.spec @@ -14,6 +14,10 @@ Requires: xorg-x11-xauth # for olpc-configure Requires: findutils Requires: systemd-units +BuildRequires: systemd-units +Conflicts: udev < 176 +Conflicts: systemd < 38 +Conflicts: filesystem < 3 # for olpc-test-devkey Requires: bitfrost @@ -30,7 +34,7 @@ Requires: filesystem # for /usr/share/X11/xorg.conf.d Requires: xorg-x11-server-Xorg -# for /lib/udev +# for %{_prefix}/lib/udev Requires: udev # for /usr/share/glib-2.0/schemas and glib-compile-schemas @@ -43,7 +47,17 @@ becoming root, and cleaning the datastore. %prep %setup -q - +#FIXME +sed -i -e 's#lib/udev#%{_prefix}/lib/udev#g' Makefile.build +sed -i -e 's#: /\(.*/lib/udev\)#: \1#g' Makefile.build +sed -i -e 's#/*lib/systemd/system#%{_unitdir}#g' Makefile.build +sed -i -e 's#: /\(.*/lib/systemd\)#: \1#g' Makefile.build +mkdir -p ./%{_unitdir} +mkdir -p ./%{_prefix}/lib/udev/rules.d +cp -axvlT ./lib/udev ./%{_prefix}/lib/udev +rm -fr ./lib/udev +cp -axvlT ./lib/systemd/system ./%{_unitdir} +rm -fr ./lib/systemd/system %build make -f Makefile.build %{?_smp_mflags} CFLAGS="%{optflags}" @@ -53,6 +67,9 @@ make -f Makefile.build %{?_smp_mflags} CFLAGS="%{optflags}" make -f Makefile.build install DESTDIR=%{buildroot} %ifarch x86_64 mv %{buildroot}/usr/lib %{buildroot}/usr/lib64 +# FIXME +mkdir -p %{buildroot}/usr/lib +mv %{buildroot}/usr/lib64/{systemd,udev} %{buildroot}/usr/lib %endif @@ -95,13 +112,13 @@ fi %{_bindir}/olpc-test-devkey %{_bindir}/olpc-solar-log %{_bindir}/olpc-hwinfo -/lib/systemd/system/* +%{_unitdir}/* %{_datadir}/olpc-utils %{_datadir}/glib-2.0/schemas/* %{_datadir}/X11/xorg.conf.d/* %{_libdir}/pm-utils/sleep.d/00xo -/lib/udev/device-tree-val -/lib/udev/rules.d/96-olpckeymap.rules +%{_prefix}/lib/udev/device-tree-val +%{_prefix}/lib/udev/rules.d/96-olpckeymap.rules %{_sysconfdir}/profile.d/zzz_olpc.sh %{_sysconfdir}/rc.d/init.d/diskspacecheck %{_sysconfdir}/rc.d/init.d/diskspacerecover