~svn/ubuntu/raring/subversion/ppa

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
@echo off
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements.  See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership.  The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License.  You may obtain a copy of the License at
@REM
@REM   http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied.  See the License for the
@REM specific language governing permissions and limitations
@REM under the License.

rem ====== Environment change lives only for the duration of the script
setlocal

rem ====== Set these shell variables before doing a build.
rem VER is used to name the output bin dir as svn-win32-%VER%
set VER=trunk
rem DIR is appended to src- to make the dir name, e.g., src-trunk
set DIR=trunk
set DRIVE=C
set PYTHONDIR=C:\Python22
set AWKDIR=C:\SVN\awk
set NASMDIR=C:\SVN\nasm
set SDKINC=C:\Program Files\Microsoft SDK\include
set SDKLIB=C:\Program Files\Microsoft SDK\lib
set APACHEDIR=C:\Program Files\Apache Group\Apache2
set GETTEXTINC=C:\SVN\gettext\include
set GETTEXTLIB=C:\SVN\gettext\lib
set GETTEXTBIN=C:\SVN\gettext\bin
rem ====== End of shell variables which need to be set.

rem Set up path to include Python and BDB.
PATH=%PATH%;%DRIVE%:\SVN\src-%DIR%\db4-win32;%NASMDIR%;%PYTHONDIR%;%AWKDIR%;%GETTEXTBIN%

rem Set INCLUDE and LIB for the msdev builds.
set INCLUDE=%SDKINC%;%INCLUDE%;%GETTEXTINC%
set LIB=%SDKLIB%;%LIB%;%GETTEXTLIB%

rem Check that the subversion code exists here.
cd %DRIVE%:\SVN\src-%DIR%
if not exist subversion goto wrongstartdir
cd ..

rem ====== Check the prerequisites are at least in the right place.
if not exist httpd-2.0.50 goto httpderr
if not exist nasm goto nasmerr
if not exist openssl-0.9.7d goto opensslerr
if not exist src-%DIR% goto svnerr
if not exist zlib goto zliberr
if not exist zlib\zlibstat.lib goto zlibstaterr
if not exist src-%DIR%\db4-win32 goto bdberr
if not exist src-%DIR%\neon goto neonerr
if not exist gettext goto gettexterr
goto allok

:wrongstartdir
echo Unable to find %DRIVE%:\SVN\src-%DIR%\subversion
goto theveryend
:httpderr
echo Unable to find httpd-2.0.50
goto end
:nasmerr
echo Unable to find nasm
goto end
:opensslerr
echo Unable to find openssl-0.9.7d
goto end
:svnerr
echo Unable to find Subversion source in src-%DIR%
goto end
:zliberr
echo Unable to find zlib
goto end
:zlibstaterr
echo Please copy zlib\static32\zlibstat.lib to zlib\zlibstat.lib
goto end
:bdberr
echo Unable to find Berekely DB
goto end
:neonerr
echo Unable to find neon
goto end
:gettexterr
echo Unable to find gettext
goto end
:allok

rem ====== Build openssl.
cd openssl-0.9.7d
perl Configure VC-WIN32
call ms\do_nasm
nmake -f ms\ntdll.mak
cd out32dll
call ..\ms\test
cd ..\..

rem ====== Build Apache 2
cd src-%DIR%
python gen-make.py -t dsp --with-httpd=..\httpd-2.0.50 --with-berkeley-db=db4-win32 --with-openssl=..\openssl-0.9.7d --with-zlib=..\zlib --enable-nls --enable-bdb-in-apr-util
cd ..
msdev httpd-2.0.50\apache.dsw /MAKE "BuildBin - Win32 Release"

rem ====== Subversion
cd src-%DIR%
msdev subversion_msvc.dsw /USEENV /MAKE "__ALL_TESTS__ - Win32 Release"
mkdir Release\subversion\tests\cmdline
xcopy /S /Y subversion\tests\cmdline Release\subversion\tests\cmdline
copy Release\subversion\mod_dav_svn\mod_dav_svn.so "%APACHEDIR%"\modules
copy Release\subversion\mod_authz_svn\mod_authz_svn.so "%APACHEDIR%"\modules
cd ..

