[pkg-opensc-commit] [engine-pkcs11] 08/43: add support for appveyor
Eric Dorland
eric at moszumanska.debian.org
Sun Jan 31 06:38:46 UTC 2016
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository engine-pkcs11.
commit 99049131cad2632a5df458f5426ecbacdba6d13c
Author: LE TOUX Vincent <HG2025 at sdmn01.sirius.infra.com>
Date: Thu Dec 24 16:27:05 2015 +0100
add support for appveyor
---
appveyor.yml | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
make.rules.mak | 36 ++++++++++++++++++++++++++
src/Makefile.am | 2 +-
src/Makefile.mak | 16 +++---------
4 files changed, 120 insertions(+), 13 deletions(-)
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..b6eb161
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,79 @@
+version: 0.2.0.{build}
+
+platform:
+ - x86
+ - x64
+
+configuration:
+ - Release
+ - Debug
+
+
+environment:
+ matrix:
+ - VSVER: 12
+# - VSVER: 10
+
+install:
+ - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
+ https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
+ Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
+ throw "There are newer queued builds for this pull request, failing early." }
+ - date /T & time /T
+ - set PATH=C:\cygwin\bin;%PATH%
+ - set OPENSSL_VER=1_0_2e
+ - ps: >-
+ If ($env:Platform -Match "x86") {
+ $env:VCVARS_PLATFORM="x86"
+ $env:ENV_PLATFORM="x86"
+ $env:NMAKE_ARCH=""
+ $env:OPENSSL_PF="Win32"
+ } Else {
+ $env:VCVARS_PLATFORM="amd64"
+ $env:ENV_PLATFORM="x64"
+ $env:NMAKE_ARCH="BUILD_ON=WIN64 BUILD_FOR=WIN64"
+ $env:OPENSSL_PF="Win64"
+ }
+ - ps: >-
+ If (!(Test-Path -Path "C:\OpenSSL-${env:OPENSSL_PF}" )) {
+ Start-FileDownload https://slproweb.com/download/${env:OPENSSL_PF}OpenSSL-${env:OPENSSL_VER}.exe -FileName C:\WinOpenSSL.exe
+ C:\WinOpenSSL.exe /SILENT /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART
+ }
+ - ps: >-
+ If ($env:Configuration -Like "*Debug*") {
+ $env:NMAKE_EXTRA="DEBUG_DEF=/DDEBUG ${env:NMAKE_EXTRA}"
+ }
+ - ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:VSVER" + "0COMNTOOLS"))
+ - echo "Using Visual Studio %VSVER%.0 at %VSCOMNTOOLS%"
+ - call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" %VCVARS_PLATFORM%
+ - uname -a
+
+build_script:
+ - git clone -q https://github.com/OpenSC/libp11.git C:\projects\libp11
+ - cd C:\projects\libp11
+ - bash -c "exec 0</dev/null && ./bootstrap"
+ # disable features to speed up the script
+ - bash -c "exec 0</dev/null && ./configure OPENSSL_CFLAGS=\"-IC:\OpenSSL-Win32\include -IC:\OpenSSL-Win64\include\" OPENSSL_LIBS=\"-LC:\OpenSSL-Win32 -LC:\OpenSSL-Win64 -leay\" || cat config.log"
+ - cp winconfig.h config.h
+ - nmake /f Makefile.mak %NMAKE_ARCH% %NMAKE_EXTRA%
+ - appveyor PushArtifact src\libp11.dll
+ - appveyor PushArtifact src\libp11.lib
+ - ps: >-
+ If ($env:Configuration -Like "*Debug*") {
+ Push-AppveyorArtifact src\libp11.pdb
+ }
+ - cd C:\projects\engine-pkcs11
+ - bash -c "exec 0</dev/null && ./bootstrap"
+ # disable features to speed up the script
+ - bash -c "exec 0</dev/null && ./configure OPENSSL_CFLAGS=\"-IC:\OpenSSL-Win32\include -IC:\OpenSSL-Win64\include\" OPENSSL_LIBS=\"-LC:\OpenSSL-Win32 -LC:\OpenSSL-Win64 -leay\" LIBP11_CFLAGS=\"-Ic:\projects\libp11\src\" LIBP11_LIBS=\"-Lc:\projects\libp11\src\" || cat config.log"
+ - cp winconfig.h config.h
+ - nmake /f Makefile.mak %NMAKE_ARCH% %NMAKE_EXTRA%
+ - appveyor PushArtifact src\engine_pkcs11.dll
+ - appveyor PushArtifact src\engine_pkcs11.lib
+ - ps: >-
+ If ($env:Configuration -Like "*Debug*") {
+ Push-AppveyorArtifact src\engine_pkcs11.pdb
+ }
+cache:
+ - C:\OpenSSL-Win32
+ - C:\OpenSSL-Win64
diff --git a/make.rules.mak b/make.rules.mak
new file mode 100644
index 0000000..ce6bdba
--- /dev/null
+++ b/make.rules.mak
@@ -0,0 +1,36 @@
+
+LIBP11_DIR = c:\projects\libp11
+!IF "$(BUILD_FOR)" == "WIN64"
+OPENSSL_DIR = C:\OpenSSL-Win64
+!ELSE
+OPENSSL_DIR = C:\OpenSSL-Win32
+!ENDIF
+OPENSSL_INC = /I$(OPENSSL_DIR)\include
+
+!IF "$(DEBUG_DEF)" == "/DDEBUG"
+OPENSSL_LIB = $(OPENSSL_DIR)\lib\VC\$(OPENSSL_STATIC_DIR)\libeay32MTd.lib user32.lib advapi32.lib crypt32.lib gdi32.lib
+!ELSE
+OPENSSL_LIB = $(OPENSSL_DIR)\lib\VC\$(OPENSSL_STATIC_DIR)\libeay32MT.lib user32.lib advapi32.lib crypt32.lib gdi32.lib
+!ENDIF
+
+LIBP11_INC = /I$(LIBP11_DIR)\src
+LIBP11_LIB = $(LIBP11_DIR)\src\libp11.lib
+
+ALL_INCLUDES= $(OPENSSL_INC) $(LIBP11_INC)
+
+!IF "$(DEBUG_DEF)" == "/DDEBUG"
+LINKDEBUGFLAGS = /NODEFAULTLIB:LIBCMT /DEBUG
+CODE_OPTIMIZATION =
+COPTS = /GS /W3 /D_CRT_SECURE_NO_DEPRECATE /MTd /nologo $(ALL_INCLUDES) /I..\ /I. /D_WIN32_WINNT=0x0502 /DWIN32_LEAN_AND_MEAN /DDEBUG /Zi /Od
+!ELSE
+LINKDEBUGFLAGS = /NODEFAULTLIB:LIBCMTD
+COPTS = /GS /W3 /D_CRT_SECURE_NO_DEPRECATE /MT /nologo $(ALL_INCLUDES) /I..\ /I. /D_WIN32_WINNT=0x0502 /DWIN32_LEAN_AND_MEAN
+!ENDIF
+
+!IF "$(BUILD_FOR)" == "WIN64"
+LINKFLAGS = /NOLOGO /INCREMENTAL:NO /MACHINE:X64 /MANIFEST:NO /NODEFAULTLIB:MSVCRTD /NODEFAULTLIB:MSVCRT /NXCOMPAT /DYNAMICBASE $(LINKDEBUGFLAGS)
+LIBFLAGS = /nologo /machine:x64
+!ELSE
+LINKFLAGS = /NOLOGO /INCREMENTAL:NO /MACHINE:X86 /MANIFEST:NO /NODEFAULTLIB:MSVCRTD /NODEFAULTLIB:MSVCRT /NXCOMPAT /DYNAMICBASE $(LINKDEBUGFLAGS)
+LIBFLAGS = /nologo /machine:x86
+!ENDIF
diff --git a/src/Makefile.am b/src/Makefile.am
index 67640c4..1dec4b6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,6 @@
MAINTAINERCLEANFILES = \
$(srcdir)/Makefile.in $(srcdir)/versioninfo.rc
-EXTRA_DIST = Makefile.mak
+EXTRA_DIST = Makefile.mak versioninfo.rc.in
engines_LTLIBRARIES = libpkcs11.la
diff --git a/src/Makefile.mak b/src/Makefile.mak
index cb9151e..2e95617 100644
--- a/src/Makefile.mak
+++ b/src/Makefile.mak
@@ -1,15 +1,7 @@
-# - set the OPENSSL_INCL_DIR below to your openssl include directory, preceded by "/I"
-# - set the OPENSSL_LIB below to your openssl lib file
-# Note: these instructions obsolete the instructions in opensc.html
-
-OPENSSL_INC = /IC:\openssl\include
-OPENSSL_LIB = C:\openssl\lib\libeay32.lib
-LIBP11_INC = /IC:\libp11\include
-LIBP11_LIB = C:\libp11\lib\libp11.lib
-
-COPTS = /Zi /MD /nologo /I..\ /DHAVE_CONFIG_H $(OPENSSL_INC) $(LIBP11_INC) /D_WIN32_WINNT=0x0400 /DWIN32_LEAN_AND_MEAN /DHAVE_OPENSSL
-LINKFLAGS = /DEBUG /NOLOGO /INCREMENTAL:NO /MACHINE:IX86
+TOPDIR = ..
+!INCLUDE $(TOPDIR)\Make.rules.mak
+# see make.rules.mak to edit openssl or libp11 path
TARGET = engine_pkcs11.dll
@@ -24,5 +16,5 @@ $(TARGET): $(OBJECTS) .
echo LIBRARY $* > $*.def
echo EXPORTS >> $*.def
type $*.exports >> $*.def
- link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) $(OBJECTS) $(OPENSSL_LIB) $(LIBP11_LIB) gdi32.lib
+ link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) $(OBJECTS) $(OPENSSL_LIB) $(LIBP11_LIB)
if EXIST $*.dll.manifest mt -manifest $*.dll.manifest -outputresource:$*.dll;2
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/engine-pkcs11.git
More information about the pkg-opensc-commit
mailing list