[Fedora-directory-commits] winsync/passwordsync package.mak, NONE, 1.1 build.bat, 1.9, 1.10

Nathan Kinder (nkinder) fedora-directory-commits at redhat.com
Thu Nov 10 00:04:14 UTC 2005


Author: nkinder

Update of /cvs/dirsec/winsync/passwordsync
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11005/passwordsync

Modified Files:
	build.bat 
Added Files:
	package.mak 
Log Message:
Initial drop of new stand-alone winsync build-system


--- NEW FILE package.mak ---
#
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; version 2 of the License.
# 
# This Program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License along with
# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA.
# 
# In addition, as a special exception, Red Hat, Inc. gives You the additional
# right to link the code of this Program with code not covered under the GNU
# General Public License ("Non-GPL Code") and to distribute linked combinations
# including the two, subject to the limitations in this paragraph. Non-GPL Code
# permitted under this exception must only link to the code of this Program
# through those well defined interfaces identified in the file named EXCEPTION
# found in the source code files (the "Approved Interfaces"). The files of
# Non-GPL Code may instantiate templates or use macros or inline functions from
# the Approved Interfaces without causing the resulting work to be covered by
# the GNU General Public License. Only Red Hat, Inc. may make changes or
# additions to the list of Approved Interfaces. You must obey the GNU General
# Public License in all respects for all of the Program code and other code used
# in conjunction with the Program except the Non-GPL Code covered by this
# exception. If you modify this file, you may extend this exception to your
# version of the file, but you are not obligated to do so. If you do not wish to
# provide this exception without modification, you must delete this exception
# statement from your version and license this file solely under the GPL without
# exception. 
# 
# 
# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
#
# Packaging nmake Makefile for PassSync.msi

ALL : PassSync.msi

LAYOUT :
	copy /Y "$(OBJDEST)\passsync\passsync.exe" "$(PKGDIR)"
	copy /Y "$(OBJDEST)\passhook\passhook.dll" "$(PKGDIR)"
	copy /Y "$(LIBROOT)\ldapsdk\lib\nsldap32v50.dll" "$(PKGDIR)"
	copy /Y "$(LIBROOT)\ldapsdk\lib\nsldapssl32v50.dll" "$(PKGDIR)"
	copy /Y "$(LIBROOT)\ldapsdk\lib\nsldappr32v50.dll" "$(PKGDIR)"
	copy /Y "$(LIBROOT)\nspr\lib\libnspr4.dll" "$(PKGDIR)"
	copy /Y "$(LIBROOT)\nspr\lib\libplds4.dll" "$(PKGDIR)"
	copy /Y "$(LIBROOT)\nspr\lib\libplc4.dll" "$(PKGDIR)"
	copy /Y "$(LIBROOT)\nss\lib\nss3.dll" "$(PKGDIR)"
	copy /Y "$(LIBROOT)\nss\lib\ssl3.dll" "$(PKGDIR)"
	copy /Y "$(LIBROOT)\nss\lib\softokn3.dll" "$(PKGDIR)"
	copy /Y "$(LIBROOT)\nss\lib\smime3.dll" "$(PKGDIR)"
	copy /Y "$(LIBROOT)\nss\bin\certutil.exe" "$(PKGDIR)"
	copy /Y "$(LIBROOT)\nss\bin\pk12util.exe" "$(PKGDIR)"

PassSync.msi : LAYOUT
	mkdir "$(PKGDIR)\Binary"
	copy /Y wix\Binary "$(PKGDIR)\Binary"
	cd "$(PKGDIR)"
	candle "$(WXSDIR)\PassSync.wxs"
	light PassSync.wixobj


Index: build.bat
===================================================================
RCS file: /cvs/dirsec/winsync/passwordsync/build.bat,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- build.bat	12 Oct 2005 23:26:52 -0000	1.9
+++ build.bat	10 Nov 2005 00:04:05 -0000	1.10
@@ -39,101 +39,149 @@
 
 @echo off
 
-pushd
-
-rem Convert %OBJEST% to absolute.
-call :relative %OBJDEST%
-
 if [%BUILD_DEBUG%] == [optimize] (
-    set LIBROOT=..\..\..\..\dist\WINNT5.0_OPT.OBJ
+    set FLAVOR=WINNT5.0_OPT.OBJ
 ) else (
-    set LIBROOT=..\..\..\..\dist\WINNT5.0_DBG.OBJ
+    set FLAVOR=WINNT5.0_DBG.OBJ
 )
 
