From: olh@suse.de Date: Thu, 30 Oct 2003 06:26:35 +0000 (-0800) Subject: [PATCH] DESTDIR for udev X-Git-Tag: 006~50 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4360a56d7f1d888fdef481018a168c0dade937b9;p=systemd [PATCH] DESTDIR for udev --- diff --git a/Makefile b/Makefile index 586db488..01536f69 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ VERSION = 005_bk INSTALL_DIR = /usr/local/bin RELEASE_NAME = $(ROOT)-$(VERSION) +DESTDIR = # override this to make udev look in a different location for it's config files prefix = exec_prefix = ${prefix} @@ -195,14 +196,14 @@ release: $(DISTFILES) clean install: all - $(INSTALL) -d $(udevdir) - $(INSTALL) -d $(configdir) - $(INSTALL) -d $(hotplugdir) - $(INSTALL_PROGRAM) -D $(ROOT) $(sbindir)/$(ROOT) - $(INSTALL_DATA) -D udev.8 $(mandir)/man8/udev.8 - $(INSTALL_DATA) udev.config $(configdir) - $(INSTALL_DATA) udev.permissions $(configdir) - - ln -s $(sbindir)/$(ROOT) $(hotplugdir)/udev.hotplug + $(INSTALL) -d $(DESTDIR)$(udevdir) + $(INSTALL) -d $(DESTDIR)$(configdir) + $(INSTALL) -d $(DESTDIR)$(hotplugdir) + $(INSTALL_PROGRAM) -D $(ROOT) $(DESTDIR)$(sbindir)/$(ROOT) + $(INSTALL_DATA) -D udev.8 $(DESTDIR)$(mandir)/man8/udev.8 + $(INSTALL_DATA) udev.config $(DESTDIR)$(configdir) + $(INSTALL_DATA) udev.permissions $(DESTDIR)$(configdir) + - ln -s $(sbindir)/$(ROOT) $(DESTDIR)$(hotplugdir)/udev.hotplug uninstall: - rm $(hotplugdir)/udev.hotplug diff --git a/udev.spec b/udev.spec index fcfb1cc7..c6ebefc9 100644 --- a/udev.spec +++ b/udev.spec @@ -7,7 +7,7 @@ Group: Utilities/System Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.gz ExclusiveOS: Linux Vendor: Greg Kroah-Hartman -BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Prereq: /bin/sh, fileutils, hotplug %description @@ -21,9 +21,7 @@ udev is a implementation of devfs in userspace using sysfs and make CC="gcc $RPM_OPT_FLAGS" %install -make prefix=$RPM_BUILD_ROOT install -rm -f ${RPM_BUILD_ROOT}/etc/hotplug.d/default/udev.hotplug -ln -s /sbin/udev ${RPM_BUILD_ROOT}/etc/hotplug.d/default/udev.hotplug +make DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT