Package sope: Specfile

  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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
%def_without sqlite3
%def_without oracle_support
%define sope_makeflags %nil
%define sope_version 4.9
%define sbjson_major_version 2
%define module_name ngobjweb

Summary:      SOPE is an extensive set of frameworks which form a complete Web application server environment
Name:         sope
Version:      5.10.0
Release:      alt1
License:      GPL-2.0+
URL:          http://sogo.nu/
Group:        Development/Objective-C
Packager:     Andrey Cherepanov <cas@altlinux.org>

Source:       SOPE-%version.tar.gz
Patch:	      %name-%version-%release.patch

BuildRequires: gnustep-make-devel 
BuildRequires: gnustep-base-devel
BuildRequires: gcc-objc
BuildRequires(pre): rpm-build-apache2
BuildRequires: postgresql-devel
BuildRequires: libffi-devel
BuildRequires: libgcrypt-devel
BuildRequires: libgmp-devel
BuildRequires: libgnutls-devel
BuildRequires: libicu-devel
BuildRequires: libldap-devel
BuildRequires: liblzma-devel
BuildRequires: libmysqlclient-devel
BuildRequires: libsqlite3-devel
BuildRequires: libssl-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: apache2-devel
BuildRequires: libapr1-devel
BuildRequires: zlib-devel
BuildRequires: /proc

%description
SOPE is an extensive set of frameworks which form a complete Web
application server environment. Besides the Apple WebObjects compatible
appserver extended with Zope concepts, it contains a large set of
reusable classes: XML processing (SAX, DOM, XML-RPC), MIME/IMAP4
processing, LDAP connectivity, RDBMS connectivity, and iCalendar
parsing.

%package -n libsope
Summary:   SOPE libraries
Group:     Development/Objective-C
Provides:  %name-appserver = %EVR
Obsoletes: %name-appserver < %EVR
Provides:  %name-core = %EVR
Obsoletes: %name-core < %EVR
Provides:  %name-gdl1 = %EVR
Obsoletes: %name-gdl1 < %EVR
Provides:  %name-ldap = %EVR
Obsoletes: %name-ldap < %EVR
Provides:  %name-mime = %EVR
Obsoletes: %name-mime < %EVR
Provides:  %name-sbjson = %EVR
Obsoletes: %name-sbjson < %EVR
Provides:  %name-xml = %EVR
Obsoletes: %name-xml < %EVR


%description -n libsope
SOPE is an extensive set of frameworks which form a complete Web
application server environment. Besides the Apple WebObjects compatible
appserver extended with Zope concepts, it contains a large set of
reusable classes: XML processing (SAX, DOM, XML-RPC), MIME/IMAP4
processing, LDAP connectivity, RDBMS connectivity, and iCalendar
parsing.

%package -n libsope-devel
Summary:   Development files for the SOPE libraries
Group:     Development/Objective-C
Requires:  libsope = %EVR
Provides:  %name-appserver-devel = %EVR
Obsoletes: %name-appserver-devel < %EVR
Provides:  %name-core-devel = %EVR
Obsoletes: %name-core-devel < %EVR
Provides:  %name-gdl1-devel = %EVR
Obsoletes: %name-gdl1-devel < %EVR
Provides:  %name-ldap-devel = %EVR
Obsoletes: %name-ldap-devel < %EVR
Provides:  %name-mime-devel = %EVR
Obsoletes: %name-mime-devel < %EVR
Provides:  %name-sbjson-devel = %EVR
Obsoletes: %name-sbjson-devel < %EVR
Provides:  %name-xml-devel = %EVR
Obsoletes: %name-xml-devel < %EVR

%description -n libsope-devel
This package contains the development files of the SOPE libraries.

SOPE is a framework for developing web applications and services. The
name "SOPE" (SKYRiX Object Publishing Environment) is inspired by ZOPE.

%package gdl1-postgresql
Summary:      PostgreSQL connector for SOPE's fork of the GNUstep database environment
Group:        Development/Objective-C
Requires:     libsope 
#Requires:    postgresql-libs

%description gdl1-postgresql
This package contains the PostgreSQL connector for SOPE's fork of the
GNUstep database libraries.

SOPE is a framework for developing web applications and services. The
name "SOPE" (SKYRiX Object Publishing Environment) is inspired by ZOPE.

%if_with oracle_support
%package gdl1-oracle
Summary:      Oracle connector for SOPE's fork of the GNUstep database environment
Group:        Development/Objective-C
Requires:     libsope
#Requires:    oracle-instantclient-basic

%description gdl1-oracle
This package contains the Oracle connector for SOPE's fork of the
GNUstep database libraries.
%endif

%package gdl1-mysql
Summary:      MySQL connector for SOPE's fork of the GNUstep database environment
Group:        Development/Objective-C
Requires:     libsope

