Hello!
RedHat 7.2 doesn't have /usr/man - it keeps manuals in /usr/share/man.
However, manuals are searched in /usr/man as well. Failure to install
manuals causes config files not to be installed.
It's generally a good idea to create directories before installing
anything to them, especially since supporting PREFIX suggests that
installing to a clean directory is supported. Also "install" should be
preferred over "cp" whenever possible.
There was no symbolic name for the directory holding devfsd.conf and
modules.devfs (for the purpose of its creation), so I named it CONFDIR.
Now it's possible to install devfs into an empty directory.
I also made necessary updates to rpm.spec. No patches are needed anymore
(and by the way, devfsd-install-path-patch was missing). "make install"
can now be trusted (just the path for manuals has to be overridden).
Also it's taken into account that the manual pages may be compressed -
suffixes are allowed in their names. Finally, sanity checks for
$RPM_BUILD_ROOT have been eliminated - I don't think that any recent
version of rpm can "forget" to set it.
Don't forget to change "version" in rpm.spec when releasing next versions.
--
Regards,
Pavel Roskin
--------------------------------------------
--- GNUmakefile
+++ GNUmakefile
@@ -1,7 +1,8 @@
PREFIX =
SBINDIR = $(PREFIX)/sbin
MANDIR = $(PREFIX)/usr/man
-CONFIG_FILE = $(PREFIX)/etc/devfsd.conf
+CONFDIR = $(PREFIX)/etc
+CONFIG_FILE = $(CONFDIR)/devfsd.conf
DEFINES :=
nsl_libs := $(wildcard /lib/libnsl.so.*)
@@ -30,13 +31,20 @@
echo "First remove the generic devfs entries from
/etc/modules.conf"; exit 1; \
fi
rm -f $(SBINDIR)/devfsd
+ install -d $(SBINDIR)
install -s devfsd $(SBINDIR)/devfsd
-rm -f $(MANDIR)/*/devfsd.*
- cp -p devfsd.8 $(MANDIR)/man8
- cp -p devfsd.conf.5 $(MANDIR)/man5
- if [ ! -e $(CONFIG_FILE) ]; then cp -p devfsd.conf $(CONFIG_FILE); fi
+ install -d $(MANDIR)/man8
+ install -m 644 devfsd.8 $(MANDIR)/man8
+ install -d $(MANDIR)/man5
+ install -m 644 devfsd.conf.5 $(MANDIR)/man5
+ if [ ! -e $(CONFIG_FILE) ]; then \
+ install -d $(CONFDIR); \
+ install -m 644 devfsd.conf $(CONFDIR); \
+ fi
@echo "Installing /etc/modules.devfs"
- @sed "s/DEVFSD-VERSION/`grep '#define DEVFSD_VERSION' version.h | cut
-d'"' -f 2`/" modules.devfs > $(PREFIX)/etc/modules.devfs
+ @sed "s/DEVFSD-VERSION/`grep '#define DEVFSD_VERSION' version.h | \
+ cut -d'"' -f 2`/" modules.devfs > $(CONFDIR)/modules.devfs
clean:
-rm -f *~ *.o *.orig *.rej
--- rpm.spec
+++ rpm.spec
@@ -1,4 +1,4 @@
-%define version 1.3.12
+%define version 1.3.18
Name: devfsd
Summary: devfs daemon for device name compatibility
Version: %{version}
@@ -7,7 +7,6 @@
Packager: William Stearns <wstearns@xxxxxxxxx>
Group: System Environment/Daemons
Source:
ftp://ftp.atnf.csiro.au/pub/people/rgooch/linux/daemons/devfsd-v%{version}.tar.gz
-Patch0: devfsd-install-path-patch
URL: http://www.atnf.csiro.au/~rgooch/linux/
BuildRoot: /tmp/devfsd-broot
@@ -17,6 +16,11 @@
device entries in the Device Filesystem (devfs).
%changelog
+* Fri Nov 09 2001 Pavel Roskin <proski@xxxxxxx>
+- Update source to 1.3.18.
+- Eliminate patch - use fixed makefile instead.
+- Allow compressed manuals and manuals in /usr/share/man.
+
* Sun Aug 20 2000 William Stearns <wstearns@xxxxxxxxx>
- Update source to 1.3.10
- Remove ps check from rc.sysinit; /proc may not be mounted.
@@ -33,7 +37,6 @@
%prep
%setup -n devfsd
-%patch0 -p1
%build
@@ -41,31 +44,11 @@
%install
-if [ "$RPM_BUILD_ROOT" = "/tmp/devfsd-broot" ]; then
- rm -rf $RPM_BUILD_ROOT
-
- install -d $RPM_BUILD_ROOT/etc
- #install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
- install -d $RPM_BUILD_ROOT/sbin
- install -d $RPM_BUILD_ROOT/usr/man/man8
- install -d $RPM_BUILD_ROOT/usr/man/man5
- #make SBINDIR=$RPM_BUILD_ROOT/sbin
CONFIG_FILE=$RPM_BUILD_ROOT/etc/devfsd.conf install
- make PREFIX=$RPM_BUILD_ROOT install
- cp -p devfsd.8 $RPM_BUILD_ROOT/usr/man/man8
- cp -p devfsd.conf.5 $RPM_BUILD_ROOT/usr/man/man5
-else
- echo Invalid Build root
- exit 1
-fi
+make install PREFIX=$RPM_BUILD_ROOT MANDIR=$RPM_BUILD_ROOT/%{_mandir}
%clean
-if [ "$RPM_BUILD_ROOT" = "/tmp/devfsd-broot" ]; then
- rm -rf $RPM_BUILD_ROOT
-else
- echo Invalid Build root
- exit 1
-fi
+rm -rf $RPM_BUILD_ROOT
%post
@@ -112,6 +95,6 @@
%attr(644,root,root) %config /etc/devfsd.conf
%attr(644,root,root) %config /etc/modules.devfs
%attr(755,root,root) /sbin/devfsd
-%attr(644,root,root) /usr/man/man8/devfsd.8
-%attr(644,root,root) /usr/man/man5/devfsd.conf.5
+%attr(644,root,root) %{_mandir}/man8/devfsd.8*
+%attr(644,root,root) %{_mandir}/man5/devfsd.conf.5*
--------------------------------------------
|