Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2717c5c

Browse files
author
Dmitry Vasilyev
committed
inital support for pgbouncer
1 parent 8374c24 commit 2717c5c

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

build/helpers/pgbouncer.cmd

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
CALL %ROOT%\build\helpers\setvars.cmd
2+
3+
:BUILD_ALL
4+
5+
:BUILD_PGBOUNCER
6+
TITLE Building PgBouncer...
7+
pacman -S gcc make libenvent-devel
8+
CD %DOWNLOADS_DIR%
9+
wget --no-check-certificate https://pgbouncer.github.io/downloads/files/%PGBOUNCER_VERSION%/pgbouncer-%PGBOUNCER_VERSION%.tar.gz -O pgbouncer.tar.gz || GOTO :ERROR
10+
rm -rf %BUILD_DIR%\pgbouncer
11+
MKDIR %BUILD_DIR%\pgbouncer
12+
tar xf pgbouncer.tar.gz -C %BUILD_DIR%\pgbouncer
13+
CD %BUILD_DIR%\pgbouncer\*%PGBOUNCER_VERSION%*
14+
./configure || GOTO :ERROR
15+
make || GOTO :ERROR
16+
rm -rf %BUILD_DIR%\distr_%ARCH%_%PGVER%\pgbouncer
17+
MKDIR %BUILD_DIR%\distr_%ARCH%_%PGVER%\pgbouncer
18+
19+
xcopy /Y pgbouncer.exe %BUILD_DIR%\distr_%ARCH%_%PGVER%\pgbouncer
20+
xcopy /Y %MSYS2_PATH%\msys-2.0.dll %BUILD_DIR%\distr_%ARCH%_%PGVER%\pgbouncer
21+
xcopy /Y %MSYS2_PATH%\msys-crypto*.dll %BUILD_DIR%\distr_%ARCH%_%PGVER%\pgbouncer
22+
xcopy /Y %MSYS2_PATH%\msys-ssl-1*.dll %BUILD_DIR%\distr_%ARCH%_%PGVER%\pgbouncer
23+
xcopy /Y %MSYS2_PATH%\msys-event*.dll %BUILD_DIR%\distr_%ARCH%_%PGVER%\pgbouncer
24+
xcopy /Y %MSYS2_PATH%\msys-z.dll %BUILD_DIR%\distr_%ARCH%_%PGVER%\pgbouncer
25+
26+
GOTO :DONE
27+
28+
:ERROR
29+
ECHO Failed with error #%errorlevel%.
30+
PAUSE
31+
EXIT /b %errorlevel%
32+
33+
:DONE
34+
ECHO Done.
35+
PAUSE

build/run.cmd

+11-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ IF "%~1" == "3" GOTO :OK
1313
IF "%~1" == "4" GOTO :OK
1414
IF "%~1" == "5" GOTO :OK
1515
IF "%~1" == "6" GOTO :OK
16+
IF "%~1" == "7" GOTO :OK
1617

1718
SET USG=1
1819

@@ -25,6 +26,7 @@ IF DEFINED USG (
2526
ECHO 4: Build PgAdmin3
2627
ECHO 5: Build installer PgAdmin3
2728
ECHO 6: Make PostgreSQL and PgAdmin3 archives
29+
ECHO 7: Build pgbouncer
2830
PAUSE
2931
EXIT /b 1
3032
)
@@ -47,6 +49,9 @@ IF "%ARCH%"=="" SET ARCH=X64
4749
IF "%ARCH%"=="x86" SET ARCH=X86
4850
IF "%ARCH%"=="x64" SET ARCH=X64
4951

52+
REM Set PGBouner Version
53+
SET PGBOUNCER_VERSION=1.7
54+
5055
@echo off&setlocal
5156
FOR %%i in ("%~dp0..") do set "ROOT=%%~fi"
5257

@@ -83,4 +88,9 @@ IF "%~1"=="5" (
8388
IF "%~1"=="6" (
8489
TITLE Making Archives
8590
CMD.EXE /C %ROOT%\build\helpers\make_zip.cmd
86-
)
91+
)
92+
93+
IF "%~1"=="7" (
94+
TITLE Build PGBouncer
95+
CMD.EXE /C %ROOT%\build\helpers\pgbouncer.cmd
96+
)

0 commit comments

Comments
 (0)