%description gdl1-mysql
This package contains the MySQL connector for SOPE's fork of the
GNUstep database libraries.

%if_with sqlite3
%package gdl1-sqlite3
Summary:      SQLite3 connector for SOPE's fork of the GNUstep database environment
Group:        Development/Objective-C
Requires:     libsope

%description gdl1-sqlite3
This package contains the SQLite3 connector for SOPE's fork of the
GNUstep database libraries.

SOPE is a framework for developing web applications and services. The
name "SOPE" (SKYRiX Object Publishing Environment) is inspired by ZOPE.
%endif

%package -n apache2-mod_ngobjweb
Summary:      mod_ngobjweb module for Apache2
Group:        System/Servers
Requires:     libsope

%description -n apache2-mod_ngobjweb
Enables apache2 to handle HTTP requests for the
OpenGroupware.org application server.

%prep
%setup -q -n SOPE
%patch -p1
for f in config.guess config.sub;do
	rm -f sope-core/NGStreams/$f
	cp -vL /usr/share/automake/$f sope-core/NGStreams
done

%build
%ifarch x86_64
  ORACLELIB_PATH="%_libdir/oracle/11.2/client64/lib/"
%else
  ORACLELIB_PATH="%_libdir/oracle/11.2/client/lib/"
%endif

. /usr/share/GNUstep/Makefiles/GNUstep.sh
./configure --with-gnustep

make %{sope_makeflags} apr=/usr/bin/apr-1-config apxs=%apache2_apxs apu=/usr/bin/apu-1-config

pushd sope-gdl1/MySQL
make LDFLAGS="-L%_libdir/mysql" %{sope_makeflags}
popd

%if_with oracle_support
pushd Oracle8
make LDFLAGS="-L$ORACLELIB_PATH" %{sope_makeflags}
popd
%endif

%install
install -d %buildroot%apache2_libexecdir
%makeinstall_std GNUSTEP_INSTALLATION_DOMAIN=SYSTEM %{sope_makeflags} apxs="%apache2_apxs -S LIBEXECDIR=%buildroot%apache2_libexecdir"

pushd sope-gdl1/MySQL
%makeinstall_std GNUSTEP_INSTALLATION_DOMAIN=SYSTEM %{sope_makeflags}
popd

%if_with oracle_support
pushd Oracle8
%makeinstall_std GNUSTEP_INSTALLATION_DOMAIN=SYSTEM %{sope_makeflags}
popd
%endif

rm -f  %buildroot%_bindir/otest
rm -fr %buildroot%_libdir/GNUstep/GDLAdaptors-%{sope_version}/SQLite3.gdladaptor

# Fix path to NGObjWeb in sope-appserver
mkdir -p %buildroot%_datadir/%name-%{sope_version}
mv %buildroot%_libdir/GNUstep/Resources/NGObjWeb %buildroot%_datadir/%name-%{sope_version}/ngobjweb

install -d %buildroot%apache2_mods_available
echo "LoadModule ngobjweb_module %apache2_libexecdir/mod_ngobjweb.so" > %buildroot%apache2_mods_available/%module_name.load
#install -Dpm644 %module_name.conf %buildroot%apache2_mods_available/%module_name.conf
install -d %buildroot%apache2_mods_start
echo "%module_name=yes" > %buildroot%apache2_mods_start/100-%module_name.conf

