diff options
author | Othmar Gsenger <otti@anytun.org> | 2008-04-11 12:46:21 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2008-04-11 12:46:21 +0000 |
commit | 027a94bda27724154370e9e363cd8e4eb84383bc (patch) | |
tree | 0bc02a255ea91e5a91542dd5c99fdfa21b7ef551 | |
parent | fixed wireshark lua script with ethernet tunneling (diff) |
fixed makefile
-rw-r--r-- | Makefile | 20 | ||||
-rw-r--r-- | openvpn/config-win32.h | 309 | ||||
-rw-r--r-- | openvpn/install-win32/openvpn.nsi | 570 | ||||
-rw-r--r-- | openvpn/openvpn.spec | 273 | ||||
-rw-r--r-- | openvpn/stamp-h1 | 1 |
5 files changed, 19 insertions, 1154 deletions
@@ -119,7 +119,7 @@ ANYCTROBJS = log.o \ EXECUTABLE = anytun anytun-config anytun-controld anytun-showtables -all: $(EXECUTABLE) libAnysync.a +all: $(EXECUTABLE) libAnysync.a anyrtpproxy anytun: $(OBJS) anytun.o $(LD) $(OBJS) anytun.o -o $@ $(LDFLAGS) @@ -136,6 +136,9 @@ anytun-controld: $(ANYMUXOBJS) anytun-controld.o tunDevice.o: tunDevice.cpp tunDevice.h $(C++) $(CCFLAGS) $< -c +Sockets/libSockets.a: + make --directory=./Sockets + packetSource.o: packetSource.cpp packetSource.h $(C++) $(CCFLAGS) $< -c @@ -263,11 +266,26 @@ libAnysync.a: $(OBJS) ar cru $@ $(OBJS) ranlib $@ +anyrtpproxy: anytun + @cd anyrtpproxy ; make + +distclean: clean + make --directory=$(CURDIR)/openvpn distclean + find -name *.o | xargs rm -f + rm -f config.sub config.guess + +cleanall: clean + make --directory=$(CURDIR)/Sockets clean + make --directory=$(CURDIR)/openvpn clean + rm -f Sockets/libSockets.a Sockets/Sockets-config + clean: rm -f *.o rm -f $(EXECUTABLE) rm -f -r doc/html/* rm -f -r doc/latex/* + rm -f libAnysync.a + make --directory=$(CURDIR)/anyrtpproxy clean doxygen: doxygen Doxyfile diff --git a/openvpn/config-win32.h b/openvpn/config-win32.h deleted file mode 100644 index 1a21390..0000000 --- a/openvpn/config-win32.h +++ /dev/null @@ -1,309 +0,0 @@ -/* - * OpenVPN -- An application to securely tunnel IP networks - * over a single UDP port, with support for SSL/TLS-based - * session authentication and key exchange, - * packet encryption, packet authentication, and - * packet compression. - * - * Copyright (C) 2002-2005 OpenVPN Solutions LLC <info@openvpn.net> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation. - * - * 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 (see the file COPYING included with this - * distribution); if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* - * Configuration header for Win32 using the mingw environment. - * Manually edited based on linux version as generated by autoconf. - * - * config-win32.h is normally generated by copying - * config-win32.h.in -> config-win32.h and replacing - * [ampersand] VERSION [ampersand] - * with the appropriate version #. This is normally - * done automatically by configure.ac - */ - -#include <windows.h> -#include <winsock2.h> - -#define sleep(x) Sleep((x)*1000) - -#define random rand -#define srandom srand - -typedef unsigned long in_addr_t; - -#ifndef _SSIZE_T_ -#define _SSIZE_T_ - typedef unsigned int ssize_t; -#endif - -/* Append a label to program startup title */ -/*#define DEBUG_LABEL "DEBUG1"*/ - -/* Should we print debug info from driver? */ -/*#define TAP_WIN32_DEBUG*/ - -/* - * Minimum TAP-Win32 version number expected by userspace - * - * The TAP-Win32 version number is defined in tap-win32/SOURCES - */ -#define TAP_WIN32_MIN_MAJOR 8 -#define TAP_WIN32_MIN_MINOR 1 - -/* Allow --askpass and --auth-user-pass passwords to be read from a file */ -/* #undef ENABLE_PASSWORD_SAVE */ - -/* Enable client/server capability */ -#define ENABLE_CLIENT_SERVER 1 - -/* Enable client capability only */ -/* #undef ENABLE_CLIENT_ONLY */ - -/* Enable management server capability */ -#define ENABLE_MANAGEMENT 1 - -/* Enable HTTP proxy support */ -#define ENABLE_HTTP_PROXY 1 - -/* Enable Socks proxy support */ -#define ENABLE_SOCKS 1 - -/* Enable internal fragmentation support */ -#define ENABLE_FRAGMENT 1 - -/* Enable smaller executable size */ -/* #undef ENABLE_SMALL */ - -/* Enable debugging support */ -#define ENABLE_DEBUG 1 - -/* if defined, will allow usage of the --plugin directive */ -#define USE_LOAD_LIBRARY - -/* Dimension size to use for empty array declaration */ -#define EMPTY_ARRAY_SIZE 0 - -/* Define to 1 if you have the <openssl/engine.h> header file. */ -#define HAVE_OPENSSL_ENGINE_H 1 - -/* Define to 1 if you have the `ENGINE_load_builtin_engines' function. */ -#define HAVE_ENGINE_LOAD_BUILTIN_ENGINES 1 - -/* Define to 1 if you have the `ENGINE_register_all_complete' function. */ -#define HAVE_ENGINE_REGISTER_ALL_COMPLETE 1 - -/* Define to 1 if you have the `ENGINE_cleanup' function. */ -#define HAVE_ENGINE_CLEANUP 1 - -/* gettimeofday() is implemented in otime.c for Windows */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the 'chsize' function. */ -#define HAVE_CHSIZE 1 - -/* Define to 1 if you have the `chdir' function. */ -#define HAVE_CHDIR 1 - -/* Define to 1 if your compiler supports GNU GCC-style variadic macros */ -#ifndef _MSC_VER /* Defines MSFT compiler version. Defined as 1200 for MSVC++ 6.0. */ -#define HAVE_CPP_VARARG_MACRO_GCC 1 -#endif - -/* Define to 1 if you have the <ctype.h> header file. */ -#define HAVE_CTYPE_H 1 - -/* Define to 1 if you have the <errno.h> header file. */ -#define HAVE_ERRNO_H 1 - -/* Define to 1 if you have the `EVP_CIPHER_CTX_set_key_length' function. */ -#define HAVE_EVP_CIPHER_CTX_SET_KEY_LENGTH 1 - -/* Define to 1 if you have the <fcntl.h> header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `getsockopt' function. */ -#define HAVE_GETSOCKOPT 1 - -/* Define to 1 if you have the `inet_ntoa' function. */ -#define HAVE_INET_NTOA 1 - -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and - to 0 otherwise. */ -#define HAVE_MALLOC 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `setsockopt' function. */ -#define HAVE_SETSOCKOPT 1 - -/* Define to 1 if you have the `socket' function. */ -#define HAVE_SOCKET 1 - -/* Define to 1 if you have the <stdarg.h> header file. */ -#define HAVE_STDARG_H 1 - -/* Define to 1 if you have the <stdint.h> header file. */ -#ifndef _MSC_VER -#define HAVE_STDINT_H 1 -#endif - -/* Define to 1 if you have the <stdio.h> header file. */ -#define HAVE_STDIO_H 1 - -/* Define to 1 if you have the <stdlib.h> header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if you have the <strings.h> header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the <string.h> header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `system' function. */ -#define HAVE_SYSTEM 1 - -/* Define to 1 if you have the <sys/file.h> header file. */ -#ifndef _MSC_VER -#define HAVE_SYS_FILE_H 1 -#endif - -/* Define to 1 if you have the <sys/stat.h> header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the <sys/time.h> header file. */ -#ifndef _MSC_VER -#define HAVE_SYS_TIME_H 1 -#endif - -/* Define to 1 if you have the <sys/types.h> header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the `time' function. */ -#define HAVE_TIME 1 - -/* Define to 1 if you have the <unistd.h> header file. */ -#ifndef _MSC_VER -#define HAVE_UNISTD_H 1 -#endif - -/* Define to 1 if you have the `vsnprintf' function. */ -#define HAVE_VSNPRINTF 1 - -/* Special Windows version of getpass() defined in io.c */ -#define HAVE_GETPASS 1 - -/* Name of package */ -#define PACKAGE "openvpn" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "openvpn-users@lists.sourceforge.net" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "OpenVPN" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "openvpn" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "2.0.9" /* AUTO_VERSION */ - -/* Define to the full name and version of this package. */ -#ifdef DEBUG_LABEL -#define PACKAGE_STRING "OpenVPN " PACKAGE_VERSION " " DEBUG_LABEL -#else -#define PACKAGE_STRING "OpenVPN " PACKAGE_VERSION -#endif - -/* Define as the return type of signal handlers (`int' or `void'). */ -#define RETSIGTYPE void - -/* The size of a `unsigned int', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_INT 4 - -/* The size of a `unsigned long', as computed by sizeof. */ -#define SIZEOF_UNSIGNED_LONG 4 - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* A string representing our target */ -#ifdef _MSC_VER -#define TARGET_ALIAS "Win32-MSVC++" -#else -#define TARGET_ALIAS "Win32-MinGW" -#endif - -/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ -#ifndef _MSC_VER -#define TIME_WITH_SYS_TIME 1 -#endif - -/* Use OpenSSL crypto library */ -#define USE_CRYPTO 1 - -/* Use LZO compression library */ -#define USE_LZO 1 - -/* Use OpenSSL SSL library */ -#define USE_SSL 1 - -/* Version number of package */ -#define VERSION PACKAGE_VERSION - -/* Define as `__inline' if that's what the C compiler calls it, or to nothing - if it is not supported. */ -#define inline __inline - -/* type to use in place of socklen_t if not defined */ -#define socklen_t unsigned int - -/* 32-bit unsigned type */ -#define uint32_t unsigned int - -/* 16-bit unsigned type */ -#define uint16_t unsigned short - -/* 8-bit unsigned type */ -#define uint8_t unsigned char - -/* Route command */ -#define ROUTE_PATH "route" - -/* Windows doesn't support PTHREAD yet */ -#ifdef USE_PTHREAD -#error The Windows version of OpenVPN does not support PTHREAD yet -#endif - -#ifdef _MSC_VER -/* MSVC++ hacks */ -#include <io.h> -#include <direct.h> -#define vsnprintf _vsnprintf -#define vsnwprintf _vsnwprintf -#define snwprintf _snwprintf -#define write _write -#define open _open -#define read _read -#define close _close -#define chdir _chdir -#define S_IRUSR 0 -#define S_IWUSR 0 -typedef int intptr_t; -#undef S_NORMAL -#endif diff --git a/openvpn/install-win32/openvpn.nsi b/openvpn/install-win32/openvpn.nsi deleted file mode 100644 index 01c1dc2..0000000 --- a/openvpn/install-win32/openvpn.nsi +++ /dev/null @@ -1,570 +0,0 @@ -; **************************************************************************** -; * Copyright (C) 2002-2005 OpenVPN Solutions LLC * -; * This program is free software; you can redistribute it and/or modify * -; * it under the terms of the GNU General Public License version 2 * -; * as published by the Free Software Foundation. * -; **************************************************************************** - -; OpenVPN install script for Windows, using NSIS - -!include "MUI.nsh" -!include "setpath.nsi" - -!define HOME ".." -!define BIN "${HOME}\bin" - -!define PRODUCT_NAME "OpenVPN" -!define VERSION "2.0.9" # AUTO_VERSION - -!define TAP "tap0801" -!define TAPDRV "${TAP}.sys" - -; something like "-DBG2" -!define OUTFILE_LABEL "" - -; something like "DEBUG2" -!define TITLE_LABEL "" - -; Default service settings -!define SERV_CONFIG_DIR "$INSTDIR\config" -!define SERV_CONFIG_EXT "ovpn" -!define SERV_EXE_PATH "$INSTDIR\bin\openvpn.exe" -!define SERV_LOG_DIR "$INSTDIR\log" -!define SERV_PRIORITY "NORMAL_PRIORITY_CLASS" -!define SERV_LOG_APPEND "0" - -;-------------------------------- -;Configuration - - ;General - - OutFile "openvpn-${VERSION}${OUTFILE_LABEL}-install.exe" - - SetCompressor bzip2 - - ShowInstDetails show - ShowUninstDetails show - - ;Folder selection page - InstallDir "$PROGRAMFILES\${PRODUCT_NAME}" - - ;Remember install folder - InstallDirRegKey HKCU "Software\${PRODUCT_NAME}" "" - -;-------------------------------- -;Modern UI Configuration - - Name "${PRODUCT_NAME} ${VERSION} ${TITLE_LABEL}" - - !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of OpenVPN, an Open Source VPN package by James Yonan.\r\n\r\nNote that the Windows version of OpenVPN will only run on Win 2000, XP, or higher.\r\n\r\n\r\n" - - !define MUI_COMPONENTSPAGE_TEXT_TOP "Select the components to install/upgrade. Stop any OpenVPN processes or the OpenVPN service if it is running. All DLLs are installed locally." - - !define MUI_COMPONENTSPAGE_SMALLDESC - !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\INSTALL-win32.txt" - !define MUI_FINISHPAGE_NOAUTOCLOSE - !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED - !define MUI_ABORTWARNING - !define MUI_ICON "${HOME}\install-win32\openvpn.ico" - !define MUI_UNICON "${HOME}\install-win32\openvpn.ico" - !define MUI_HEADERIMAGE - !define MUI_HEADERIMAGE_BITMAP "${HOME}\install-win32\install-whirl.bmp" - !define MUI_UNFINISHPAGE_NOAUTOCLOSE - - !insertmacro MUI_PAGE_WELCOME - !insertmacro MUI_PAGE_LICENSE "${HOME}\install-win32\license.txt" - !insertmacro MUI_PAGE_COMPONENTS - !insertmacro MUI_PAGE_DIRECTORY - !insertmacro MUI_PAGE_INSTFILES - !insertmacro MUI_PAGE_FINISH - - !insertmacro MUI_UNPAGE_CONFIRM - !insertmacro MUI_UNPAGE_INSTFILES - !insertmacro MUI_UNPAGE_FINISH - - -;-------------------------------- -;Languages - - !insertmacro MUI_LANGUAGE "English" - -;-------------------------------- -;Language Strings - - LangString DESC_SecOpenVPNUserSpace ${LANG_ENGLISH} "Install OpenVPN user-space components, including openvpn.exe." - - LangString DESC_SecOpenVPNEasyRSA ${LANG_ENGLISH} "Install OpenVPN RSA scripts for X509 certificate management." - - LangString DESC_SecOpenSSLDLLs ${LANG_ENGLISH} "Install OpenSSL DLLs locally (may be omitted if DLLs are already installed globally)." - - LangString DESC_SecTAP ${LANG_ENGLISH} "Install/Upgrade the TAP-Win32 virtual device driver. Will not interfere with CIPE." - - LangString DESC_SecService ${LANG_ENGLISH} "Install the OpenVPN service wrapper (openvpnserv.exe)" - - LangString DESC_SecOpenSSLUtilities ${LANG_ENGLISH} "Install the OpenSSL Utilities (used for generating public/private key pairs)." - - LangString DESC_SecAddPath ${LANG_ENGLISH} "Add OpenVPN executable directory to the current user's PATH." - - LangString DESC_SecAddShortcuts ${LANG_ENGLISH} "Add OpenVPN shortcuts to the current user's Start Menu." - - LangString DESC_SecFileAssociation ${LANG_ENGLISH} "Register OpenVPN config file association (*.${SERV_CONFIG_EXT})" - -;-------------------------------- -;Reserve Files - - ;Things that need to be extracted on first (keep these lines before any File command!) - ;Only useful for BZIP2 compression - - ReserveFile "${HOME}\install-win32\install-whirl.bmp" - -;-------------------------------- -;Macros - -!macro WriteRegStringIfUndef ROOT SUBKEY KEY VALUE -Push $R0 -ReadRegStr $R0 "${ROOT}" "${SUBKEY}" "${KEY}" -StrCmp $R0 "" +1 +2 -WriteRegStr "${ROOT}" "${SUBKEY}" "${KEY}" '${VALUE}' -Pop $R0 -!macroend - -!macro DelRegStringIfUnchanged ROOT SUBKEY KEY VALUE -Push $R0 -ReadRegStr $R0 "${ROOT}" "${SUBKEY}" "${KEY}" -StrCmp $R0 '${VALUE}' +1 +2 -DeleteRegValue "${ROOT}" "${SUBKEY}" "${KEY}" -Pop $R0 -!macroend - -!macro DelRegKeyIfUnchanged ROOT SUBKEY VALUE -Push $R0 -ReadRegStr $R0 "${ROOT}" "${SUBKEY}" "" -StrCmp $R0 '${VALUE}' +1 +2 -DeleteRegKey "${ROOT}" "${SUBKEY}" -Pop $R0 -!macroend - -!macro DelRegKeyIfEmpty ROOT SUBKEY -Push $R0 -EnumRegValue $R0 "${ROOT}" "${SUBKEY}" 1 -StrCmp $R0 "" +1 +2 -DeleteRegKey /ifempty "${ROOT}" "${SUBKEY}" -Pop $R0 -!macroend - -;------------------------------------------ -;Set reboot flag based on tapinstall return - -Function CheckReboot - IntCmp $R0 1 "" noreboot noreboot - IntOp $R0 0 & 0 - SetRebootFlag true - DetailPrint "REBOOT flag set" - noreboot: -FunctionEnd - -;-------------------------------- -;Installer Sections - -Function .onInit - ClearErrors - UserInfo::GetName - IfErrors ok - Pop $R0 - UserInfo::GetAccountType - Pop $R1 - StrCmp $R1 "Admin" ok - Messagebox MB_OK "Administrator privileges required to install OpenVPN [$R0/$R1]" - Abort - ok: -FunctionEnd - -!define SF_SELECTED 1 - -Section "OpenVPN User-Space Components" SecOpenVPNUserSpace - - SetOverwrite on - SetOutPath "$INSTDIR\bin" - - File "${HOME}\openvpn.exe" - -SectionEnd - -Section "OpenVPN RSA Certificate Management Scripts" SecOpenVPNEasyRSA - - SetOverwrite on - SetOutPath "$INSTDIR\easy-rsa" - - File "${HOME}\install-win32\openssl.cnf.sample" - File "${HOME}\easy-rsa\Windows\vars.bat.sample" - - File "${HOME}\easy-rsa\Windows\init-config.bat" - - File "${HOME}\easy-rsa\Windows\README.txt" - File "${HOME}\easy-rsa\Windows\build-ca.bat" - File "${HOME}\easy-rsa\Windows\build-dh.bat" - File "${HOME}\easy-rsa\Windows\build-key-server.bat" - File "${HOME}\easy-rsa\Windows\build-key.bat" - File "${HOME}\easy-rsa\Windows\build-key-pkcs12.bat" - File "${HOME}\easy-rsa\Windows\clean-all.bat" - File "${HOME}\easy-rsa\Windows\index.txt.start" - File "${HOME}\easy-rsa\Windows\revoke-full.bat" - File "${HOME}\easy-rsa\Windows\serial.start" - -SectionEnd - -Section "OpenVPN Service" SecService - - SetOverwrite on - - SetOutPath "$INSTDIR\bin" - File "${HOME}\service-win32\openvpnserv.exe" - - SetOutPath "$INSTDIR\config" - - FileOpen $R0 "$INSTDIR\config\README.txt" w - FileWrite $R0 "This directory should contain OpenVPN configuration files$\r$\n" - FileWrite $R0 "each having an extension of .${SERV_CONFIG_EXT}$\r$\n" - FileWrite $R0 "$\r$\n" - FileWrite $R0 "When OpenVPN is started as a service, a separate OpenVPN$\r$\n" - FileWrite $R0 "process will be instantiated for each configuration file.$\r$\n" - FileClose $R0 - - SetOutPath "$INSTDIR\sample-config" - File "${HOME}\install-win32\sample.${SERV_CONFIG_EXT}" - File "${HOME}\install-win32\client.${SERV_CONFIG_EXT}" - File "${HOME}\install-win32\server.${SERV_CONFIG_EXT}" - - CreateDirectory "$INSTDIR\log" - FileOpen $R0 "$INSTDIR\log\README.txt" w - FileWrite $R0 "This directory will contain the log files for OpenVPN$\r$\n" - FileWrite $R0 "sessions which are being run as a service.$\r$\n" - FileClose $R0 - -SectionEnd - -Section "OpenVPN File Associations" SecFileAssociation -SectionEnd - -Section "OpenSSL DLLs" SecOpenSSLDLLs - - SetOverwrite on - SetOutPath "$INSTDIR\bin" - File "${BIN}\libeay32.dll" - File "${BIN}\libssl32.dll" - -SectionEnd - -Section "OpenSSL Utilities" SecOpenSSLUtilities - - SetOverwrite on - SetOutPath "$INSTDIR\bin" - File "${BIN}\openssl.exe" - -SectionEnd - -Section "TAP-Win32 Virtual Ethernet Adapter" SecTAP - - SetOverwrite on - SetOutPath "$INSTDIR\bin" - File "${BIN}\ti3790\tapinstall.exe" - - FileOpen $R0 "$INSTDIR\bin\addtap.bat" w - FileWrite $R0 "rem Add a new TAP-Win32 virtual ethernet adapter$\r$\n" - FileWrite $R0 '"$INSTDIR\bin\tapinstall.exe" install "$INSTDIR\driver\OemWin2k.inf" ${TAP}$\r$\n' - FileWrite $R0 "pause$\r$\n" - FileClose $R0 - - FileOpen $R0 "$INSTDIR\bin\deltapall.bat" w - FileWrite $R0 "echo WARNING: this script will delete ALL TAP-Win32 virtual adapters (use the device manager to delete adapters one at a time)$\r$\n" - FileWrite $R0 "pause$\r$\n" - FileWrite $R0 '"$INSTDIR\bin\tapinstall.exe" remove ${TAP}$\r$\n' - FileWrite $R0 "pause$\r$\n" - FileClose $R0 - - SetOutPath "$INSTDIR\driver" - File "${HOME}\tap-win32\i386\OemWin2k.inf" - File "${HOME}\tap-win32\i386\${TAPDRV}" - -SectionEnd - -Section "Add OpenVPN to PATH" SecAddPath - - ; remove previously set path (if any) - Push "$INSTDIR\bin" - Call RemoveFromPath - - ; append our bin directory to end of current user path - Push "$INSTDIR\bin" - Call AddToPath - -SectionEnd - -Section "Add Shortcuts to Start Menu" SecAddShortcuts - - SetOverwrite on - CreateDirectory "$SMPROGRAMS\OpenVPN" - WriteINIStr "$SMPROGRAMS\OpenVPN\OpenVPN Windows Notes.url" "InternetShortcut" "URL" "http://openvpn.net/INSTALL-win32.html" - WriteINIStr "$SMPROGRAMS\OpenVPN\OpenVPN Manual Page.url" "InternetShortcut" "URL" "http://openvpn.net/man.html" - WriteINIStr "$SMPROGRAMS\OpenVPN\OpenVPN HOWTO.url" "InternetShortcut" "URL" "http://openvpn.net/howto.html" - WriteINIStr "$SMPROGRAMS\OpenVPN\OpenVPN Web Site.url" "InternetShortcut" "URL" "http://openvpn.net/" - CreateShortCut "$SMPROGRAMS\OpenVPN\Uninstall OpenVPN.lnk" "$INSTDIR\Uninstall.exe" - -SectionEnd - -;-------------------- -;Post-install section - -Section -post - - ; delete old devcon.exe - Delete "$INSTDIR\bin\devcon.exe" - - ; - ; install/upgrade TAP-Win32 driver if selected, using tapinstall.exe - ; - SectionGetFlags ${SecTAP} $R0 - IntOp $R0 $R0 & ${SF_SELECTED} - IntCmp $R0 ${SF_SELECTED} "" notap notap - ; TAP install/update was selected. - ; Should we install or update? - ; If tapinstall error occurred, $5 will - ; be nonzero. - IntOp $5 0 & 0 - nsExec::ExecToStack '"$INSTDIR\bin\tapinstall.exe" hwids ${TAP}' - Pop $R0 # return value/error/timeout - IntOp $5 $5 | $R0 - DetailPrint "tapinstall hwids returned: $R0" - - ; If tapinstall output string contains "${TAP}" we assume - ; that TAP device has been previously installed, - ; therefore we will update, not install. - Push "${TAP}" - Call StrStr - Pop $R0 - - IntCmp $5 0 "" tapinstall_check_error tapinstall_check_error - IntCmp $R0 -1 tapinstall - - ;tapupdate: - DetailPrint "TAP-Win32 UPDATE" - nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" update "$INSTDIR\driver\OemWin2k.inf" ${TAP}' - Pop $R0 # return value/error/timeout - Call CheckReboot - IntOp $5 $5 | $R0 - DetailPrint "tapinstall update returned: $R0" - Goto tapinstall_check_error - - tapinstall: - DetailPrint "TAP-Win32 REMOVE OLD TAP" - nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" remove TAP' - Pop $R0 # return value/error/timeout - DetailPrint "tapinstall remove TAP returned: $R0" - nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" remove TAPDEV' - Pop $R0 # return value/error/timeout - DetailPrint "tapinstall remove TAPDEV returned: $R0" - - DetailPrint "TAP-Win32 INSTALL (${TAP})" - nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" install "$INSTDIR\driver\OemWin2k.inf" ${TAP}' - Pop $R0 # return value/error/timeout - Call CheckReboot - IntOp $5 $5 | $R0 - DetailPrint "tapinstall install returned: $R0" - - tapinstall_check_error: - DetailPrint "tapinstall cumulative status: $5" - IntCmp $5 0 notap - MessageBox MB_OK "An error occurred installing the TAP-Win32 device driver." - - notap: - - ; Store install folder in registry - WriteRegStr HKLM SOFTWARE\OpenVPN "" $INSTDIR - - ; install as a service if requested - SectionGetFlags ${SecService} $R0 - IntOp $R0 $R0 & ${SF_SELECTED} - IntCmp $R0 ${SF_SELECTED} "" noserv noserv - - ; set registry parameters for openvpnserv - !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN" "config_dir" "${SERV_CONFIG_DIR}" - !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN" "config_ext" "${SERV_CONFIG_EXT}" - !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN" "exe_path" "${SERV_EXE_PATH}" - !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN" "log_dir" "${SERV_LOG_DIR}" - !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN" "priority" "${SERV_PRIORITY}" - !insertmacro WriteRegStringIfUndef HKLM "SOFTWARE\OpenVPN" "log_append" "${SERV_LOG_APPEND}" - - ; install openvpnserv as a service - DetailPrint "Previous Service REMOVE (if exists)" - nsExec::ExecToLog '"$INSTDIR\bin\openvpnserv.exe" -remove' - Pop $R0 # return value/error/timeout - DetailPrint "Service INSTALL" - nsExec::ExecToLog '"$INSTDIR\bin\openvpnserv.exe" -install' - Pop $R0 # return value/error/timeout - - noserv: - ; Store README, license, icon - SetOverwrite on - SetOutPath $INSTDIR - File "${HOME}\install-win32\INSTALL-win32.txt" - File "${HOME}\install-win32\license.txt" - File "${HOME}\install-win32\openvpn.ico" - - ; Create file association if requested - SectionGetFlags ${SecFileAssociation} $R0 - IntOp $R0 $R0 & ${SF_SELECTED} - IntCmp $R0 ${SF_SELECTED} "" noass noass - !insertmacro WriteRegStringIfUndef HKCR ".${SERV_CONFIG_EXT}" "" "OpenVPNFile" - !insertmacro WriteRegStringIfUndef HKCR "OpenVPNFile" "" "OpenVPN Config File" - !insertmacro WriteRegStringIfUndef HKCR "OpenVPNFile\shell" "" "open" - !insertmacro WriteRegStringIfUndef HKCR "OpenVPNFile\DefaultIcon" "" "$INSTDIR\openvpn.ico,0" - !insertmacro WriteRegStringIfUndef HKCR "OpenVPNFile\shell\open\command" "" 'notepad.exe "%1"' - !insertmacro WriteRegStringIfUndef HKCR "OpenVPNFile\shell\run" "" "Start OpenVPN on this config file" - !insertmacro WriteRegStringIfUndef HKCR "OpenVPNFile\shell\run\command" "" '"$INSTDIR\bin\openvpn.exe" --pause-exit --config "%1"' - - ; Create start menu shortcuts to addtap.bat and deltapall.bat - noass: - IfFileExists "$INSTDIR\bin\addtap.bat" "" trydeltap - CreateShortCut "$SMPROGRAMS\OpenVPN\Add a new TAP-Win32 virtual ethernet adapter.lnk" "$INSTDIR\bin\addtap.bat" "" - - trydeltap: - IfFileExists "$INSTDIR\bin\deltapall.bat" "" config_shortcut - CreateShortCut "$SMPROGRAMS\OpenVPN\Delete ALL TAP-Win32 virtual ethernet adapters.lnk" "$INSTDIR\bin\deltapall.bat" "" - - ; Create start menu shortcuts for config and log directories - config_shortcut: - IfFileExists "$INSTDIR\config" "" log_shortcut - CreateShortCut "$SMPROGRAMS\OpenVPN\OpenVPN configuration file directory.lnk" "$INSTDIR\config" "" - - log_shortcut: - IfFileExists "$INSTDIR\log" "" samp_shortcut - CreateShortCut "$SMPROGRAMS\OpenVPN\OpenVPN log file directory.lnk" "$INSTDIR\log" "" - - samp_shortcut: - IfFileExists "$INSTDIR\sample-config" "" genkey_shortcut - CreateShortCut "$SMPROGRAMS\OpenVPN\OpenVPN Sample Configuration Files.lnk" "$INSTDIR\sample-config" "" - - genkey_shortcut: - IfFileExists "$INSTDIR\bin\openvpn.exe" "" noshortcuts - IfFileExists "$INSTDIR\config" "" noshortcuts - CreateShortCut "$SMPROGRAMS\OpenVPN\Generate a static OpenVPN key.lnk" "$INSTDIR\bin\openvpn.exe" '--pause-exit --verb 3 --genkey --secret "$INSTDIR\config\key.txt"' "$INSTDIR\openvpn.ico" 0 - - noshortcuts: - ; Create uninstaller - WriteUninstaller "$INSTDIR\Uninstall.exe" - - ; Show up in Add/Remove programs - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayName" "${PRODUCT_NAME} ${VERSION}" - WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "UninstallString" "$INSTDIR\Uninstall.exe" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayIcon" "$INSTDIR\openvpn.ico" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" "DisplayVersion" "${VERSION}" - - ; Advise a reboot - ;Messagebox MB_OK "IMPORTANT: Rebooting the system is advised in order to finalize TAP-Win32 driver installation/upgrade (this is an informational message only, pressing OK will not reboot)." - -SectionEnd - -;-------------------------------- -;Descriptions - -!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNUserSpace} $(DESC_SecOpenVPNUserSpace) - !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenVPNEasyRSA} $(DESC_SecOpenVPNEasyRSA) - !insertmacro MUI_DESCRIPTION_TEXT ${SecTAP} $(DESC_SecTAP) - !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenSSLUtilities} $(DESC_SecOpenSSLUtilities) - !insertmacro MUI_DESCRIPTION_TEXT ${SecOpenSSLDLLs} $(DESC_SecOpenSSLDLLs) - !insertmacro MUI_DESCRIPTION_TEXT ${SecAddPath} $(DESC_SecAddPath) - !insertmacro MUI_DESCRIPTION_TEXT ${SecAddShortcuts} $(DESC_SecAddShortcuts) - !insertmacro MUI_DESCRIPTION_TEXT ${SecService} $(DESC_SecService) - !insertmacro MUI_DESCRIPTION_TEXT ${SecFileAssociation} $(DESC_SecFileAssociation) -!insertmacro MUI_FUNCTION_DESCRIPTION_END - -;-------------------------------- -;Uninstaller Section - -Function un.onInit - ClearErrors - UserInfo::GetName - IfErrors ok - Pop $R0 - UserInfo::GetAccountType - Pop $R1 - StrCmp $R1 "Admin" ok - Messagebox MB_OK "Administrator privileges required to uninstall OpenVPN [$R0/$R1]" - Abort - ok: -FunctionEnd - -Section "Uninstall" - - DetailPrint "Service REMOVE" - nsExec::ExecToLog '"$INSTDIR\bin\openvpnserv.exe" -remove' - Pop $R0 # return value/error/timeout - - Sleep 2000 - - DetailPrint "TAP-Win32 REMOVE" - nsExec::ExecToLog '"$INSTDIR\bin\tapinstall.exe" remove ${TAP}' - Pop $R0 # return value/error/timeout - DetailPrint "tapinstall remove returned: $R0" - - Push "$INSTDIR\bin" - Call un.RemoveFromPath - - RMDir /r $SMPROGRAMS\OpenVPN - - Delete "$INSTDIR\bin\openvpn.exe" - Delete "$INSTDIR\bin\openvpnserv.exe" - Delete "$INSTDIR\bin\libeay32.dll" - Delete "$INSTDIR\bin\libssl32.dll" - Delete "$INSTDIR\bin\tapinstall.exe" - Delete "$INSTDIR\bin\addtap.bat" - Delete "$INSTDIR\bin\deltapall.bat" - - Delete "$INSTDIR\config\README.txt" - Delete "$INSTDIR\config\sample.${SERV_CONFIG_EXT}.txt" - - Delete "$INSTDIR\log\README.txt" - - Delete "$INSTDIR\driver\OemWin2k.inf" - Delete "$INSTDIR\driver\${TAPDRV}" - - Delete "$INSTDIR\bin\openssl.exe" - - Delete "$INSTDIR\INSTALL-win32.txt" - Delete "$INSTDIR\openvpn.ico" - Delete "$INSTDIR\license.txt" - Delete "$INSTDIR\Uninstall.exe" - - Delete "$INSTDIR\easy-rsa\openssl.cnf.sample" - Delete "$INSTDIR\easy-rsa\vars.bat.sample" - Delete "$INSTDIR\easy-rsa\init-config.bat" - Delete "$INSTDIR\easy-rsa\README.txt" - Delete "$INSTDIR\easy-rsa\build-ca.bat" - Delete "$INSTDIR\easy-rsa\build-dh.bat" - Delete "$INSTDIR\easy-rsa\build-key-server.bat" - Delete "$INSTDIR\easy-rsa\build-key.bat" - Delete "$INSTDIR\easy-rsa\build-key-pkcs12.bat" - Delete "$INSTDIR\easy-rsa\clean-all.bat" - Delete "$INSTDIR\easy-rsa\index.txt.start" - Delete "$INSTDIR\easy-rsa\revoke-key.bat" - Delete "$INSTDIR\easy-rsa\revoke-full.bat" - Delete "$INSTDIR\easy-rsa\serial.start" - - Delete "$INSTDIR\sample-config\*.ovpn" - - RMDir "$INSTDIR\bin" - RMDir "$INSTDIR\driver" - RMDir "$INSTDIR\easy-rsa" - RMDir "$INSTDIR\sample-config" - RMDir "$INSTDIR" - - !insertmacro DelRegKeyIfUnchanged HKCR ".${SERV_CONFIG_EXT}" "OpenVPNFile" - DeleteRegKey HKCR "OpenVPNFile" - DeleteRegKey HKLM SOFTWARE\OpenVPN - DeleteRegKey HKCU "Software\${PRODUCT_NAME}" - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenVPN" - - ;Messagebox MB_OK "IMPORTANT: If you intend on reinstalling OpenVPN after this uninstall, and you are running Win2K, you are strongly urged to reboot before reinstalling (this is an informational message only, pressing OK will not reboot)." - -SectionEnd diff --git a/openvpn/openvpn.spec b/openvpn/openvpn.spec deleted file mode 100644 index 4f5b5d1..0000000 --- a/openvpn/openvpn.spec +++ /dev/null @@ -1,273 +0,0 @@ -# OpenVPN spec file, used to drive rpmbuild - -# OPTIONS -# -# Disable LZO -# rpmbuild -tb [openvpn.x.tar.gz] --define 'without_lzo 1' -# -# Disable PAM plugin -# rpmbuild -tb [openvpn.x.tar.gz] --define 'without_pam 1' -# -# Allow passwords to be read from files -# rpmbuild -tb [openvpn.x.tar.gz] --define 'with_password_save 1' -# -# Use this on RH9 and RHEL3 -# rpmbuild -tb [openvpn.x.tar.gz] --define 'with_kerberos 1' - -Summary: OpenVPN is a robust and highly flexible VPN daemon by James Yonan. -Name: openvpn -Version: 2.0.9 -Release: 1 -URL: http://openvpn.net/ -Source0: http://prdownloads.sourceforge.net/openvpn/%{name}-%{version}.tar.gz - -License: GPL -Group: Applications/Internet -Vendor: James Yonan <jim@yonan.net> -Packager: James Yonan <jim@yonan.net> -BuildRoot: %{_tmppath}/%{name}-%(id -un) - -# -# Include dependencies manually -# - -AutoReq: 0 - -BuildRequires: openssl-devel >= 0.9.6 -Requires: openssl >= 0.9.6 - -%if "%{_vendor}" == "Mandrakesoft" -%{!?without_lzo:BuildRequires: liblzo1-devel >= 1.07} -%{!?without_lzo:Requires: liblzo1 >= 1.07} -%else -%if "%{_vendor}" == "MandrakeSoft" -%{!?without_lzo:BuildRequires: liblzo1-devel >= 1.07} -%{!?without_lzo:Requires: liblzo1 >= 1.07} -%else -%{!?without_lzo:BuildRequires: lzo-devel >= 1.07} -%{!?without_lzo:Requires: lzo >= 1.07} -%endif -%endif - -%{!?without_pam:BuildRequires: pam-devel} -%{!?without_pam:Requires: pam} - -# -# Description -# - -%description -OpenVPN is a robust and highly flexible VPN daemon by James Yonan. -OpenVPN supports SSL/TLS security, -ethernet bridging, -TCP or UDP tunnel transport through proxies or NAT, -support for dynamic IP addresses and DHCP, -scalability to hundreds or thousands of users, -and portability to most major OS platforms. - -# -# Define vendor type -# - -%if "%{_vendor}" == "suse" || "%{_vendor}" == "pc" -%define VENDOR SuSE -%else -%define VENDOR %_vendor -%endif - -# -# Should we build the auth-pam module? -# - -%define build_auth_pam 1 -%{?without_pam:%define build_auth_pam 0} - -# -# Other definitions -# - -%define debug_package %{nil} - -# -# Build OpenVPN binary -# - -%prep -%setup -q - -%build -%configure --disable-dependency-tracking %{?with_password_save:--enable-password-save} %{?without_lzo:--disable-lzo} %{?with_kerberos:--with-ssl-headers=/usr/kerberos/include} -%__make -%__strip %{name} - -# Build down-root plugin -pushd plugin/down-root -%__make -popd - -# Build auth-pam plugin -%if %{build_auth_pam} -pushd plugin/auth-pam -%__make -popd -%endif - -# -# Installation section -# - -%install -[ %{buildroot} != "/" ] && rm -rf %{buildroot} - -# Install man page -%__install -c -d -m 755 %{buildroot}%{_mandir}/man8 -%__install -c -m 755 %{name}.8 %{buildroot}%{_mandir}/man8 - -# Install binary -%__install -c -d -m 755 %{buildroot}%{_sbindir} -%__install -c -m 755 %{name} %{buildroot}%{_sbindir} - -# Install init script -%if "%{VENDOR}" == "SuSE" -%__install -c -d -m 755 %{buildroot}/etc/init.d -%__sed -e 's#openvpn=\"/usr/local/sbin/openvpn\"#openvpn=\"/usr/sbin/openvpn\"#' < suse/%{name}.init > %{_tmppath}/%{name}.init -%__install -c -m 755 %{_tmppath}/%{name}.init %{buildroot}/etc/init.d/%{name} -%__rm %{_tmppath}/%{name}.init -%else -%__install -c -d -m 755 %{buildroot}/etc/rc.d/init.d -%__install -c -m 755 sample-scripts/%{name}.init %{buildroot}/etc/rc.d/init.d/%{name} -%endif - -# Install /etc/openvpn -%__install -c -d -m 755 %{buildroot}/etc/%{name} - -# -# Build /usr/share/openvpn -# - -%__mkdir_p %{buildroot}%{_datadir}/%{name} - -# -# Install the plugins -# - -%__mkdir_p %{buildroot}%{_datadir}/%{name}/plugin/lib - -for pi in auth-pam down-root; do - %__mv -f plugin/$pi/README plugin/README.$pi - if [ -e plugin/$pi/openvpn-$pi.so ]; then - %__install -c -m 755 plugin/$pi/openvpn-$pi.so %{buildroot}%{_datadir}/openvpn/plugin/lib/openvpn-$pi.so - fi -done - -%__mv -f plugin/README plugin/README.plugins - -# -# Clean section -# - -%clean -[ %{buildroot} != "/" ] && rm -rf %{buildroot} - -# -# On Linux 2.4, make the device node -# - -%post -case "`uname -r`" in -2.4*) - /bin/mkdir /dev/net >/dev/null 2>&1 - /bin/mknod /dev/net/tun c 10 200 >/dev/null 2>&1 - ;; -esac - -# -# Handle the init script -# - -/sbin/chkconfig --add %{name} -%if "%{VENDOR}" == "SuSE" -/etc/init.d/openvpn restart -%else -/sbin/service %{name} condrestart -%endif -%preun -if [ "$1" = 0 ] -then - %if "%{VENDOR}" == "SuSE" - /etc/init.d/openvpn stop - %else - /sbin/service %{name} stop - %endif - /sbin/chkconfig --del %{name} -fi - -# -# Files section -# - -%files -%defattr(-,root,root) -%doc AUTHORS ChangeLog COPYING COPYRIGHT.GPL INSTALL NEWS PORTS README -%{_mandir}/man8/%{name}.8* -%{_sbindir}/%{name} -%{_datadir}/%{name} -%dir /etc/%{name} -%if "%{VENDOR}" == "SuSE" -/etc/init.d/%{name} -%else -/etc/rc.d/init.d/%{name} -%endif - -# Install extra %doc stuff -%doc contrib/ easy-rsa/ management/ sample-*/ plugin/README.* - -%changelog - -* Mon Aug 2 2005 James Yonan -- Fixed build problem with --define 'without_pam 1' - -* Mon Apr 4 2005 James Yonan -- Moved some files from /usr/share/openvpn to %doc for compatibility - with Dag Wieers' RPM repository - -* Sat Mar 12 2005 Tom Walsh -- Added MandrakeSoft liblzo1 require - -* Fri Dec 10 2004 James Yonan -- Added AutoReq: 0 for manual dependencies - -* Fri Dec 10 2004 James Yonan -- Packaged the plugins - -* Sun Nov 7 2004 Umberto Nicoletti -- SuSE support - -* Wed Aug 18 2004 Bishop Clark (LC957) <bishop@platypus.bc.ca> -- restrict what we claim in /etc/ to avoid ownership conflicts - -* Sun Feb 23 2003 Matthias Andree <matthias.andree@gmx.de> 1.3.2.14-1. -- Have the version number filled in by autoconf. - -* Wed Jul 10 2002 James Yonan <jim@yonan.net> 1.3.1-1 -- Fixed %preun to only remove service on final uninstall - -* Mon Jun 17 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.2.2-1 -- Added condrestart to openvpn.spec & openvpn.init. - -* Wed May 22 2002 James Yonan <jim@yonan.net> 1.2.0-1 -- Added mknod for Linux 2.4. - -* Wed May 15 2002 Doug Keller <dsk@voidstar.dyndns.org> 1.1.1.16-2 -- Added init scripts -- Added conf file support - -* Mon May 13 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.1.1.14-1 -- Added new directories for config examples and such - -* Sun May 12 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.1.1.13-1 -- Updated buildroot directive and cleanup command -- added easy-rsa utilities - -* Mon Mar 25 2002 bishop clark (LC957) <bishop@platypus.bc.ca> 1.0-1 -- Initial build. diff --git a/openvpn/stamp-h1 b/openvpn/stamp-h1 deleted file mode 100644 index 4547fe1..0000000 --- a/openvpn/stamp-h1 +++ /dev/null @@ -1 +0,0 @@ -timestamp for config.h |