Update to mailx hint/?

Andy Glen-Young andy at metropolis.co.za
Wed Aug 22 06:06:21 PDT 2001


Hello,

Greetings from the deep dark depths of Africa! Ok, it's not so deep nor
dark, but it's still Africa.

Either I've been really stupid or the mailx hint is incomplete. The former
is often the case. In order for mailx to compile correctly the lockfile.h
file is required. I found this in the liblockfile tarball from the Debian
website.

Please, I don't want to take anything away from Jason Gurtz and his mailx
hint, but I found that the install was not as simple as his hint implied.

Below are the steps I took to install mailx. I've added a file listing so 
people will know what has been installed on the systems and the Makefiles 
for both packages do not include an uninstall target:

-------------------------------------------------------------------------------------

TITLE:		Installation of the 'mail' command
LFS VERSION:	3.0-pre4
AUTHOR:		Andrew Glen-Young <andy (at) metropolis (dot) co (dot) za>
SYNOPSIS:	The 'mail' command can be used to send mail from commandline
scripts, from the crontab, etc.
HINT:
2001-08-22 * Updated the orignal mailx hint by Jason Gurtz to include the
lockfile libraries.

Sources required:
----------------

Jason Gurtz wrote in the original hint:

"The Debian project seems to have taken the duty as the active maintainer 
of this package. Let me know if this is not the case."

As this seems to be the case I downloaded the lockfile sources from the
Debian website.

http://ftp.debian.org/debian/dists/potato/main/source/libs/liblockfile.1.0.1.tar.gz
http://ftp.debian.org/debian/dists/potato/main/source/mail/mailx_8.1.1-11.diff.gz
http://ftp.debian.org/debian/dists/potato/main/source/mail/mailx_8.1.1.orig.tar.gz

Installation of liblockfile:
---------------------------

./configure --prefix=/usr --enable-shared &&
make &&
make install

This will install the files:

o /usr/man/man1/dotlockfile.1
o /usr/man/man3/lockfile_create.3
o /usr/man/man3/maillock.3
o /usr/lib/liblockfile.so
o /usr/lib/liblockfile.so.1
o /usr/lib/liblockfile.so.1.0
o /usr/bin/dotlockfile

Whether the nfslock library is required, it's not too clear... Perhaps
it is my fuzzy mind. If you want to install it (I didn't) follow the
following instructions as opposed to the above.

./configure --prefix=/usr --enable-shared --with-libnfslock=/usr/lib

The Makefile has a flaw, as it wants to install nfslock.so.1.0 as opposed
to nfslock.so.0.1. Whether the binary should be named nfslock.so.1.0 is
once again unclear (insert fuzzy brain clause here).

To fix this:
Edit the Makefile & change line 73 from:

	install -m 755 nfslock.so.$(VER) $(ROOT)$(nfslockdir)
to
	install -m 755 nfslock.so.$(NVER) $(ROOT)$(nfslockdir) 

Then the usual make/install commands can be run:
make && make install 

This will install the files:

o /usr/man/man1/dotlockfile.1
o /usr/man/man3/lockfile_create.3
o /usr/man/man3/maillock.3
o /usr/lib/liblockfile.so
o /usr/lib/liblockfile.so.1
o /usr/lib/liblockfile.so.1.0
o /usr/bin/dotlockfile
o /usr/man/man1/nfslock.so.0.1
o /usr/lib/nfslock.so.0.1 

Installation of mailx:
---------------------

patch -Np1 -i ../mailx_8.1.1-11.diff

The default install will place mail.help & mail.tildehelp in the /usr/lib
directory, when they really should be in /usr/share/misc or
/usr/share/misc/mail. In order to change this we need to edit the
Makefile at line 45 (the last line) from:

	cd misc && install -c -m 644 $(SFILES) $(DESTDIR)/usr/lib/
to
	cd misc && install -c -m 644 $(SFILES) /usr/share/misc/

Then the usual make/install commands can be run:
make && make install

This will install the files:

o /usr/bin/mail
o /usr/man/man1/mail.1
o /etc/mail.rc
o /usr/share/misc/mail.help
o /usr/share/misc/mail.tildehelp

-----------------------------------------------------------------------------

If all this is NOT required, please let me know.

Thanks,

--
------------------------------------------------------------
Andrew Glen-Young               email: andy at metropolis.co.za
Systems Administrator           phone: (021) 683-7280
iafrica.com                     fax:   (021) 683-7299
Cape Town
South Africa

"verum ipsum factum"
        - "Understanding arises through making."

============================================================




More information about the hints mailing list