Commit graph

50 commits

Author SHA1 Message Date
Jon Siwek
f18951a77e Changes to allow DEB packaging via CPack, addresses #458 2011-05-16 13:51:32 -05:00
Jon Siwek
9b7c8b9f98 Fix CheckTypes.cmake from generating different config.h's between CMake runs.
Changing a file that causes CMake to re-run would incorrectly use
leftover state to arrive at the wrong conclusion about whether the
system has a given type.
2011-04-19 10:44:44 -05:00
Jon Siwek
c732cef69b Fix unnecessary config.h preprocessor (re)definitions.
The CMake-generated config.h would redundantly define some types to
themselves, causing lots of warning in some cases (e.g. Xcode build).

This addresses #414
2011-04-11 16:59:07 -05:00
Robin Sommer
12c9c947f8 Merge remote branch 'origin/topic/jsiwek/config-file-clobber-fixes'
* origin/topic/jsiwek/config-file-clobber-fixes:
  Changes to the way user-modifiable config files are installed.

Conflicts:
	aux/broccoli
	aux/broctl
2011-03-21 16:29:17 -07:00
Jon Siwek
dec97ab56d Changes to the way user-modifiable config files are installed.
- Duplicates of the distribution's configuration files are now always
  installed with a .example suffix
- Added --binary-package configure option to toggle configure logic
  specific to the creation of binary packages.
