From 9ce6f20adcd9f5375726fef22cd16919602c152a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Thu, 27 Jan 2011 06:35:33 +0000 Subject: [PATCH] refs #22 --- makefile | 31 +++++++++++++++++++++++++++++++ openssl-act-engine/configure.in | 21 +++++++++++++++++++-- qt/makefile | 14 ++++++++++++++ swisssurfer/configure.in | 22 +++++++++++++++------- swisssurfer/doc/makefile.am | 22 +++++++++++----------- swisssurfer/src/makefile.am | 3 +++ swisssurfer/src/smartcardauth.cxx | 2 ++ swisssurfer/src/swisssurfer_de.ts | 4 ++-- swisssurfer/src/swisssurfer_en.ts | 4 ++-- swisssurfer/src/swisssurfer_fr.ts | 4 ++-- swisssurfer/src/swisssurfer_it.ts | 4 ++-- 11 files changed, 103 insertions(+), 28 deletions(-) create mode 100644 makefile create mode 100644 qt/makefile diff --git a/makefile b/makefile new file mode 100644 index 0000000..178c657 --- /dev/null +++ b/makefile @@ -0,0 +1,31 @@ +QT=$(shell ls -1 qt | sed -n 's/\(qt-.*\)\.tar\.gz/\1/p') + +all: openssl-act-engine qt swisssurfer + +clean: + -cd openssl-act-engine && make maintainer-clean + -cd swisssurfer && make maintainer-clean + -cd qt && make clean + +maintainer-clean: clean + -cd qt && make maintainer-clean + +install: + +32bit: + +64bit: + +openssl-act-engine: + cd $@ && ./bootstrap.sh && ./configure && make + +qt: + cd $@ && make + +swisssurfer: qt openssl-act-engine + cd $@ && ./bootstrap.sh && \ + QMAKE=../../qt/${QT}/bin/qmake ./configure && make + + +.PHONY: openssl-act-engine qt swisssurfer 32bit 64bit all install \ + clean maintainer-clean diff --git a/openssl-act-engine/configure.in b/openssl-act-engine/configure.in index dda7e75..a325d28 100644 --- a/openssl-act-engine/configure.in +++ b/openssl-act-engine/configure.in @@ -5,13 +5,14 @@ # init AC_INIT([README]) -PACKAGENAME=openssl-act-engine SRC_DIR=src TST_DIR= DOC_DIR=doc +m4_define(x_packagename, openssl-act-engine) m4_define(x_major, 1) m4_define(x_minor, 0) + PACKAGENAME=x_packagename MAJOR=x_major MINOR=x_minor @@ -24,7 +25,7 @@ for path in . .. ../..; do fi done -AM_INIT_AUTOMAKE(@PACKAGENAME@, @MAJOR@.@MINOR@.@LEAST@, [marc@waeckerlin.org]) +AM_INIT_AUTOMAKE($PACKAGENAME, $MAJOR.$MINOR.$LEAST, [marc@waeckerlin.org]) # files to create AC_CONFIG_FILES(makefile src/makefile doc/makefile doc/doxyfile) @@ -59,6 +60,22 @@ AC_PROG_LIBTOOL AC_CHECK_PROG(have_doxygen, doxygen, yes, no) AC_CHECK_PROG(have_dot, dot, yes, no) +case ${host} in + (*linux*) case "${host}" in + (*i386*) LDFLAGS+="-L../../actlibrary/Ubuntu-9-i686/Release" + ;; + (*i686|x86_64*) LDFLAGS+="-L../../actlibrary/OpenSUSE-11-x86_64/Release" + ;; + (*) AC_MSG_ERROR([Unknown Linux Host: $host]) + ;; + esac + ;; + (*mingw*) LDFLAGS+="-L../../actlibrary/mingw32-i586/Release" + ;; + (*) AC_MSG_ERROR([Unknown Host: $host]) + ;; +esac + AC_ARG_ENABLE(pedantic, [AS_HELP_STRING([--enable-pedantic], [enable all warnings and checks, abort on warnings])], diff --git a/qt/makefile b/qt/makefile new file mode 100644 index 0000000..1157246 --- /dev/null +++ b/qt/makefile @@ -0,0 +1,14 @@ +QT=$(shell ls -1 | sed -n 's/\(qt-.*\)\.tar\.gz/\1/p') + +all: ${QT} + cd $< && (echo "yes" | ./configure -opensource) + cd $< && make + +maintainer-clean: clean + -rm -rf ${QT} + +${QT}: ${QT}.tar.gz + tar xzvf $< + cd $@ && patch -p1 < ../patch/qt-sources-patch.diff + +.PHONY: maintainer-clean all \ No newline at end of file diff --git a/swisssurfer/configure.in b/swisssurfer/configure.in index fb72846..eaa98de 100644 --- a/swisssurfer/configure.in +++ b/swisssurfer/configure.in @@ -1,24 +1,32 @@ # init AC_INIT([README]) -PACKAGENAME=swisssurfer SRC_DIR=src TST_DIR= DOC_DIR=doc +m4_define(x_packagename, swisssurfer) m4_define(x_major, 1) m4_define(x_minor, 0) -m4_define(x_least, 0) -AM_INIT_AUTOMAKE(@PACKAGENAME@, @MAJOR@.@MINOR@.@LEAST@, [marc@waeckerlin.org]) + +PACKAGENAME=x_packagename +MAJOR=x_major +MINOR=x_minor + +LEAST="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout" +for path in . .. ../..; do + if svn info $path 2>&1 > /dev/null; then + LEAST=$(LANG= svn info $path | sed -n 's/Revision: //p') + break; + fi +done + +AM_INIT_AUTOMAKE($PACKAGENAME, $MAJOR.$MINOR.$LEAST, [marc@waeckerlin.org]) # files to create AC_CONFIG_FILES(makefile src/makefile src/qmake.pro src/languages.qrc doc/doxyfile doc/makefile) -# copy M4 to shell -MAJOR=x_major -MINOR=x_minor -LEAST=x_least AC_SUBST(MAJOR) AC_SUBST(MINOR) AC_SUBST(LEAST) diff --git a/swisssurfer/doc/makefile.am b/swisssurfer/doc/makefile.am index 8443e5a..41abc7f 100644 --- a/swisssurfer/doc/makefile.am +++ b/swisssurfer/doc/makefile.am @@ -5,8 +5,8 @@ ## 1 2 3 4 5 6 7 8 ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 -#develdir = ${pkgdatadir}/doc/devel -#devel_DATA = devel/index.html +develdir = ${pkgdatadir}/doc +devel_DATA = html/index.html ALL_SRC = ${top_srcdir}/src/*.[ch]xx # ${top_srcdir}/src/*.doc @@ -21,7 +21,7 @@ all: ${DIRS} deps = ${top_srcdir}/COPYING ${top_srcdir}/README \ ${top_srcdir}/INSTALL ${top_srcdir}/NEWS ${top_srcdir}/ChangeLog -html: ${ALL_SRC} doxyfile ${deps} +${devel_DATA}: ${ALL_SRC} doxyfile ${deps} doxygen doxyfile if PEDANTIC test \! -s doxygen.errors @@ -36,13 +36,13 @@ MAINTAINERCLEANFILES = makefile.in distclean-local: - rm -r html latex -#dist-hook: -# cp html/* ${develdir} +dist-hook: ${devel_DATA} + cp -r html ${distdir}/ -#install-data-hook: -# chmod -R u+w ${pkgdatadir}/doc -# cp devel/* ${develdir} +install-data-hook: + chmod -R u+w ${develdir} + cp -r html/* ${develdir}/ -#uninstall-hook: -# chmod -R u+w ${pkgdatadir}/doc -# rm -rf ${develdir} +uninstall-hook: + -chmod -R u+w ${develdir} + -rm -rf ${develdir}/* diff --git a/swisssurfer/src/makefile.am b/swisssurfer/src/makefile.am index 4a82cf0..a593460 100644 --- a/swisssurfer/src/makefile.am +++ b/swisssurfer/src/makefile.am @@ -17,6 +17,9 @@ QMAKE_TARGET = @PACKAGENAME@ TARGETS = ${QMAKE_TARGET} +EXTRA_SCRIPTS= swisssurfer +bin_SCRIPTS = ${EXTRA_SCRIPTS} + if BUILD_WIN QMAKE_MAKEFILE_WIN = makefile.win.qmake QMAKE_OPTIONS_WIN = ${QMAKE_OPTIONS} -win32 -spec cross-mingw-g++ diff --git a/swisssurfer/src/smartcardauth.cxx b/swisssurfer/src/smartcardauth.cxx index db5616d..f395801 100644 --- a/swisssurfer/src/smartcardauth.cxx +++ b/swisssurfer/src/smartcardauth.cxx @@ -58,6 +58,7 @@ SmartCardAuth::~SmartCardAuth() { std::map sockets; int client_cert_cb(SSL* ssl, X509 **x509, EVP_PKEY **pkey) { + if (!e) return 0; static std::set allowedUrls; std::map::iterator it(sockets.find(ssl->ctx)); if (it!=sockets.end()) { @@ -153,6 +154,7 @@ int client_cert_cb(SSL* ssl, X509 **x509, EVP_PKEY **pkey) { void SmartCardAuth::extendedContextInitialization(ssl_ctx_st *ctx, QSslSocket *socket) { + if (!e) return; bool result = false; if(!certs_found) diff --git a/swisssurfer/src/swisssurfer_de.ts b/swisssurfer/src/swisssurfer_de.ts index bc56f52..b38c4f0 100644 --- a/swisssurfer/src/swisssurfer_de.ts +++ b/swisssurfer/src/swisssurfer_de.ts @@ -505,12 +505,12 @@ Try: %1 --help - + Send Authentication? - + Do you want to authenticate yourself to %1? diff --git a/swisssurfer/src/swisssurfer_en.ts b/swisssurfer/src/swisssurfer_en.ts index bc56f52..b38c4f0 100644 --- a/swisssurfer/src/swisssurfer_en.ts +++ b/swisssurfer/src/swisssurfer_en.ts @@ -505,12 +505,12 @@ Try: %1 --help - + Send Authentication? - + Do you want to authenticate yourself to %1? diff --git a/swisssurfer/src/swisssurfer_fr.ts b/swisssurfer/src/swisssurfer_fr.ts index bc56f52..b38c4f0 100644 --- a/swisssurfer/src/swisssurfer_fr.ts +++ b/swisssurfer/src/swisssurfer_fr.ts @@ -505,12 +505,12 @@ Try: %1 --help - + Send Authentication? - + Do you want to authenticate yourself to %1? diff --git a/swisssurfer/src/swisssurfer_it.ts b/swisssurfer/src/swisssurfer_it.ts index bc56f52..b38c4f0 100644 --- a/swisssurfer/src/swisssurfer_it.ts +++ b/swisssurfer/src/swisssurfer_it.ts @@ -505,12 +505,12 @@ Try: %1 --help - + Send Authentication? - + Do you want to authenticate yourself to %1?