Subject: Re: Installing an application - newbie question?
To: Simas Mockevicius <symka@NetBSD.org>
From: TLorD <tld@tld.digitalcurse.com>
List: netbsd-help
Date: 07/01/2005 10:56:02
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Niven wrote:
> I'm feeling kinda stupid - I don't understand how I get (for example) a
> browser application on my system.

Don't panic! That's what pkgsrc is for.
For example, to install a text-mode web browser you just have to run
cd /usr/pkgsrc/www/links && make && make install
and that's it. You can install web browsers for Xwindows, for example firefox
is just a
cd /usr/pkgsrc/www/firefox && make && make install
away (and few compilation hours, alas!)
Please note that pkgsrc downloads the required files from the Internet, so you
will either need to have the PC wired and configured, or download the files
manually and place them in /usr/pkgsrc/distfiles, or download them via another
computer.
To build a script to download them you have to go to the directory of the
program you want to install (eg: cd /usr/pkgsrc/www/links) and launch
make fetch-list > /tmp/fetch-list.sh
It will create a file, /tmp/fetch-list.sh, which, when run on an
internet-enabled *NIX compatible shell, will download the files for you.

There is another way, which is easier and often faster: install precompiled
packages.
To do that you need to browse the
ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/README.html repository and go
to the page for the software you want. You'll notice, at the end of the page,
a list of precompiled packages. You'll have to download one of these files
(with the correct arch and possibly correct NetBSD version) and then
pkg_add that_file.tgz
(yes, you'll have to download the dependencies by hand too)

> I mounted my cdrom (yeh!! Why does that sound like an achievement?) and
> copied it to /usr. Following the "www.netbsd.org/guide" I did:

The copy wasn't necessary. You can safely remove the pkgsrc.tar.gz .

> and lots of things happened for a long time then stopped (note the use
> of technical terms here :-)

LOL it was extracting the data from the archive and showing you what file was
extracting. man tar(1) and you'll understand better.

> I just don't understand what to do next....... it says browse the
> packages with lynx but my system doesn't understand that.

Of course, since you don't have lynx installed yet :D
To browse the collection you can use the shell.
start with a "cd /usr/pkgsrc" followed by "ls". If you don't know what cd(1)
and ls(1) are, remember man(1) is your friend.
you will see the list of categories: archivers, editors, net and such.
Inside these, you find the applications in that category. For example, in www
you'll find things like links, firefox, apache and such.
Inside the app directory you can do many things. The most likely you'll do are:
cat DESCR
which will show you a brief description of what the application does/is.
Useful if you don't have the slightest idea what it is.
make && make install
to try and install the application with its dependencies.

For further informations, you can refer to the http://pkgsrc.org/ site and its
documentation, and also the mailing list archives.

Hope that helps.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCxQUiMiWEUf7YMGERAsQbAJ9JPP0W0mFRI9PaTjwoE02UhYmOxwCgxcaY
h91Dab6PlH9s0pUKInEQwGY=
=IoBf
-----END PGP SIGNATURE-----