added Windows build instructions - fixed spec file - added patch file for broken coreconf location.mk

This commit is contained in:
richm%stanfordalumni.org 2006-02-01 23:39:01 +00:00
parent 831a7ad015
commit 943071919b
4 changed files with 105 additions and 3 deletions

76
security/svrcore/INSTALL Normal file
View File

@ -0,0 +1,76 @@
Building:
You first need to do the patch to fix the broken ../coreconf/location.mk:
patch -p0 < corecore-location.patch
This adds NSS_INCLUDE_DIR and NSS_LIB_DIR - if they are already there (i.e. someone fixed it) then patch will complain, but just ignore it.
Next, if you are not doing an "in-tree" build, you will need to set the environment variables NSPR_INCLUDE_DIR, NSPR_LIB_DIR, NSS_INCLUDE_DIR, and NSS_LIB_DIR to point to the appropriate places. On Windows, if you are using the build method described below (cygwin + MSVC), you should use the "mixed" style path e.g.
export NSPR_INCLUDE_DIR=`cygpath -m $HOME/nspr-4.6.1/include`
etc.
The MSVC compiler (cl.exe) will barf on paths like /cygdrive/c/foo/bar.
Unix:
Building on Unix mostly just complies with the usual NSS build requirements.
Windows:
Windows has now (as of 2006/2/1) released free versions of their compiler and platform SDKs - everything you need to build svrcore.
Prerequisites:
First, you must install 3 packages downloaded from Microsoft. If the links don't work, just go to www.microsoft.com and search for their names until you get to the download links for them.
Second, install CygWin - www.cygwin.com
Third, you need nsinstall.exe from the MozTools wintools package (you don't need anything else) - http://ftp.mozilla.org/pub/mozilla.org/mozilla/source/wintools.zip - just unpack the zip file, extract nsinstall.exe, and place in your PATH
* Microsoft Visual C++ Toolkit 2003
** http://msdn.microsoft.com/visualc/vctoolkit2003/ - follow the link to download
* Microsoft Windows Platform SDK
** http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
** Minimum install:
*** Choose Custom
*** Choose Windows Core SDK - omit any 64 bit options (unless you need 64 bit binaries) and omit source code (unless you really want it)
*** You can omit everything else (unless you just want to fill up your disk)
** Full Install (if you have lots of disk space, network bandwidth, and time)
* Microsoft .NET Framework SDK
** http://www.microsoft.com/downloads/details.aspx?familyid=9b3a2ca6-3647-4070-9f41-a333c6b9181d&displaylang=en
* CygWin
** www.cygwin.com
*** Download and run setup
*** Setup allows you to choose which packages you want to install.
*** Minimal Install
**** Archive - tar, zip, unzip
**** Base - most everything here
**** Database - nothing - postgres and bdb are selected by default - deselect them
**** Devel - you really only need binutils, make, and mktemp, but cvs is good to have, and you may be interested in some of the others as well
**** Doc - whatever the defaults are
**** Editors - you probably want some sort of text editor if you don't already have one and don't want to use Notepad/Wordpad
**** Games, Gnome, Graphics - Defaults
**** Interpreters - gawk, perl
**** KDE, Libs, Mail, Math, MinGW, Net, Perl, Publishing, Python - Defaults
**** Shells - ash and bash
**** System - Defaults
**** Text - less
**** Utils - Defaults + patch
**** Web, X11 - Defaults
** After installation is complete, you can have it create a cygwin desktop icon that you launch the cygwin environment from
* Setting up your build environment
The first time you launch the cygwin shell, it should create a $HOME/.bash_profile. Add the following to that file:
export INCLUDE="c:\Program Files\Microsoft Visual C++ Toolkit 2003\include;c:\Program Files\Microsoft Platform SDK\Include;c:\Program Files\Microsoft Platform SDK\Include\mfc"
export LIB="c:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;c:\Program Files\Microsoft Platform SDK\Lib;c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib"
export ANONMOZCVSROOT=:pserver:anonymous@cvvs-mirror.mozilla.org:/cvsroot
export CVSROOT=$ANONMOZCVSROOT
export PATH="$HOME/bin:/cygdrive/c/Program Files/Microsoft Visual C++ Toolkit 2003/bin:/cygdrive/c/Program Files/Microsoft Platform SDK/Bin:$PATH"
I've put my nsinstall.exe in my $HOME/bin directory and put that first in my PATH. This assumes you've used the default paths for all of the MS and cygwin installs. If not, change the paths accordingly. In order for the changes to take effect, re-source your file or logout and login again.
* Building
cd mozilla/security/svrcore
patch -p0 < coreconf-location.patch
make AR='link /lib -nologo -out:"$@"
And that's it. The svrcore.lib will be found in mozilla/dist/*.OBJ/lib and svrcore.h will be found in mozilla/dist/public/svrcore. When you go to build the mozilla ldap c sdk that you have checked out into the same source tree, it will automatically find the files it needs when you use configure --with-svrcore ...

View File

@ -46,3 +46,5 @@ The LDAP C SDK tools use svrcore. They also implemented their
own PIN object to allow command line PIN entry. The directory
server also implemented its own PIN object to allow a watchdog
process to cache the PIN and restart the server.
See INSTALL for build instructions

View File

@ -0,0 +1,20 @@
--- ../coreconf/location.mk 21 Jul 2005 23:48:08 -0000 1.10
+++ ../coreconf/location.mk 1 Feb 2006 22:01:10 -0000
@@ -70,9 +70,17 @@
ifdef NSPR_INCLUDE_DIR
INCLUDES += -I$(NSPR_INCLUDE_DIR)
endif
ifndef NSPR_LIB_DIR
NSPR_LIB_DIR = $(DIST)/lib
endif
+ifdef NSS_INCLUDE_DIR
+ INCLUDES += -I$(NSS_INCLUDE_DIR)
+endif
+
+ifndef NSS_LIB_DIR
+ NSS_LIB_DIR = $(DIST)/lib
+endif
+
MK_LOCATION = included

View File

@ -4,11 +4,11 @@
Summary: Svrcore - development files for secure PIN handling using NSS crypto
Name: svrcore-devel
Version: 4.0.1
Release: 1
Release: 2
License: MPL/GPL/LGPL
URL: http://www.mozilla.org/projects/security/pki/
Group: Development/Libraries
Requires: nspr-devel >= %{nspr_version}, nss-devel >= %{nspr_version}
Requires: nspr-devel >= %{nspr_version}, nss-devel >= %{nss_version}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: nspr-devel >= %{nspr_version}, nss-devel >= %{nss_version}
BuildRequires: pkgconfig
@ -16,6 +16,7 @@ BuildRequires: gawk
Provides: svrcore-devel
Source0: %{name}-%{version}.tar.gz
Patch0: coreconf-location.patch
%description
svrcore provides applications with several ways to handle secure PIN storage
@ -25,6 +26,7 @@ uses the facilities provided by NSS.
%prep
%setup -q
%patch
%build
@ -106,9 +108,11 @@ done
%{_includedir}/svrcore.h
%changelog
* Wed Feb 1 2006 Rich <rmeggins@redhat.com> - 4.0.1-2
- Requires nss version was wrong
* Wed Jan 11 2006 Rich Megginson <rmeggins@redhat.com> - 4.01-1
- Removed svrcore-config - use pkg-config instead
* Mon Dec 19 2005 Rich Megginson <rmeggins@redhat.com> - 4.01-1
- Initial revision