]> git.pld-linux.org Git - packages/cvsnt.git/blob - cvsnt.spec
- fix format string errors
[packages/cvsnt.git] / cvsnt.spec
1 #
2 # Conditional build:
3 %bcond_without  kerberos                # build without krb5 support
4 #
5 # TODO:
6 # - commit -r BRANCH is rejected (contrary to manual)
7 #   you can commit new file to branch with this technique:
8 #    cvs add file.patch
9 #    cvs up -r BRANCH file.patch
10 #    cvs ci -m '- bleh' file.patch
11 #   or just install cvs client from cvsnt package.
12 # - the newline auto translation on text files should be disabled on .patch files (better for any!)
13 # - check server mode and default config
14 # - unpackaged:
15 #   /usr/lib/libcvsapi.la
16 #   /usr/lib/libcvsapi.so
17 #   /usr/lib/libcvstools.la
18 #   /usr/lib/libcvstools.so
19 #   /usr/lib/libmdnsclient.la
20 #   /usr/lib/libmdnsclient.so
21 Summary:        Concurrent Versioning System
22 Summary(pl.UTF-8):      Concurrent Versioning System
23 Name:           cvsnt
24 # http://www.cvsnt.org/archive/2.5_stable tell which version is stable
25 Version:        2.5.05.3744
26 Release:        9
27 License:        GPL v2+/LGPL v2+
28 Group:          Development/Version Control
29 Source0:        http://www.cvsnt.org/archive/%{name}-%{version}.tar.gz
30 # Source0-md5:  64aa0fc627893cc66182023b936260da
31 Source1:        %{name}.inetd
32 Source2:        %{name}-cvslockd.init
33 Source3:        %{name}.pam
34 Patch0:         %{name}-system-pcre.patch
35 Patch1:         %{name}-system-ntlm.patch
36 Patch2:         %{name}-build.patch
37 Patch3:         %{name}-nospam.patch
38 Patch4:         %{name}-fixes.patch
39 Patch5:         %{name}-gcc4.patch
40 Patch6:         format-security.patch
41 URL:            http://www.cvsnt.org/
42 BuildRequires:  autoconf >= 2.58
43 BuildRequires:  automake >= 1:1.7.9
44 BuildRequires:  docbook-style-xsl
45 BuildRequires:  howl-devel
46 %{?with_kerberos:BuildRequires: heimdal-devel}
47 BuildRequires:  libltdl-devel
48 BuildRequires:  libntlm-devel >= 0.3.6
49 BuildRequires:  libstdc++-devel
50 BuildRequires:  libtool
51 BuildRequires:  libxml2-devel
52 BuildRequires:  mysql-devel
53 BuildRequires:  openssl-devel
54 BuildRequires:  pam-devel
55 BuildRequires:  pcre-devel
56 BuildRequires:  postgresql-devel
57 BuildRequires:  rpmbuild(macros) >= 1.268
58 BuildRequires:  sqlite3-devel
59 BuildRequires:  unixODBC-devel
60 BuildRequires:  xmlto
61 BuildRequires:  zlib-devel
62 Requires(post): /sbin/ldconfig
63 Provides:       cvs-client = %{version}
64 Obsoletes:      cvs-client
65 Obsoletes:      cvs-nserver-client
66 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
67
68 %define         _cvs_root       /var/lib/cvs
69
70 %description
71 CVS means Concurrent Version System; it is a version control system
72 which can record the history of your files (usually, but not always,
73 source code). CVS only stores the differences between versions,
74 instead of every version of every file you've ever created. CVS also
75 keeps a log of who and when made some changes and why they occurred,
76 among other aspects.
77
78 CVSNT Server features include:
79 - Access control for securing projects and branches.
80 - Detailed audit and metrics recorded in an SQL database.
81 - Authentication with Active Directory.
82 - Tracking everything about the change - including whether it was
83   merged from somewhere, belongs to a problem report or was part of a
84   change set.
85 - A control panel to manage email notification of changes, defect
86   tracking integration, and more.
87 - Integrated repository synchronisation (for fail-over servers).
88 - Change set support (group changes by defect number).
89 - Supports UNICODE UTF-8/UCS-2 files and multi-lingual filenames.
90 - When operating in UTF-8 (Unicode) mode it can automatically
91   translate filename encoding for any client.
92 - Plug-ins for email notification.
93 - Helps make merging branches easier with its "Mergepoint" feature.
94 - Native servers available for Mac OS X, Windows, Linux, Solaris,
95   HPUX.
96 - Supports reserved and unreserved versioning methodologies.
97 - CVSAPI for integration into 3rd party products.
98 - Script, COM and 3GL interface for triggers and integration into 3rd
99   party tools (such as defect tracking)
100
101 %package pserver
102 Summary:        rc-inetd config files to run CVS pserver
103 Summary(pl.UTF-8):      Pliki konfiguracyjne rc-inetd do postawienia pservera CVS
104 Group:          Development/Version Control
105 Requires(post): fileutils
106 Requires(postun):       /usr/sbin/groupdel
107 Requires(postun):       /usr/sbin/userdel
108 Requires(pre):  /bin/id
109 Requires(pre):  /usr/bin/getgid
110 Requires(pre):  /usr/sbin/groupadd
111 Requires(pre):  /usr/sbin/useradd
112 Requires:       %{name} = %{version}-%{release}
113 Requires:       %{name}-cvslockd = %{version}-%{release}
114 Requires:       rc-inetd
115 Provides:       group(cvs)
116 Provides:       user(cvs)
117 Obsoletes:      cvs-nserver-common
118 Obsoletes:      cvs-nserver-nserver
119 Obsoletes:      cvs-nserver-pserver
120
121 %description pserver
122 Config files for rc-inetd that are necessary to run CVS in pserver
123 mode.
124
125 %package cvslockd
126 Summary:        locking daemon
127 Group:          Development/Version Control
128
129 %description cvslockd
130 CVS locking daemon.
131
132 %package database-mysql
133 Summary:        MySQL Database support for CVSNT
134 Group:          Development/Version Control
135 Requires:       %{name} = %{version}-%{release}
136
137 %description database-mysql
138 MySQL Database support for CVSNT.
139
140 %package database-odbc
141 Summary:        ODBC support for CVSNT
142 Group:          Development/Version Control
143 Requires:       %{name} = %{version}-%{release}
144
145 %description database-odbc
146 ODBC support for CVSNT.
147
148 %package database-postgres
149 Summary:        PostgreSQL Database support for CVSNT
150 Group:          Development/Version Control
151 Requires:       %{name} = %{version}-%{release}
152
153 %description database-postgres
154 PostgreSQL Database support for CVSNT.
155
156 %package database-sqlite
157 Summary:        SQLite Database support for CVSNT
158 Group:          Development/Version Control
159 Requires:       %{name} = %{version}-%{release}
160
161 %description database-sqlite
162 SQLite Database support for CVSNT.
163
164 %package protocol-gserver
165 Summary:        gserver (Kerberos GSS) protocol support for CVSNT
166 Group:          Development/Version Control
167 Requires:       %{name} = %{version}-%{release}
168
169 %description protocol-gserver
170 gserver (Kerberos GSS) support for CVSNT.
171
172 %package protocol-sserver
173 Summary:        sserver (SSL) procotol support for for CVSNT
174 Group:          Development/Version Control
175 Requires:       %{name} = %{version}-%{release}
176
177 %description protocol-sserver
178 sserver (SSL) protocol support for CVSNT.
179
180 %package protocol-sspi
181 Summary:        SSPI procotol support for for CVSNT
182 Group:          Development/Version Control
183 Requires:       %{name} = %{version}-%{release}
184
185 %description protocol-sspi
186 SSPI protocol support for CVSNT.
187
188 %package protocol-sync
189 Summary:        sync procotol support for for CVSNT
190 Group:          Development/Version Control
191 Requires:       %{name} = %{version}-%{release}
192
193 %description protocol-sync
194 sync protocol support for CVSNT.
195
196 %package rcs
197 Summary:        CVSNT version of RCS tools
198 Group:          Development/Version Control
199 Requires:       %{name} = %{version}-%{release}
200 Provides:       rcs
201
202 %description rcs
203 CVSNT version of RCS tools.
204
205 %prep
206 %setup -q
207 %patch0 -p1
208 %patch1 -p1
209 %patch2 -p1
210 %patch3 -p1
211 %patch4 -p1
212 %patch5 -p1
213 %patch6 -p1
214
215 rm -r protocols/ntlm
216
217 %build
218 %{__libtoolize}
219 %{__aclocal}
220 %{__autoconf}
221 %{__automake}
222 %configure \
223         --enable-mdns \
224         --enable-sqlite \
225         --enable-mysql \
226         --enable-odbc \
227         --enable-postgres \
228         --enable-pam \
229         --enable-server \
230         --enable-lockserver \
231         --enable-pserver \
232         --enable-ext \
233         --enable-rsh \
234         --%{?with_kerberos:en}%{!?with_kerberos:dis}able-gserver \
235         --enable-sserver \
236         --enable-sspi \
237         --enable-enum \
238         --enable-rcs
239
240 %{__make}
241
242 cd doc
243 sed "s/__VERSION__/%{version}/" < cvs.dbk > cvs2.dbk
244 sed "s/__VERSION__/%{version}/" < cvsclient.dbk > cvsclient2.dbk
245 xmlto --skip-validation -o html_cvs html cvs2.dbk
246 xmlto --skip-validation -o html_cvsclient html cvsclient2.dbk
247
248 %install
249 rm -rf $RPM_BUILD_ROOT
250 install -d $RPM_BUILD_ROOT{/etc/{pam.d,rc.d/init.d,sysconfig/rc-inetd},%{_cvs_root}}
251
252 %{__make} install -j1 \
253         DESTDIR=$RPM_BUILD_ROOT
254
255 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/%{name}
256 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/cvslockd
257 install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/cvsnt
258
259 mv $RPM_BUILD_ROOT%{_sysconfdir}/cvsnt/PServer{.example,}
260 mv $RPM_BUILD_ROOT%{_sysconfdir}/cvsnt/Plugins{.example,}
261
262 %clean
263 rm -rf $RPM_BUILD_ROOT
264
265 %post -p /sbin/ldconfig
266 %postun -p /sbin/ldconfig
267
268 %post cvslockd
269 /sbin/chkconfig --add cvslockd
270 %service cvslockd restart
271
272 %preun cvslockd
273 if [ "$1" = "0" ]; then
274         %service cvslockd stop
275         /sbin/chkconfig --del cvslockd
276 fi
277
278 %pre pserver
279 %groupadd -f -g 52 cvs
280 %useradd -g cvs -d %{_cvs_root} -u 52 -s /bin/false cvs
281
282 %post pserver
283 if [ "$1" = "1" ]; then
284         # Initialise repository
285         %{_bindir}/cvs -d :local:%{_cvs_root} init
286         chown -R cvs:cvs %{_cvs_root}/CVSROOT
287 fi
288 %service -q rc-inetd reload
289
290 %postun pserver
291 if [ "$1" = "0" ]; then
292         %userremove cvs
293         %groupremove cvs
294         %service -q rc-inetd reload
295 fi
296
297 %files
298 %defattr(644,root,root,755)
299 %doc doc/html_cvsclient
300 %doc AUTHORS README
301 %doc triggers/examples/*.txt
302 %dir %{_sysconfdir}/cvsnt
303 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/cvsnt
304 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cvsnt/*
305 %attr(755,root,root) %{_bindir}/cvs
306 %attr(755,root,root) %{_bindir}/cvsnt
307 %attr(755,root,root) %{_bindir}/cvsscript
308 %dir %{_libdir}/cvsnt
309 %dir %{_libdir}/cvsnt/database
310 %dir %{_libdir}/cvsnt/mdns
311 %attr(755,root,root) %{_libdir}/cvsnt/mdns/*.so
312 %{_libdir}/cvsnt/mdns/*.la
313 %dir %{_libdir}/cvsnt/protocols
314 %attr(755,root,root) %{_libdir}/cvsnt/protocols/enum.so
315 %attr(755,root,root) %{_libdir}/cvsnt/protocols/ext.so
316 %attr(755,root,root) %{_libdir}/cvsnt/protocols/pserver.so
317 %attr(755,root,root) %{_libdir}/cvsnt/protocols/server.so
318 %{_libdir}/cvsnt/protocols/enum.la
319 %{_libdir}/cvsnt/protocols/ext.la
320 %{_libdir}/cvsnt/protocols/pserver.la
321 %{_libdir}/cvsnt/protocols/server.la
322 %dir %{_libdir}/cvsnt/triggers
323 %attr(755,root,root) %{_libdir}/cvsnt/triggers/*.so
324 %{_libdir}/cvsnt/triggers/*.la
325 %dir %{_libdir}/cvsnt/xdiff
326 %attr(755,root,root) %{_libdir}/cvsnt/xdiff/*.so
327 %{_libdir}/cvsnt/xdiff/*.la
328 %attr(755,root,root) %{_libdir}/lib*-*.so*
329 %{_mandir}/man[15]/*
330
331 %files pserver
332 %defattr(644,root,root,755)
333 %doc doc/html_cvs
334 %attr(770,root,cvs) %dir %{_cvs_root}
335 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/cvsnt
336
337 %files cvslockd
338 %defattr(644,root,root,755)
339 %attr(755,root,root) %{_bindir}/cvslockd
340 %attr(754,root,root) /etc/rc.d/init.d/cvslockd
341
342 %files database-mysql
343 %defattr(644,root,root,755)
344 %doc triggers/sql/*_mysql.sql
345 %attr(755,root,root) %{_libdir}/cvsnt/database/mysql.so
346 %{_libdir}/cvsnt/database/mysql.la
347
348 %files database-odbc
349 %defattr(644,root,root,755)
350 %doc triggers/sql/*_oracle.sql
351 %doc triggers/sql/*_mssql.sql
352 %attr(755,root,root) %{_libdir}/cvsnt/database/odbc.so
353 %{_libdir}/cvsnt/database/odbc.la
354
355 %files database-postgres
356 %defattr(644,root,root,755)
357 %doc triggers/sql/*_postgres.sql
358 %attr(755,root,root) %{_libdir}/cvsnt/database/postgres.so
359 %{_libdir}/cvsnt/database/postgres.la
360
361 %files database-sqlite
362 %defattr(644,root,root,755)
363 %doc triggers/sql/*_sqlite.sql
364 %attr(755,root,root) %{_libdir}/cvsnt/database/sqlite.so
365 %{_libdir}/cvsnt/database/sqlite.la
366
367 %if %{with kerberos}
368 %files protocol-gserver
369 %defattr(644,root,root,755)
370 %attr(755,root,root) %{_libdir}/cvsnt/protocols/gserver.so
371 %{_libdir}/cvsnt/protocols/gserver.la
372 %endif
373
374 %files protocol-sserver
375 %defattr(644,root,root,755)
376 %attr(755,root,root) %{_libdir}/cvsnt/protocols/sserver.so
377 %{_libdir}/cvsnt/protocols/sserver.la
378
379 %files protocol-sspi
380 %defattr(644,root,root,755)
381 %attr(755,root,root) %{_libdir}/cvsnt/protocols/sspi.so
382 %{_libdir}/cvsnt/protocols/sspi.la
383
384 #%files protocol-sync
385 #%defattr(644,root,root,755)
386 #%attr(755,root,root) %{_libdir}/cvsnt/protocols/sync.so
387 #%{_libdir}/cvsnt/protocols/sync.la
388
389 %files rcs
390 %defattr(644,root,root,755)
391 %attr(755,root,root) %{_bindir}/co
392 %attr(755,root,root) %{_bindir}/rcsdiff
393 %attr(755,root,root) %{_bindir}/rlog
This page took 0.083177 seconds and 3 git commands to generate.