Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] How to build on MACOS (with revised instructions)

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Wed, 13 Jul 2011 20:29:12 -0700
On Jun 26, 2011, at 3:32 PM, Michael Tüxen wrote:

> So you want to provide binaries for the libs and the include files and the
> other files needed? Where do you want to install them? System wide?
> We have to make sure that this does not conflict with the usage of some
> package managers running on the system...

OK, so there's a bit of a chicken-and-egg problem, so maybe we have to have people run the script first.

I'm working on getting the script to work; I'll check it in, along with the patches, when I have it working.

The patches should probably be checked into a subdirectory; I'm thinking of having the tarballs downloaded and unpacked into a subdirectory as well - should it just clean up the subdirectory when it's done, or should it leave:

	the tarballs;

	the source directories for the libraries, including the built objects;

around?

> I'm actually not using a script, since I need sudo for installation and don't
> want to compile everything with sudo.

The version of the script I have checks, in the beginning of the script, whether you have write permission on /usr/local and, if you don't, runs "make install" with sudo, but doesn't run anything else with sudo.

It should perhaps take an argument for where to install the support libraries, with the default being /usr/local, and perhaps even pass that on to the configure script for use in the "make osx-package" stage. 

> Another reason is that I update the stuff from time to time to latest versions.

I'll look at making the versions of the libraries variables in the beginning of the script, so they're easier to update.

I'll also try to get the other support libraries in; should that be done with an option or should it just load up your system with GeoIP and PortAudio and GNU this and GNU that and so on?

Would it be useful to have scripts such as this for other platforms, e.g.:

	Debian and derivatives, where it could apt-get the appropriate packages *and* the development packages to go along with them (although if it's called debian-setup, people running Debian derivatives might not know they should run it - assuming the same script would even work on Debian and *buntu, for example);

	other Linux distributions, where it's probably per-distribution although maybe Red Hat/Fedora and derivatives could share a script;

	various flavors of *BSD, installing packages or ports;

	etc.