rem ====== Copy the binaries into a tree suitable for zipping.
mkdir svn-win32-%VER%
mkdir svn-win32-%VER%\bin
mkdir svn-win32-%VER%\httpd
mkdir svn-win32-%VER%\iconv
copy src-%DIR%\db4-win32\bin\libdb42.dll svn-win32-%VER%\bin
copy openssl-0.9.7d\out32dll\libeay32.dll svn-win32-%VER%\bin
copy openssl-0.9.7d\out32dll\ssleay32.dll svn-win32-%VER%\bin
copy httpd-2.0.50\srclib\apr\Release\libapr.dll svn-win32-%VER%\bin
copy httpd-2.0.50\srclib\apr-iconv\Release\libapriconv.dll svn-win32-%VER%\bin
copy httpd-2.0.50\srclib\apr-iconv\Release\iconv\*.so svn-win32-%VER%\iconv
copy httpd-2.0.50\srclib\apr-util\Release\libaprutil.dll svn-win32-%VER%\bin
copy gettext\bin\intl.dll svn-win32-%VER%\bin
copy gettext\bin\iconv.dll svn-win32-%VER%\bin
copy src-%DIR%\Release\subversion\svn\svn.exe svn-win32-%VER%\bin
copy src-%DIR%\Release\subversion\svnadmin\svnadmin.exe svn-win32-%VER%\bin
copy src-%DIR%\Release\subversion\svndumpfilter\svndumpfilter.exe svn-win32-%VER%\bin
copy src-%DIR%\Release\subversion\svnlook\svnlook.exe svn-win32-%VER%\bin
copy src-%DIR%\Release\subversion\svnserve\svnserve.exe svn-win32-%VER%\bin
copy src-%DIR%\Release\subversion\svnversion\svnversion.exe svn-win32-%VER%\bin
copy src-%DIR%\Release\subversion\svnrdump\svnrdump.exe svn-win32-%VER%\bin
copy src-%DIR%\Release\subversion\mod_authz_svn\mod_authz_svn.so svn-win32-%VER%\httpd
copy src-%DIR%\Release\subversion\mod_dav_svn\mod_dav_svn.so svn-win32-%VER%\httpd
copy svn-win32-%VER%\bin\intl.dll "%APACHEDIR%\bin"
copy svn-win32-%VER%\bin\iconv.dll "%APACHEDIR%\bin"
copy svn-win32-%VER%\bin\libdb42.dll "%APACHEDIR%\bin"

rem ====== Configure Apache ready for doing tests.
@echo off
echo Configure Apache to use the mod_dav_svn and mod_authz_svn modules
echo by making sure these lines appear uncommented in httpd.conf:
echo LoadModule dav_module         modules/mod_dav.so
echo LoadModule dav_fs_module      modules/mod_dav_fs.so
echo LoadModule dav_svn_module     modules/mod_dav_svn.so
echo LoadModule authz_svn_module   modules/mod_authz_svn.so
echo And further down the file add:
echo ^<Location /svn-test-work/repositories^>
echo  DAV svn
echo  SVNParentPath %DRIVE%:/SVN/src-%DIR%/Release/subversion/tests/cmdline/svn-test-work/repositories
echo ^</Location^>
echo ^<Location /svn-test-work/local_tmp/repos^>
echo  DAV svn
echo  SVNPath %DRIVE%:/SVN/src-%DIR%/Release/subversion/tests/cmdline/svn-test-work/local_tmp/repos
echo ^</Location^>
echo Then restart Apache.

echo Please configure Apache and press enter:
pause
@echo on

rem ====== Run the tests.
PATH=%DRIVE%:\SVN\svn-win32-%VER%\bin;%PATH%
cd src-%DIR%
python win-tests.py -c -r -v
python win-tests.py -c -r -v -u http://localhost
cd ..

:end
cd src-%DIR%
endlocal
:theveryend