%files -n libsope
%_libdir/lib*.so.*
%_libdir/GNUstep/*
%exclude %_libdir/GNUstep/GDLAdaptors-%{sope_version}/*.gdladaptor
%_datadir/sope-%{sope_version}/ngobjweb/*.plist

%files -n libsope-devel
%_bindir/*
%_includedir/*
%_libdir/lib*.so
%_datadir/GNUstep/Makefiles

%files gdl1-postgresql
%_libdir/GNUstep/GDLAdaptors-%{sope_version}/PostgreSQL.gdladaptor

%if_with oracle_support
%files gdl1-oracle
%_libdir/GNUstep/GDLAdaptors-%{sope_version}/Oracle8.gdladaptor
%endif

%files gdl1-mysql
%_libdir/GNUstep/GDLAdaptors-%{sope_version}/MySQL.gdladaptor

%if_with sqlite3
%files gdl1-sqlite3
%_libdir/GNUstep/GDLAdaptors-%{sope_version}/SQLite3.gdladaptor
%endif

%files -n apache2-mod_ngobjweb
%apache2_libexecdir/*.so
%config %apache2_mods_available/%module_name.load
%config %apache2_mods_start/100-%module_name.conf

%post -n apache2-mod_ngobjweb
# Reconfigure Apache2:
%apache2_sbindir/a2chkconfig ||:

if [ -e %apache2_mods_enabled/%module_name.load ]; then
    CONF_OK=0
    %apache2_sbindir/apachectl2 configtest && CONF_OK=1 ||:
    if [ "$CONF_OK" = "1" ]; then
        service %apache2_dname condrestart ||:
    else
        echo "Some errors detected in Apache2 configuration!"
        echo "To use %module_name check configuration and start %apache2_dname service."
    echo
    fi
else
    echo "Apache2 %module_name module had been installed, but does't enabled."
    echo "Check %apache2_mods_start directory for files with '%module_name=no' lines."
    echo
fi

%preun -n apache2-mod_ngobjweb
if [ "$1" = "0" ] ; then # last uninstall
    [ -e %apache2_mods_enabled/%module_name.load ] && %apache2_sbindir/a2dismod %module_name 2>&1 >/dev/null ||:
fi


%postun -n apache2-mod_ngobjweb
# Reconfigure Apache2:
%apache2_sbindir/a2chkconfig ||:
if [ "$1" = "0" ] ; then # last uninstall
    CONF_OK=0
    %apache2_sbindir/apachectl2 configtest && CONF_OK=1 ||:
    if [ "$CONF_OK" = "1" ]; then
        service %apache2_dname condrestart ||:
    else
        echo "Some errors detected in Apache2 configuration!"
        echo "To complete %module_name uninstalling check configuration and restart %apache2_dname service."
        echo
    fi
fi

%changelog
* Wed Feb 21 2024 Andrey Cherepanov <cas@altlinux.org> 5.10.0-alt1
- New version.

* Tue Dec 12 2023 Andrey Cherepanov <cas@altlinux.org> 5.9.1-alt1
- New version.

* Thu Sep 28 2023 Andrey Cherepanov <cas@altlinux.org> 5.9.0-alt1
- New version.

* Tue Jun 20 2023 Andrey Cherepanov <cas@altlinux.org> 5.8.4-alt1
- New version.

* Wed May 31 2023 Andrey Cherepanov <cas@altlinux.org> 5.8.3-alt1
- New version.

* Wed Mar 29 2023 Andrey Cherepanov <cas@altlinux.org> 5.8.2-alt1
- New version.

* Thu Dec 29 2022 Andrey Cherepanov <cas@altlinux.org> 5.8.0-alt2
- Fixed build for gnustep-base-1.28.0-alt3.git47b6e9d05.

* Thu Dec 01 2022 Andrey Cherepanov <cas@altlinux.org> 5.8.0-alt1
- New version.

* Sun Aug 21 2022 Andrey Cherepanov <cas@altlinux.org> 5.7.1-alt1
- New version.

* Sat Jun 11 2022 Andrey Cherepanov <cas@altlinux.org> 5.7.0-alt1
- New version.

* Fri May 06 2022 Andrey Cherepanov <cas@altlinux.org> 5.6.0-alt1
- New version.

* Sat Feb 05 2022 Andrey Cherepanov <cas@altlinux.org> 5.5.1-alt1
- New version.

* Fri Jan 28 2022 Andrey Cherepanov <cas@altlinux.org> 5.5.0-alt1
- New version.

* Sat Jan 01 2022 Andrey Cherepanov <cas@altlinux.org> 5.4.0-alt1
- New version.

* Fri Nov 26 2021 Andrey Cherepanov <cas@altlinux.org> 5.3.0-alt1
- New version.

* Fri Aug 20 2021 Andrey Cherepanov <cas@altlinux.org> 5.2.0-alt1
- New version.

* Wed Jun 02 2021 Andrey Cherepanov <cas@altlinux.org> 5.1.1-alt1
- New version.

* Fri Apr 02 2021 Andrey Cherepanov <cas@altlinux.org> 5.1.0-alt1
- New version.

* Tue Jan 19 2021 Andrey Cherepanov <cas@altlinux.org> 5.0.1-alt2
- FTBFS: fix build with GCC 10.

* Sun Oct 11 2020 Andrey Cherepanov <cas@altlinux.org> 5.0.1-alt1
- New version.

* Thu Sep 03 2020 Andrey Cherepanov <cas@altlinux.org> 5.0.0-alt1
- New version.

* Thu May 07 2020 Andrey Cherepanov <cas@altlinux.org> 4.3.2-alt1
- New version.

* Sat May 02 2020 Andrey Cherepanov <cas@altlinux.org> 4.3.1-alt1
- New version.

* Mon Jan 27 2020 Andrey Cherepanov <cas@altlinux.org> 4.3.0-alt1
- New version.

* Wed Dec 18 2019 Andrey Cherepanov <cas@altlinux.org> 4.2.0-alt1
- New version.
- Fix license tag.

* Fri Nov 01 2019 Andrey Cherepanov <cas@altlinux.org> 4.1.1-alt1
- New version.

* Sun Oct 27 2019 Andrey Cherepanov <cas@altlinux.org> 4.1.0-alt1
- New version.

* Mon Jul 22 2019 Andrey Cherepanov <cas@altlinux.org> 4.0.8-alt1
- New version.

* Tue Jun 25 2019 Andrey Cherepanov <cas@altlinux.org> 4.0.7-alt2
- Do not restrict architecture.

* Sat Mar 09 2019 Andrey Cherepanov <cas@altlinux.org> 4.0.7-alt1
- New version.

* Thu Feb 21 2019 Andrey Cherepanov <cas@altlinux.org> 4.0.6-alt1
- New version.

* Wed Jan 09 2019 Andrey Cherepanov <cas@altlinux.org> 4.0.5-alt1
- New version.

* Wed Oct 24 2018 Andrey Cherepanov <cas@altlinux.org> 4.0.4-alt1
- New version.

* Thu Oct 18 2018 Andrey Cherepanov <cas@altlinux.org> 4.0.3-alt1
- New version.

* Thu Aug 30 2018 Andrey Cherepanov <cas@altlinux.org> 4.0.2-alt1
- New version.

* Wed Aug 29 2018 Grigory Ustinov <grenka@altlinux.org> 4.0.1-alt1.1
- NMU: Rebuild with new openssl 1.1.0.

* Tue Jul 10 2018 Andrey Cherepanov <cas@altlinux.org> 4.0.1-alt1
- New version.

* Thu Mar 08 2018 Andrey Cherepanov <cas@altlinux.org> 4.0.0-alt1
- New version.

* Mon Oct 09 2017 Ivan Zakharyaschev <imz@altlinux.org> 3.2.10-alt2
- mUTF7 corrections (RFC3501) for non-ASCII IMAP folder names
  (ALT: #33722, #32426)

* Tue Jul 11 2017 Andrey Cherepanov <cas@altlinux.org> 3.2.10-alt1
- New version

* Tue May 09 2017 Andrey Cherepanov <cas@altlinux.org> 3.2.9-alt1
- New version

* Fri Mar 24 2017 Andrey Cherepanov <cas@altlinux.org> 3.2.8-alt1
- New version

* Wed Feb 15 2017 Andrey Cherepanov <cas@altlinux.org> 3.2.7-alt1
- new version 3.2.7

* Tue Jan 24 2017 Andrey Cherepanov <cas@altlinux.org> 3.2.6-alt1
- new version 3.2.6
- package all libraries to libsope and development files to libsope-devel

* Wed Jan 11 2017 Andrey Cherepanov <cas@altlinux.org> 3.2.5-alt1
- new version 3.2.5

* Tue Dec 06 2016 Andrey Cherepanov <cas@altlinux.org> 3.2.4-alt1
- new version 3.2.4

* Thu Nov 24 2016 Andrey Cherepanov <cas@altlinux.org> 3.2.2-alt1
- new version 3.2.2

* Thu Nov 03 2016 Andrey Cherepanov <cas@altlinux.org> 3.2.1-alt1
- new version 3.2.1

* Tue Oct 04 2016 Andrey Cherepanov <cas@altlinux.org> 3.2.0-alt1
- new version 3.2.0

* Mon Aug 22 2016 Andrey Cherepanov <cas@altlinux.org> 3.1.5-alt1
- new version 3.1.5

* Wed Jul 13 2016 Andrey Cherepanov <cas@altlinux.org> 3.1.4-alt1
- new version 3.1.4

* Thu Jun 23 2016 Andrey Cherepanov <cas@altlinux.org> 3.1.3-alt1
- New version

* Thu Jun 09 2016 Andrey Cherepanov <cas@altlinux.org> 3.1.1-alt1
- New version

* Fri Apr 29 2016 Sergey Alembekov <rt@altlinux.ru> 3.0.2-alt3
- rebuild with apache-2.4

* Thu Mar 10 2016 Andrey Cherepanov <cas@altlinux.org> 3.0.2-alt2
- Rebuild with new rpm

* Tue Mar 08 2016 Andrey Cherepanov <cas@altlinux.org> 3.0.2-alt1
- New version

* Mon Feb 08 2016 Andrey Cherepanov <cas@altlinux.org> 3.0.1-alt1
- New version

* Tue Jan 26 2016 Andrey Cherepanov <cas@altlinux.org> 2.3.7-alt1
- New version

* Tue Jan 19 2016 Andrey Cherepanov <cas@altlinux.org> 2.3.6-alt1
- New version

* Tue Jan 12 2016 Andrey Cherepanov <cas@altlinux.org> 2.3.5-alt1
- New version

* Mon Nov 30 2015 Andrey Cherepanov <cas@altlinux.org> 2.3.3-alt1
- Inital build in Sisyphus
- Build apache2-mod_ngobjweb