-echo %LIBROOT%
+rem ======== Set Various Build Directories ========
+set OBJDEST=..\built\%FLAVOR%
+rem   ------ Convert OBJEST to absolute ------
+call :relative %OBJDEST% OBJDEST
+
+set LIBROOT=..\components\%FLAVOR%
+rem   ------ Convert LIBROOT to absolute ------
+call :relative %LIBROOT% LIBROOT
+mkdir %LIBROOT%
+
+set PKGDIR=%OBJDEST%\package\passsync
+mkdir %PKGDIR%
+
+set DISTDIR=..\dist\%FLAVOR%
+rem   ------ Convert DISTDIR to absolute ------
+call :relative %DISTDIR% DISTDIR
+mkdir %DISTDIR%
 
 set WXSDIR=%CD%\wix
 
-set INCLUDE=%INCLUDE%;%CD%\%LIBROOT%\ldapsdk\include;%CD%\%LIBROOT%\nspr\include;%CD%\%LIBROOT%\nss\include
-set LIB=%LIB%;%CD%\%LIBROOT%\ldapsdk\lib;%CD%\%LIBROOT%\nspr\lib;%CD%\%LIBROOT%\nss\lib
-set PATH=%PATH%;%CD%\%LIBROOT%\wix
+rem ======== Fetch Components ========
+if [%INTERNAL_BUILD%] == [1] (
+    set COMPONENT_URL=http://ftp-rel.sfbay.redhat.com/share/builds/components
+) else (
+    set COMPONENT_URL=http://directory.fedora.redhat.com/built/components
+)
+
+rem   ------ NSPR ------
+set NSPR_LOCATION=%COMPONENT_URL%/nspr/v4.6
+if NOT EXIST %LIBROOT%\nspr (
+    pushd %CD%
+    mkdir %LIBROOT%\nspr
+    cd %LIBROOT%\nspr
+    echo %NSPR_LOCATION%/%FLAVOR% > version.txt
+    wget --no-directories %NSPR_LOCATION%/%FLAVOR%/mdbinary.jar
+    wget --no-directories -Pinclude %NSPR_LOCATION%/%FLAVOR%/mdheader.jar
+    unzip -q mdbinary.jar
+    cd include
+    unzip -q mdheader.jar
+    popd
+)
+
+rem   ------ NSS ------
+set NSS_LOCATION=%COMPONENT_URL%/nss/NSS_3_10_2_RTM
+if NOT EXIST %LIBROOT%\nss (
+    pushd %CD%
+    mkdir %LIBROOT%\nss
+    cd %LIBROOT%\nss
+    echo %NSS_LOCATION%/%FLAVOR% > version.txt
+    wget --no-directories %NSS_LOCATION%/%FLAVOR%/mdbinary.jar
+    wget --no-directories -Pinclude %NSS_LOCATION%/xpheader.jar
+    unzip -q mdbinary.jar
+    cd include
+    unzip -q xpheader.jar
+    popd
+)
+
+rem   ------ LDAPSDK ------
+set LDAPSDK_LOCATION=%COMPONENT_URL%/ldapsdk50/v5.16
+if NOT EXIST %LIBROOT%\ldapsdk (
+    pushd %CD%
+    mkdir %LIBROOT%\ldapsdk
+    cd %LIBROOT%\ldapsdk
+    echo %LDAPSDK_LOCATION%/%FLAVOR% > version.txt
+    wget --no-directories %LDAPSDK_LOCATION%/%FLAVOR%/ldapcsdk516.zip
+    unzip -q ldapcsdk516.zip
+    popd
+)
 
 set OK=0
 
+pushd %CD%
+
+rem ======== Build ========
+rem   ------ Set Build Paths ------
+set INCLUDE=%INCLUDE%;%LIBROOT%\ldapsdk\include;%LIBROOT%\nspr\include;%LIBROOT%\nss\include
+set LIB=%LIB%;%LIBROOT%\ldapsdk\lib;%LIBROOT%\nspr\lib;%LIBROOT%\nss\lib
+
+rem   ------ PassSync ------
 cd passsync
-echo Entering %CD%
+echo -------- Beginning PassSync Build --------
 
-:BUILD
-nmake passsync.mak
+nmake /f passsync.mak
 set /a OK=%OK% + %ERRORLEVEL%
 
-copy /Y %OBJDEST%\passsync\passsync.exe %OBJDEST%\
-set /a OK=%OK% + %ERRORLEVEL%
+if [%OK%] GTR [1] (
+    echo -------- PassSync Build Failed! --------
+    goto :END
+) else (
+    echo -------- PassSync Build Successful! --------
+)
 
