forked from MonetDB/MonetDB-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MonetDB.spec
4104 lines (3497 loc) · 180 KB
/
MonetDB.spec
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
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%define name MonetDB
%define version 11.30.0
%{!?buildno: %global buildno %(date +%Y%m%d)}
# groups of related archs
%define all_x86 i386 i586 i686
%ifarch %{all_x86}
%define bits 32
%else
%define bits 64
%define with_int128 1
%endif
%define release %{buildno}%{?dist}
# On RedHat Enterprise Linux and derivatives, if the Extra Packages
# for Enterprise Linux (EPEL) repository is available, you can define
# the _with_epel macro. When using mock to build the RPMs, this can
# be done using the --with=epel option to mock.
# If the EPEL repository is availabe, or if building for Fedora, all
# optional sub packages can be built. We indicate that here by
# setting the macro fedpkgs to 1. If the EPEL repository is not
# available and we are not building for Fedora, we set fedpkgs to 0.
%if %{?rhel:1}%{!?rhel:0}
# RedHat Enterprise Linux (or CentOS or Scientific Linux)
%if %{?_with_epel:1}%{!?_with_epel:0}
# EPEL is enabled through the command line
%define fedpkgs 1
%else
# EPEL is not enabled
%define fedpkgs 0
%endif
%else
# Not RHEL (so presumably Fedora)
%define fedpkgs 1
%endif
# On Fedora, the geos library is available, and so we can require it
# and build the geom modules. On RedHat Enterprise Linux and
# derivatives (CentOS, Scientific Linux), the geos library is not
# available. However, the geos library is available in the Extra
# Packages for Enterprise Linux (EPEL). However, On RHEL 6, the geos
# library is too old for us, so we need an extra check for an
# up-to-date version of RHEL.
%if %{fedpkgs}
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
%define with_geos 1
%endif
%endif
# On Fedora, the liblas library is available, and so we can require it
# and build the lidar modules. On RedHat Enterprise Linux and
# derivatives (CentOS, Scientific Linux), the liblas library is only
# available if EPEL is enabled, and then only on version 7.
%if %{fedpkgs}
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
# If the _without_lidar macro is not set, the MonetDB-lidar RPM will
# be created. The macro can be set when using mock by passing it the
# flag --without=lidar.
%if %{?_without_lidar:0}%{!?_without_lidar:1}
%define with_lidar 1
%endif
%endif
%endif
%if %{?rhel:0}%{!?rhel:1}
# If the _without_samtools macro is not set, the MonetDB-bam-MonetDB5
# RPM will be created. The macro can be set when using mock by
# passing it the flag --without=samtools.
# Note that the samtools-devel RPM is not available on RedHat
# Enterprise Linux and derivatives, even with EPEL availabe.
# (Actually, at the moment of writing, samtools-devel is available in
# EPEL for RHEL 6, but not for RHEL 7. We don't make the distinction
# here and just not build the MonetDB-bam-MonetDB5 RPM.)
%if %{?_without_samtools:0}%{!?_without_samtools:1}
%define with_samtools 1
%endif
%endif
# If the _without_pcre macro is not set, the PCRE library is used for
# the implementation of the SQL LIKE and ILIKE operators. Otherwise
# the POSIX regex functions are used. The macro can be set when using
# mock by passing it the flag --without=pcre.
%if %{?_without_pcre:0}%{!?_without_pcre:1}
%define with_pcre 1
%endif
%if %{fedpkgs}
# If the _without_rintegration macro is not set, the MonetDB-R RPM
# will be created. The macro can be set when using mock by passing it
# the flag --without=rintegration.
%if %{?_without_rintegration:0}%{!?_without_rintegration:1}
%define with_rintegration 1
%endif
%endif
# If the _without_pyintegration macro is not set, the MonetDB-python2
# RPM will be created. The macro can be set when using mock by
# passing it the flag --without=pyintegration.
# On RHEL 6, numpy is too old.
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
%if %{?_without_pyintegration:0}%{!?_without_pyintegration:1}
%define with_pyintegration 1
%endif
%endif
%if %{fedpkgs}
# If the _with_fits macro is set, the MonetDB-cfitsio RPM will be
# created. The macro can be set when using mock by passing it the
# flag --with=fits.
%if %{?_with_fits:1}%{!?_with_fits:0}
%define with_fits 1
%endif
%endif
%{!?__python2: %global __python2 %__python}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%if 0%{?fedora}
%bcond_without python3
%else
%bcond_with python3
%endif
Name: %{name}
Version: %{version}
Release: %{release}
Summary: MonetDB - Monet Database Management System
Vendor: MonetDB BV <[email protected]>
Group: Applications/Databases
License: MPLv2.0
URL: https://www.monetdb.org/
Source: https://www.monetdb.org/downloads/sources/Jul2017-SP4/%{name}-%{version}.tar.bz2
# we need systemd for the _unitdir macro to exist
# we need checkpolicy and selinux-policy-devel for the SELinux policy
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
# RHEL >= 7, and all current Fedora
BuildRequires: systemd
BuildRequires: checkpolicy
BuildRequires: selinux-policy-devel
BuildRequires: hardlink
%endif
BuildRequires: bison
BuildRequires: bzip2-devel
%if %{?with_fits:1}%{!?with_fits:0}
BuildRequires: cfitsio-devel
%endif
BuildRequires: gcc
%if %{?with_geos:1}%{!?with_geos:0}
BuildRequires: geos-devel >= 3.4.0
%endif
%if %{?with_lidar:1}%{!?with_lidar:0}
BuildRequires: liblas-devel >= 1.8.0
BuildRequires: gdal-devel
BuildRequires: libgeotiff-devel
# Fedora 22 liblas-devel does not depend on liblas:
BuildRequires: liblas >= 1.8.0
%endif
BuildRequires: libatomic_ops-devel
BuildRequires: libcurl-devel
BuildRequires: xz-devel
# BuildRequires: libmicrohttpd-devel
BuildRequires: libuuid-devel
BuildRequires: libxml2-devel
BuildRequires: openssl-devel
%if %{?with_pcre:1}%{!?with_pcre:0}
BuildRequires: pcre-devel >= 4.5
%endif
BuildRequires: readline-devel
BuildRequires: unixODBC-devel
# BuildRequires: uriparser-devel
BuildRequires: zlib-devel
%if %{?with_samtools:1}%{!?with_samtools:0}
BuildRequires: samtools-devel
%endif
%if %{?with_pyintegration:1}%{!?with_pyintegration:0}
BuildRequires: python-devel
%if %{?rhel:1}%{!?rhel:0}
# RedHat Enterprise Linux calls it simply numpy
BuildRequires: numpy
%else
%if (0%{?fedora} >= 24)
BuildRequires: python2-numpy
%else
# Fedora <= 23 doesn't have python2-numpy
BuildRequires: numpy
%endif
%endif
%endif
%if %{?with_rintegration:1}%{!?with_rintegration:0}
BuildRequires: R-core-devel
%endif
%if (0%{?fedora} >= 22)
Recommends: %{name}-SQL-server5%{?_isa} = %{version}-%{release}
Recommends: MonetDB5-server%{?_isa} = %{version}-%{release}
Suggests: %{name}-client%{?_isa} = %{version}-%{release}
%endif
%description
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains the core components of MonetDB in the form of a
single shared library. If you want to use MonetDB, you will certainly
need this package, but you will also need at least the MonetDB5-server
package, and most likely also %{name}-SQL-server5, as well as one or
more client packages.
%files
%license COPYING
%defattr(-,root,root)
%{_libdir}/libbat.so.*
%package devel
Summary: MonetDB development files
Group: Applications/Databases
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-stream-devel%{?_isa} = %{version}-%{release}
Requires: libatomic_ops-devel
%description devel
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains files needed to develop extensions to the core
functionality of MonetDB.
%files devel
%defattr(-,root,root)
%dir %{_includedir}/monetdb
%{_includedir}/monetdb/gdk*.h
%{_includedir}/monetdb/monet*.h
%{_libdir}/libbat.so
%{_libdir}/pkgconfig/monetdb-gdk.pc
%package stream
Summary: MonetDB stream library
Group: Applications/Databases
%description stream
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains a shared library (libstream) which is needed by
various other components.
%files stream
%license COPYING
%defattr(-,root,root)
%{_libdir}/libstream.so.*
%package stream-devel
Summary: MonetDB stream library
Group: Applications/Databases
Requires: %{name}-stream%{?_isa} = %{version}-%{release}
Requires: bzip2-devel
Requires: libcurl-devel
Requires: zlib-devel
%description stream-devel
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains the files to develop with the %{name}-stream
library.
%files stream-devel
%defattr(-,root,root)
%dir %{_includedir}/monetdb
%{_libdir}/libstream.so
%{_includedir}/monetdb/stream.h
%{_includedir}/monetdb/stream_socket.h
%{_libdir}/pkgconfig/monetdb-stream.pc
%package client
Summary: MonetDB - Monet Database Management System Client Programs
Group: Applications/Databases
%if (0%{?fedora} >= 22)
Recommends: %{name}-SQL-server5%{?_isa} = %{version}-%{release}
%endif
%description client
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains mclient, the main client program to communicate
with the MonetDB database server, and msqldump, a program to dump the
SQL database so that it can be loaded back later. If you want to use
MonetDB, you will very likely need this package.
%files client
%license COPYING
%defattr(-,root,root)
%{_bindir}/mclient
%{_bindir}/msqldump
%{_libdir}/libmapi.so.*
%doc %{_mandir}/man1/mclient.1.gz
%doc %{_mandir}/man1/msqldump.1.gz
%package client-tools
Summary: MonetDB - Monet Database Management System Client Programs
Group: Applications/Databases
Requires: %{name}-client%{?_isa} = %{version}-%{release}
%if (0%{?fedora} >= 22)
# tomograph executes these two:
Recommends: /usr/bin/gs
Recommends: /usr/bin/gnuplot
%endif
%description client-tools
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains stethoscope, tomograph, and tachograph. These
tools can be used to monitor the MonetDB database server.
%files client-tools
%defattr(-,root,root)
%{_bindir}/stethoscope
%{_bindir}/tachograph
%{_bindir}/tomograph
%dir %{_datadir}/doc/MonetDB-client-tools
%docdir %{_datadir}/doc/MonetDB-client-tools
%{_datadir}/doc/MonetDB-client-tools/*
%package client-devel
Summary: MonetDB - Monet Database Management System Client Programs
Group: Applications/Databases
Requires: %{name}-client%{?_isa} = %{version}-%{release}
Requires: %{name}-stream-devel%{?_isa} = %{version}-%{release}
Requires: openssl-devel
%description client-devel
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains the files needed to develop with the
%{name}-client package.
%files client-devel
%defattr(-,root,root)
%dir %{_includedir}/monetdb
%{_libdir}/libmapi.so
%{_includedir}/monetdb/mapi.h
%{_libdir}/pkgconfig/monetdb-mapi.pc
%package client-odbc
Summary: MonetDB ODBC driver
Group: Applications/Databases
Requires: %{name}-client%{?_isa} = %{version}-%{release}
Requires(pre): unixODBC
%description client-odbc
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains the MonetDB ODBC driver.
%post client-odbc
# install driver if first install of package or if driver not installed yet
if [ "$1" -eq 1 ] || ! odbcinst -d -q -n MonetDB >& /dev/null; then
odbcinst -i -d -r <<EOF
[MonetDB]
Description = ODBC for MonetDB
Driver = %{_exec_prefix}/lib/libMonetODBC.so
Setup = %{_exec_prefix}/lib/libMonetODBCs.so
Driver64 = %{_exec_prefix}/lib64/libMonetODBC.so
Setup64 = %{_exec_prefix}/lib64/libMonetODBCs.so
EOF
fi
%postun client-odbc
if [ "$1" -eq 0 ]; then
odbcinst -u -d -n MonetDB
fi
%files client-odbc
%license COPYING
%defattr(-,root,root)
%{_libdir}/libMonetODBC.so
%{_libdir}/libMonetODBCs.so
%package client-tests
Summary: MonetDB Client tests package
Group: Applications/Databases
Requires: MonetDB5-server%{?_isa} = %{version}-%{release}
Requires: %{name}-client%{?_isa} = %{version}-%{release}
Requires: %{name}-client-odbc%{?_isa} = %{version}-%{release}
%if (0%{?fedora} >= 22)
Recommends: perl-DBD-monetdb >= 1.0
Recommends: php-monetdb >= 1.0
%endif
Requires: %{name}-SQL-server5%{?_isa} = %{version}-%{release}
Requires: python-pymonetdb >= 1.0.6
%description client-tests
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains the sample MAPI programs used for testing other
MonetDB packages. You probably don't need this, unless you are a
developer.
%files client-tests
%defattr(-,root,root)
%{_bindir}/arraytest
%{_bindir}/odbcsample1
%{_bindir}/sample0
%{_bindir}/sample1
%{_bindir}/sample4
%{_bindir}/smack00
%{_bindir}/smack01
%{_bindir}/shutdowntest
%{_bindir}/testgetinfo
%{_bindir}/malsample.pl
%{_bindir}/sqlsample.php
%{_bindir}/sqlsample.pl
%if %{?with_geos:1}%{!?with_geos:0}
%package geom-MonetDB5
Summary: MonetDB5 SQL GIS support module
Group: Applications/Databases
Requires: MonetDB5-server%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-geom
Obsoletes: %{name}-geom-devel
%description geom-MonetDB5
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains the GIS (Geographic Information System)
extensions for %{name}-SQL-server5.
%files geom-MonetDB5
%defattr(-,root,root)
%{_libdir}/monetdb5/autoload/*_geom.mal
%{_libdir}/monetdb5/createdb/*_geom.sql
%{_libdir}/monetdb5/geom.mal
%{_libdir}/monetdb5/lib_geom.so
%endif
%if %{?with_lidar:1}%{!?with_lidar:0}
%package lidar
Summary: MonetDB5 SQL support for working with LiDAR data
Group: Applications/Databases
Requires: MonetDB5-server%{?_isa} = %{version}-%{release}
%description lidar
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains support for reading and writing LiDAR data.
%files lidar
%defattr(-,root,root)
%{_libdir}/monetdb5/autoload/*_lidar.mal
%{_libdir}/monetdb5/createdb/*_lidar.sql
%{_libdir}/monetdb5/lidar.mal
%{_libdir}/monetdb5/lib_lidar.so
%endif
%if %{?with_samtools:1}%{!?with_samtools:0}
%package bam-MonetDB5
Summary: MonetDB5 SQL interface to the bam library
Group: Applications/Databases
Requires: MonetDB5-server%{?_isa} = %{version}-%{release}
%description bam-MonetDB5
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains the interface to load and query BAM (binary
version of Sequence Alignment/Map) data.
%files bam-MonetDB5
%defattr(-,root,root)
%{_libdir}/monetdb5/autoload/*_bam.mal
%{_libdir}/monetdb5/createdb/*_bam.sql
%{_libdir}/monetdb5/bam.mal
%{_libdir}/monetdb5/lib_bam.so
%endif
%if %{?with_rintegration:1}%{!?with_rintegration:0}
%package R
Summary: Integration of MonetDB and R, allowing use of R from within SQL
Group: Applications/Databases
Requires: MonetDB-SQL-server5%{?_isa} = %{version}-%{release}
%description R
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains the interface to use the R language from within
SQL queries.
NOTE: INSTALLING THIS PACKAGE OPENS UP SECURITY ISSUES. If you don't
know how this package affects the security of your system, do not
install it.
%files R
%defattr(-,root,root)
%{_libdir}/monetdb5/rapi.*
%{_libdir}/monetdb5/autoload/*_rapi.mal
%{_libdir}/monetdb5/lib_rapi.so
%endif
%if %{?with_pyintegration:1}%{!?with_pyintegration:0}
%package python2
Summary: Integration of MonetDB and Python, allowing use of Python from within SQL
Group: Applications/Databases
Requires: MonetDB-SQL-server5%{?_isa} = %{version}-%{release}
%description python2
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains the interface to use the Python language from
within SQL queries. This package is for Python 2.
NOTE: INSTALLING THIS PACKAGE OPENS UP SECURITY ISSUES. If you don't
know how this package affects the security of your system, do not
install it.
%files python2
%defattr(-,root,root)
%{_libdir}/monetdb5/pyapi.*
%{_libdir}/monetdb5/autoload/*_pyapi.mal
%{_libdir}/monetdb5/lib_pyapi.so
%endif
%if %{?with_fits:1}%{!?with_fits:0}
%package cfitsio
Summary: MonetDB: Add on module that provides support for FITS files
Group: Applications/Databases
Requires: MonetDB-SQL-server5%{?_isa} = %{version}-%{release}
%description cfitsio
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains a module for accessing data in the FITS file
format.
%files cfitsio
%defattr(-,root,root)
%{_libdir}/monetdb5/fits.mal
%{_libdir}/monetdb5/autoload/*_fits.mal
%{_libdir}/monetdb5/createdb/*_fits.sql
%{_libdir}/monetdb5/lib_fits.so
%endif
%package -n MonetDB5-server
Summary: MonetDB - Monet Database Management System
Group: Applications/Databases
Requires(pre): shadow-utils
Requires: %{name}-client%{?_isa} = %{version}-%{release}
%if (0%{?fedora} >= 22)
Recommends: %{name}-SQL-server5%{?_isa} = %{version}-%{release}
%if %{bits} == 64
Recommends: MonetDB5-server-hugeint%{?_isa} = %{version}-%{release}
%endif
Suggests: %{name}-client%{?_isa} = %{version}-%{release}
%endif
# versions up to 1.0.5 don't accept the queryid field in the result set
Conflicts: python-pymonetdb < 1.0.6
%description -n MonetDB5-server
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains the MonetDB server component. You need this
package if you want to use the MonetDB database system. If you want
to use the SQL frontend, you also need %{name}-SQL-server5.
%pre -n MonetDB5-server
getent group monetdb >/dev/null || groupadd -r monetdb
getent passwd monetdb >/dev/null || \
useradd -r -g monetdb -d %{_localstatedir}/MonetDB -s /sbin/nologin \
-c "MonetDB Server" monetdb
exit 0
%post -n MonetDB5-server
# move database from old location to new location
if [ -d %{_localstatedir}/MonetDB5/dbfarm -a ! %{_localstatedir}/MonetDB5/dbfarm -ef %{_localstatedir}/monetdb5/dbfarm ]; then
# old database exists and is different from new
if [ $(find %{_localstatedir}/monetdb5 -print | wc -l) -le 2 ]; then
# new database is still empty
rmdir %{_localstatedir}/monetdb5/dbfarm
rmdir %{_localstatedir}/monetdb5
mv %{_localstatedir}/MonetDB5 %{_localstatedir}/monetdb5
fi
fi
%files -n MonetDB5-server
%defattr(-,root,root)
%attr(750,monetdb,monetdb) %dir %{_localstatedir}/MonetDB
%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/monetdb5
%attr(2770,monetdb,monetdb) %dir %{_localstatedir}/monetdb5/dbfarm
%{_bindir}/mserver5
%{_libdir}/libmonetdb5.so.*
%dir %{_libdir}/monetdb5
%dir %{_libdir}/monetdb5/autoload
%if %{?with_fits:1}%{!?with_fits:0}
%exclude %{_libdir}/monetdb5/fits.mal
%exclude %{_libdir}/monetdb5/autoload/*_fits.mal
%exclude %{_libdir}/monetdb5/createdb/*_fits.sql
%exclude %{_libdir}/monetdb5/lib_fits.so
%endif
%if %{?with_geos:1}%{!?with_geos:0}
%exclude %{_libdir}/monetdb5/geom.mal
%endif
%if %{?with_lidar:1}%{!?with_lidar:0}
%exclude %{_libdir}/monetdb5/lidar.mal
%endif
%if %{?with_pyintegration:1}%{!?with_pyintegration:0}
%exclude %{_libdir}/monetdb5/pyapi.mal
%endif
%if %{?with_rintegration:1}%{!?with_rintegration:0}
%exclude %{_libdir}/monetdb5/rapi.mal
%endif
%exclude %{_libdir}/monetdb5/sql*.mal
%if %{bits} == 64
%exclude %{_libdir}/monetdb5/*_hge.mal
%exclude %{_libdir}/monetdb5/autoload/*_hge.mal
%endif
%{_libdir}/monetdb5/*.mal
%if %{?with_geos:1}%{!?with_geos:0}
%exclude %{_libdir}/monetdb5/autoload/*_geom.mal
%endif
%if %{?with_lidar:1}%{!?with_lidar:0}
%exclude %{_libdir}/monetdb5/autoload/*_lidar.mal
%endif
%if %{?with_pyintegration:1}%{!?with_pyintegration:0}
%exclude %{_libdir}/monetdb5/autoload/*_pyapi.mal
%endif
%if %{?with_rintegration:1}%{!?with_rintegration:0}
%exclude %{_libdir}/monetdb5/autoload/*_rapi.mal
%endif
%exclude %{_libdir}/monetdb5/autoload/??_sql*.mal
%{_libdir}/monetdb5/autoload/*.mal
%if %{?with_geos:1}%{!?with_geos:0}
%exclude %{_libdir}/monetdb5/lib_geom.so
%endif
%if %{?with_lidar:1}%{!?with_lidar:0}
%exclude %{_libdir}/monetdb5/lib_lidar.so
%endif
%if %{?with_pyintegration:1}%{!?with_pyintegration:0}
%exclude %{_libdir}/monetdb5/lib_pyapi.so
%endif
%if %{?with_rintegration:1}%{!?with_rintegration:0}
%exclude %{_libdir}/monetdb5/lib_rapi.so
%endif
%if %{?with_samtools:1}%{!?with_samtools:0}
%exclude %{_libdir}/monetdb5/bam.mal
%exclude %{_libdir}/monetdb5/autoload/*_bam.mal
%exclude %{_libdir}/monetdb5/lib_bam.so
%endif
%exclude %{_libdir}/monetdb5/lib_sql.so
%{_libdir}/monetdb5/*.so
%doc %{_mandir}/man1/mserver5.1.gz
%dir %{_datadir}/doc/MonetDB
%docdir %{_datadir}/doc/MonetDB
%{_datadir}/doc/MonetDB/*
%if %{bits} == 64
%package -n MonetDB5-server-hugeint
Summary: MonetDB - 128-bit integer support for MonetDB5-server
Group: Applications/Databases
Requires: MonetDB5-server%{?_isa}
%description -n MonetDB5-server-hugeint
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package provides HUGEINT (128-bit integer) support for the
MonetDB5-server component.
%files -n MonetDB5-server-hugeint
%exclude %{_libdir}/monetdb5/sql*_hge.mal
%{_libdir}/monetdb5/*_hge.mal
%exclude %{_libdir}/monetdb5/autoload/??_sql_hge.mal
%{_libdir}/monetdb5/autoload/*_hge.mal
%endif
%package -n MonetDB5-server-devel
Summary: MonetDB development files
Group: Applications/Databases
Requires: MonetDB5-server%{?_isa} = %{version}-%{release}
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
%description -n MonetDB5-server-devel
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains files needed to develop extensions that can be
used from the MAL level.
%files -n MonetDB5-server-devel
%defattr(-,root,root)
%dir %{_includedir}/monetdb
%{_includedir}/monetdb/mal*.h
%{_libdir}/libmonetdb5.so
%{_libdir}/pkgconfig/monetdb5.pc
%package SQL-server5
Summary: MonetDB5 SQL server modules
Group: Applications/Databases
Requires: MonetDB5-server%{?_isa} = %{version}-%{release}
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
# RHEL >= 7, and all current Fedora
Requires: %{_bindir}/systemd-tmpfiles
%endif
%if (0%{?fedora} >= 22)
%if %{bits} == 64
Recommends: %{name}-SQL-server5-hugeint%{?_isa} = %{version}-%{release}
%endif
Suggests: %{name}-client%{?_isa} = %{version}-%{release}
%endif
%description SQL-server5
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains the SQL frontend for MonetDB. If you want to
use SQL with MonetDB, you will need to install this package.
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
%post SQL-server5
systemd-tmpfiles --create %{_sysconfdir}/tmpfiles.d/monetdbd.conf
%endif
%files SQL-server5
%defattr(-,root,root)
%{_bindir}/monetdb
%{_bindir}/monetdbd
%dir %attr(775,monetdb,monetdb) %{_localstatedir}/log/monetdb
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
# RHEL >= 7, and all current Fedora
%{_sysconfdir}/tmpfiles.d/monetdbd.conf
%{_unitdir}/monetdbd.service
%else
# RedHat Enterprise Linux < 7
%dir %attr(775,monetdb,monetdb) %{_localstatedir}/run/monetdb
%exclude %{_sysconfdir}/tmpfiles.d/monetdbd.conf
# no _unitdir macro
%exclude %{_prefix}/lib/systemd/system/monetdbd.service
%endif
%config(noreplace) %attr(664,monetdb,monetdb) %{_localstatedir}/monetdb5/dbfarm/.merovingian_properties
%{_libdir}/monetdb5/autoload/??_sql.mal
%{_libdir}/monetdb5/lib_sql.so
%{_libdir}/monetdb5/*.sql
%dir %{_libdir}/monetdb5/createdb
%if %{?with_geos:1}%{!?with_geos:0}
%exclude %{_libdir}/monetdb5/createdb/*_geom.sql
%endif
%if %{?with_lidar:1}%{!?with_lidar:0}
%exclude %{_libdir}/monetdb5/createdb/*_lidar.sql
%endif
%if %{?with_samtools:1}%{!?with_samtools:0}
%exclude %{_libdir}/monetdb5/createdb/*_bam.sql
%endif
%{_libdir}/monetdb5/createdb/*.sql
%{_libdir}/monetdb5/sql*.mal
%if %{bits} == 64
%exclude %{_libdir}/monetdb5/createdb/*_hge.sql
%exclude %{_libdir}/monetdb5/sql*_hge.mal
%endif
%doc %{_mandir}/man1/monetdb.1.gz
%doc %{_mandir}/man1/monetdbd.1.gz
%dir %{_datadir}/doc/MonetDB-SQL
%docdir %{_datadir}/doc/MonetDB-SQL
%{_datadir}/doc/MonetDB-SQL/*
%if %{bits} == 64
%package SQL-server5-hugeint
Summary: MonetDB5 128 bit integer (hugeint) support for SQL
Group: Applications/Databases
Requires: MonetDB5-server-hugeint%{?_isa} = %{version}-%{release}
Requires: MonetDB-SQL-server5%{?_isa} = %{version}-%{release}
%description SQL-server5-hugeint
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package provides HUGEINT (128-bit integer) support for the SQL
frontend of MonetDB.
%files SQL-server5-hugeint
%defattr(-,root,root)
%{_libdir}/monetdb5/autoload/??_sql_hge.mal
%{_libdir}/monetdb5/createdb/*_hge.sql
%{_libdir}/monetdb5/sql*_hge.mal
%endif
%package testing
Summary: MonetDB - Monet Database Management System
Group: Applications/Databases
%description testing
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains the programs and files needed for testing the
MonetDB packages. You probably don't need this, unless you are a
developer. If you do want to test, install %{name}-testing-python.
%files testing
%license COPYING
%defattr(-,root,root)
%{_bindir}/Mdiff
%{_bindir}/MkillUsers
%{_bindir}/Mlog
%{_bindir}/Mtimeout
%package testing-python
Summary: MonetDB - Monet Database Management System
Group: Applications/Databases
Requires: %{name}-testing = %{version}-%{release}
Requires: %{name}-client-tests = %{version}-%{release}
Requires: python
BuildArch: noarch
%description testing-python
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains the Python programs and files needed for testing
the MonetDB packages. You probably don't need this, unless you are a
developer, but if you do want to test, this is the package you need.
%files testing-python
%defattr(-,root,root)
%{_bindir}/Mapprove.py
%{_bindir}/Mtest.py
%dir %{python2_sitelib}/MonetDBtesting
%{python2_sitelib}/MonetDBtesting/*
%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
%package selinux
Summary: SELinux policy files for MonetDB
Group: Applications/Databases
%if "%{_selinux_policy_version}" != ""
Requires: selinux-policy >= %{_selinux_policy_version}
%endif
Requires: %{name}-SQL-server5 = %{version}-%{release}
Requires(post): /usr/sbin/semodule, /sbin/restorecon, /sbin/fixfiles, MonetDB-SQL-server5, MonetDB5-server
Requires(postun): /usr/sbin/semodule, /sbin/restorecon, /sbin/fixfiles, MonetDB-SQL-server5, MonetDB5-server
BuildArch: noarch
%global selinux_types %(%{__awk} '/^#[[:space:]]*SELINUXTYPE=/,/^[^#]/ { if ($3 == "-") printf "%s ", $2 }' /etc/selinux/config 2>/dev/null)
%global selinux_variants %([ -z "%{selinux_types}" ] && echo mls targeted || echo %{selinux_types})
%description selinux
MonetDB is a database management system that is developed from a
main-memory perspective with use of a fully decomposed storage model,
automatic index management, extensibility of data types and search
accelerators. It also has an SQL frontend.
This package contains the SELinux policy for running MonetDB under
control of systemd.
%post selinux
for selinuxvariant in %{selinux_variants}
do
/usr/sbin/semodule -s ${selinuxvariant} -i \
%{_datadir}/selinux/${selinuxvariant}/monetdb.pp &> /dev/null || :
done
/sbin/restorecon -R %{_localstatedir}/monetdb5 %{_localstatedir}/log/monetdb %{_localstatedir}/run/monetdb %{_bindir}/monetdbd %{_bindir}/mserver5 %{_unitdir}/monetdbd.service &> /dev/null || :
/usr/bin/systemctl try-restart monetdbd.service
%postun selinux
if [ $1 -eq 0 ] ; then
active=`/usr/bin/systemctl is-active monetdbd.service`
if [ $active = active ]; then
/usr/bin/systemctl stop monetdbd.service
fi
for selinuxvariant in %{selinux_variants}
do
/usr/sbin/semodule -s ${selinuxvariant} -r monetdb &> /dev/null || :
done
/sbin/restorecon -R %{_localstatedir}/monetdb5 %{_localstatedir}/log/monetdb %{_localstatedir}/run/monetdb %{_bindir}/monetdbd %{_bindir}/mserver5 %{_unitdir}/monetdbd.service &> /dev/null || :
if [ $active = active ]; then
/usr/bin/systemctl start monetdbd.service
fi
fi
%files selinux
%defattr(-,root,root,0755)
%doc buildtools/selinux/*
%{_datadir}/selinux/*/monetdb.pp
%endif
%prep
%setup -q
%build
# There is a bug in GCC version 4.8 on AArch64 architectures
# that causes it to report an internal error when compiling
# testing/difflib.c. The work around is to not use -fstack-protector-strong.
# The bug exhibits itself on CentOS 7 on AArch64.
if [ `gcc -v 2>&1 | grep -c 'Target: aarch64\|gcc version 4\.'` -eq 2 ]; then
# set CFLAGS before configure, so that this value gets used
CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -grecord-gcc-switches '
export CFLAGS
fi
%{configure} \
--enable-assert=no \
--enable-console=yes \
--enable-debug=no \
--enable-developer=no \
--enable-embedded=no \
--enable-embedded-r=no \
--enable-fits=%{?with_fits:yes}%{!?with_fits:no} \
--enable-gdk=yes \
--enable-geom=%{?with_geos:yes}%{!?with_geos:no} \
--enable-instrument=no \
--enable-int128=%{?with_int128:yes}%{!?with_int128:no} \
--enable-lidar=%{?with_lidar:yes}%{!?with_lidar:no} \
--enable-mapi=yes \
--enable-monetdb5=yes \
--enable-netcdf=no \
--enable-odbc=yes \
--enable-optimize=no \
--enable-profile=no \
--enable-pyintegration=%{?with_pyintegration:yes}%{!?with_pyintegration:no} \
--enable-rintegration=%{?with_rintegration:yes}%{!?with_rintegration:no} \
--enable-shp=no \
--enable-sql=yes \
--enable-strict=no \
--enable-testing=yes \
--with-bz2=yes \
--with-curl=yes \
--with-gdal=%{?with_lidar:yes}%{!?with_lidar:no} \
--with-geos=%{?with_geos:yes}%{!?with_geos:no} \
--with-liblas=%{?with_lidar:yes}%{!?with_lidar:no} \
--with-libxml2=yes \
--with-lzma=yes \
--with-openssl=yes \
--with-regex=%{?with_pcre:PCRE}%{!?with_pcre:POSIX} \
--with-proj=no \
--with-pthread=yes \
--with-python2=yes \
--with-python3=no \
--with-readline=yes \
--with-samtools=%{?with_samtools:yes}%{!?with_samtools:no} \
--with-unixodbc=yes \
--with-uuid=yes \
--with-valgrind=no \
%{?comp_cc:CC="%{comp_cc}"}