- When not in binary packaging mode, `make install` never overwrites
  existing configure files in case they've been modified.  The previous
  behavior (CMake's default) would only avoid overwriting modified files
  if one consistently uses the same build directory and doesn't reconfigure.
- Fixed an issue with Mac package's pre-install script not preserving ACLs
- Minor cleanup/refactor of the make-mac/rpm-packages scripts
2011-02-24 22:02:22 -06:00
Gregor Maier
104c7da205 Revert "Fix for OS X 10.5 compile error wrt llabs()"
This reverts commit 3f6aa735e9.

Using abs() does not work if the integer is >2^32 (or <2^32).
Will add a new fix in next commit.
2011-02-09 15:40:36 -08:00
Robin Sommer
4b77164e04 Merge remote branch 'origin/fastpath'
* origin/fastpath:
  Fix typo in PCAPTests.cmake
2011-01-28 08:14:34 -08:00
Jon Siwek
a19391b94b Fix typo in PCAPTests.cmake
With this correction, the configure tests should now be pulling
in the correct user-specified libpcap headers
2011-01-27 11:35:35 -06:00
Robin Sommer
814cb0f091 Merge remote branch 'origin/topic/jsiwek/macports-fink-fix'
Conflicts:
	aux/broccoli
	aux/broctl
2011-01-19 18:09:58 -08:00
Robin Sommer
420d8ac4b7 Merge remote branch 'origin/topic/jsiwek/packaging'
* origin/topic/jsiwek/packaging:
  Changed behavior of how binary packaging installs config files.
2011-01-19 18:07:38 -08:00
Jon Siwek
5247a64eaa Changed behavior of how binary packaging installs config files.
The pre/post install scripts for RPMs should not perform any logic
to backup config files, instead relying on the standard logic
that RPMs normally do.

For Mac packages, when an existing config file differs from the package's
version, the previous version is always kept and an alert is displayed to
the user explaining the situation.
2011-01-19 16:56:30 -06:00
Jon Siwek
6ea8def6f6 MacPorts & Fink paths now prepended to default search prefixes 2011-01-19 14:57:06 -06:00
Robin Sommer
de06588f27 Merge remote branch 'origin/topic/jsiwek/packaging'
* origin/topic/jsiwek/packaging:
  Changes for packaging
  Changes to CMake logic for binary packaging
  Changes for CPack binary packaging
  Fix package configuration macro returning from sub-project too early
  Add warning when building and installing are done by different users
  Fix for PackageMaker not accepting non-numeric versions
  Fix for OS X 10.5 compile error wrt llabs()
  Prefer static libraries for some dependencies on OS X
  Added OS X configures options for SDK & minimum version
  Changes to allow source packaging via CPack
2011-01-15 14:17:54 -08:00
Jon Siwek
1d8ad8e946 Changes for packaging
- Added 'dist' target to top-level Makefile for doing source packages
- Added 'make-*-packages' scripts for generating binary packages
- Fixes for the ConfigurePackaging CMake script
  - No longer fails when package version doesn't include a patch-level
  - Now considers the case when a package doesn't install any
    config files and the INSTALLED_CONFIG_FILES var is empty
2011-01-14 22:25:10 -06:00
Jon Siwek
8d4f487add Changes to CMake logic for binary packaging
- pre/post install scripts now track configuration files that may
  be clobbered on package install/upgrade through the
  INSTALLED_CONFIG_FILES CMake variable and attempts to make backups
  when the distribution's file differs from the existing file.
2011-01-13 21:58:25 -06:00
Jon Siwek
7936782057 Changes for CPack binary packaging 2011-01-12 16:26:25 -06:00
Jon Siwek
5d1f1e9edb Fix package configuration macro returning from sub-project too early 2011-01-11 19:30:31 -06:00
Jon Siwek
f5715e7c14 Fix for PackageMaker not accepting non-numeric versions 2011-01-10 12:58:40 -06:00
Jon Siwek
3f6aa735e9 Fix for OS X 10.5 compile error wrt llabs()
GCC < 4.1.0 possibly has a problem w/ choosing an llabs()
unambigiously from stdlib.h and cstdlib

See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13943
2011-01-06 17:06:51 -06:00
Jon Siwek
e1ebf81f76 Prefer static libraries for some dependencies on OS X
This makes binary packaging easier because OS X doesn't ship with
all the shared libraries we may link against (libmagic and libGeoIP
in this case)
2011-01-06 16:59:48 -06:00
Jon Siwek
fa07bcd233 Changes to allow source packaging via CPack
- Refactored all packaging related stuff into a single CMake module
- Build should no longer fail when optional sources (e.g. broctl)
  do not exist in the source directory, instead a warning is issued
- Additional configure options to change packaging behavior
2011-01-05 12:05:39 -06:00
Jon Siwek
d8aecb174a Escape commands given to CMake's execute_process 2010-12-15 11:40:17 -06:00
Jon Siwek
a9c9fe7950 Removed some unset()'s that were missed 2010-11-30 15:17:49 -06:00
Jon Siwek
1442af616f Merge branch 'master' into topic/cmake-port
Resolved Conflicts:
	CMakeLists.txt
	INSTALL
	aux/binpac
	aux/bro-aux
	aux/broccoli
	aux/broctl
	cmake/CheckTypes.cmake
	cmake/FindBIND.cmake
	cmake/OSSpecific.cmake
	cmake/OpenSSLTests.cmake
	cmake/PCAPTests.cmake
	src/CMakeLists.txt
2010-11-30 15:07:29 -06:00
jsiwek
ba0ae22da7 More CMake 2.6 compat changes
unset() macro only in later patch-level versions of 2.6
2010-11-30 14:49:20 -06:00
Jon Siwek
0f854e201b CMake 2.6 compatibility changes
Also removed Mac specific feature of rewriting optional library
install_names.
2010-11-30 13:21:30 -06:00
Robin Sommer
fb76d7fe26 Removing the linux-include directory from the search path.
I think we don't need this anymore, but still need to verify that.
2010-11-26 15:32:24 -08:00
Robin Sommer
610d081c4b Merge with origin/topic/cmake-port.
Needed to readd the broctl/broccoli/binpac submodules manually, as
git seemed to get confused by the existing directories.
2010-11-24 21:02:08 -08:00
Jon Siwek
3b459c368c Added uninstall target 2010-11-20 12:18:54 -06:00
Jon Siwek
4982c02eba Source package excludes .git and generate only TGZ 2010-11-19 11:59:22 -06:00
Jon Siwek
efce9dbfe2 Customizable error messages for missing prereqs.
Adds the FindRequiredPackage() macro that wraps the functionality
of the standard find_package() macro.
2010-11-17 20:38:35 -06:00
Jon Siwek
7737572aab Allow building auxilliary projects along with Bro.
BinPAC, Broccoli, Broctl, and Bro auxilliary tools are included
as git submodules.
2010-11-17 20:38:35 -06:00
Jon Siwek
737ce489a9 Added CPack packaging and fix Linux compatibility.
- configure wrapper had bash syntax some places; replaced w/ sh syntax
- Added FindOpenSSL module.  The one that ships with CMake does not
  allow for specifying a non-standard location.
- datadir configure option changed to be relative to prefix.  This
  simplifies the packaging from having to consider absolute paths.
- Added macro for changing install_name of shared libs that need to
  ship with precompiled Bro for OS X.  This is only the optional
  libmagic and libGeoIP for now.
2010-11-17 20:38:35 -06:00
Jon Siwek
521c30e9ba Fix FindBIND to be compatible w/ Linux & FreeBSD. 2010-11-17 20:38:35 -06:00
Jon Siwek
5755d59f1d Typo led to error on case sensitive filesystems 2010-11-17 20:38:35 -06:00
Jon Siwek
bea41f5c73 Fix preprocessor logic for ethernet header choice.
Checking for netinet/if_ether.h and netinet/ip6.h depended
on including other headers first; observed when trying to
build on FreeBSD.

ARP.h was changed to conform to CMake style config.h generation.
Definitions are not set to 1 like with autotools, so we have
to check for definition, not just that the value is true.
2010-11-17 20:38:35 -06:00
Jon Siwek
1b9c041d29 Removed unused configure checks (leftover from autotools). 2010-11-17 20:38:34 -06:00
Jon Siwek
afb5bd8ce7 Moved the logic to build BinPAC locally to FindBinPAC module. 2010-11-17 20:38:34 -06:00
Jon Siwek
e22ec206ca Added support for optional google-perftools. 2010-11-17 20:38:34 -06:00
Jon Siwek
5ea4189011 Added support for optional libGeoIP. 2010-11-17 20:38:34 -06:00
Jon Siwek
88c77fdc25 Added optional libmagic support. 2010-11-17 20:38:34 -06:00
Jon Siwek
79596c03d5 Added logic to find installed BinPAC or build from source. 2010-11-17 20:38:33 -06:00
Jon Siwek
dab003dda6 Fixed bug in FindBISON CMake module.
Compile flags will no longer pile up in subsequent calls to
bison_target().
2010-11-17 20:38:33 -06:00
Jon Siwek
87a74912b7 Minor changes to custom CMake find_package() modules.
- Fix typo in FindPCAP
- FindBIND is now more explicit when looking for include dir
2010-11-17 20:38:33 -06:00
Jon Siwek
1542a49fff Simplified FindPCAP CMake module. 2010-11-17 20:38:33 -06:00
Jon Siwek
570ee48cd9 Removing the --disable-nbdns config option.
- Asynchronous DNS resolver support assumed by default
- HAVE_ASYNC_DNS, HAVE_NB_DNS, and USE_NB_DNS preprocessor definitions
  removed
- In the process, I added FindBIND and CheckNameserCompat CMake modules
2010-11-17 20:38:33 -06:00
Jon Siwek
2bd8f42c15 Changes to make OpenSSL a requirement.
Preprocessor conditionals dependent on definition of USE_OPENSSL have been
straightened out.
2010-11-17 20:38:33 -06:00
Jon Siwek
d7eb228d52 Minor formatting changes. 2010-11-17 20:38:32 -06:00
Jon Siwek
9d941c097c Moved custom CMake includes up one directory. 2010-11-17 20:38:32 -06:00
Jon Siwek
d1e0008999 Minimal CMake build of Bro done. 2010-11-17 20:38:32 -06:00