+rem   ------ Passhook ------
 cd ..\passhook
-echo Entering %CD%
-
-nmake passhook.mak
-set /a OK=%OK% + %ERRORLEVEL%
+echo -------- Beginning Passhook Build --------
 
-copy /Y %OBJDEST%\passhook\passhook.dll %OBJDEST%\
+nmake /f passhook.mak
 set /a OK=%OK% + %ERRORLEVEL%
 
-:PKG
-
-if EXIST ..\%LIBROOT%\ldapsdk\lib\nsldap32v50.dll (
-    copy /Y ..\%LIBROOT%\ldapsdk\lib\nsldap32v50.dll %OBJDEST%\
-)
-if EXIST ..\%LIBROOT%\ldapsdk\lib\nsldapssl32v50.dll (
-    copy /Y ..\%LIBROOT%\ldapsdk\lib\nsldapssl32v50.dll %OBJDEST%\
-)
-if EXIST ..\%LIBROOT%\ldapsdk\lib\nsldappr32v50.dll (
-    copy /Y ..\%LIBROOT%\ldapsdk\lib\nsldappr32v50.dll %OBJDEST%\
-)
-if EXIST ..\%LIBROOT%\nspr\lib\libnspr4.dll (
-    copy /Y ..\%LIBROOT%\nspr\lib\libnspr4.dll %OBJDEST%\
-)
-if EXIST ..\%LIBROOT%\nspr\lib\libplds4.dll (
-    copy /Y ..\%LIBROOT%\nspr\lib\libplds4.dll %OBJDEST%\
-)
-if EXIST ..\%LIBROOT%\nspr\lib\libplc4.dll (
-    copy /Y ..\%LIBROOT%\nspr\lib\libplc4.dll %OBJDEST%\
-)
-if EXIST ..\%LIBROOT%\nss\lib\nss3.dll (
-    copy /Y ..\%LIBROOT%\nss\lib\nss3.dll %OBJDEST%\
-)
-if EXIST ..\%LIBROOT%\nss\lib\ssl3.dll (
-    copy /Y ..\%LIBROOT%\nss\lib\ssl3.dll %OBJDEST%\ 
-)
-if EXIST ..\%LIBROOT%\nss\lib\softokn3.dll (
-    copy /Y ..\%LIBROOT%\nss\lib\softokn3.dll %OBJDEST%\
-)
-if EXIST ..\%LIBROOT%\nss\lib\smime3.dll (
-    copy /Y ..\%LIBROOT%\nss\lib\smime3.dll %OBJDEST%\
-)
-if EXIST ..\%LIBROOT%\nss\bin\certutil.exe (
-    copy /Y ..\%LIBROOT%\nss\bin\certutil.exe %OBJDEST%\
-)
-if EXIST ..\%LIBROOT%\nss\bin\pk12util.exe (
-    copy /Y ..\%LIBROOT%\nss\bin\pk12util.exe %OBJDEST%\
+if [%OK%] GTR [1] (
+    echo -------- Passhook Build Failed! --------
+    goto :END
+) else (
+    echo -------- Passhook Build Successful! --------
 )
 
-xcopy /E /Y /I %WXSDIR%\Binary %OBJDEST%\Binary 
-
-cd %OBJDEST%
-echo Entering %CD%
+rem ======== Package ========
+cd ..
+echo -------- Beginning Packaging --------
 
-candle %WXSDIR%\PassSync.wxs
+nmake /f package.mak
 set /a OK=%OK% + %ERRORLEVEL%
 
-light PassSync.wixobj
-set /a OK=%OK% + %ERRORLEVEL%
+if EXIST %PKGDIR%\PassSync.msi (
+    copy /Y %PKGDIR%\PassSync.msi %DISTDIR%
+    set /a OK=%OK% + %ERRORLEVEL%
+)
 
-:relative
-set OBJDEST=%~f1
-goto :EOF
+if [%OK%] GTR [1] (
+    echo -------- Packaging Failed! --------
+    goto :END
+) else (
+    echo -------- Packaging Successful! --------
+)
 
 :END
 popd
-if %OK% GTR 1 (set OK=1)
+if [%OK%] GTR [1] (
+    echo -------- Build Failed! --------
+    set OK=1
+) else (
+    echo -------- Build Successful! --------
+)
 exit %OK%
+
+:relative
+rem ======== Converts relative path to absolute path ========
+rem   ------ %1 is the path, %2 is the variable to be set ------
+set %2=%~f1
+goto :EOF




More information about the Fedora-directory-commits mailing list