/[smecontribs]/rpms/mariadb-connector-c/contribs10/mariadb-connector-c.spec
ViewVC logotype

Diff of /rpms/mariadb-connector-c/contribs10/mariadb-connector-c.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by jpp, Wed Nov 10 04:26:08 2021 UTC Revision 1.3 by jpp, Thu Nov 11 00:02:14 2021 UTC
# Line 1  Line 1 
1  # For deep debugging we need to build binaries with extra debug info  # For deep debugging we need to build binaries with extra debug info
2  %bcond_with     debug  %bcond_with     debug
 # Enable building and packing of the testsuite  
 %bcond_without  testsuite  
   
 # Enable CMake in-source builds  
 #   This is is a workaround for the https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds  
 #   which reverts the CMake behaviour to before F33  
 #   The Change owners offered themselves to help fix the affected packages via ProvenPackager rights.  
 #   I'm generally in favor of this change, however when I tried to adapt it, I encountered a number of issues.  
 #   That's why I disabled it for now.  
 %global __cmake_in_source_build 1  
   
   
3    
4  Name:           mariadb-connector-c  Name:           mariadb-connector-c
5  Version:        3.1.13  Version:        3.1.13
6  Release:        1%{?with_debug:.debug}%{?dist}  Release:        1%{?with_debug:.debug}%{?dist}
7  Summary:        The MariaDB Native Client library (C driver)  Summary:        The MariaDB Native Client library (C driver)
8  License:        LGPLv2+  License:        LGPLv2+
9  Source:         https://downloads.mariadb.org/interstitial/connector-c-%{version}/%{name}-%{version}-src.tar.gz  Source:         https://downloads.mariadb.org/interstitial/connector-c-%{version}/mariadb-connector-c-%{version}-src.tar.gz
10  Source2:        my.cnf  Source2:        my.cnf
11  Source3:        client.cnf  Source3:        client.cnf
12  Url:            http://mariadb.org/  Url:            http://mariadb.org/
13  # More information: https://mariadb.com/kb/en/mariadb/building-connectorc-from-source/  # More information: https://mariadb.com/kb/en/mariadb/building-connectorc-from-source/
14    
 %if %{with testsuite}  
 Patch1:         testsuite.patch  
 %endif  
   
15  Requires:       %{_sysconfdir}/my.cnf  Requires:       %{_sysconfdir}/my.cnf
16  BuildRequires:  gcc-c++ cmake openssl-devel zlib-devel  BuildRequires:  zlib-devel cmake openssl-devel gcc-c++
17  # Remote-IO plugin  # Remote-IO plugin
18  BuildRequires:  libcurl-devel  BuildRequires:  libcurl-devel
19  # auth_gssapi_client plugin  # auth_gssapi_client plugin
20  BuildRequires:  krb5-devel  BuildRequires:  krb5-devel
21    
22    Requires:       mariadb >= 3:10.3.27
23    Requires:       %{name}-config = %{version}-%{release}
24    
25  %description  %description
26  The MariaDB Native Client library (C driver) is used to connect applications  The MariaDB Native Client library (C driver) is used to connect applications
27  developed in C/C++ to MariaDB and MySQL databases.  developed in C/C++ to MariaDB and MySQL databases.
# Line 46  Summary:        Development files for ma Line 33  Summary:        Development files for ma
33  Requires:       %{name} = %{version}-%{release}  Requires:       %{name} = %{version}-%{release}
34  Requires:       openssl-devel zlib-devel  Requires:       openssl-devel zlib-devel
35  BuildRequires:  multilib-rpm-config  BuildRequires:  multilib-rpm-config
36  Conflicts:      %{?fedora:community-}mysql-devel  Conflicts:      mysql-devel
37    
38    Requires:       mariadb-devel >= 3:10.3.27
39    
40  %description devel  %description devel
41  Development files for mariadb-connector-c.  Development files for mariadb-connector-c.
# Line 54  Contains everything needed to build agai Line 43  Contains everything needed to build agai
43    
44    
45    
 %if %{with testsuite}  
 %package test  
 Summary:        Testsuite files for mariadb-connector-c  
 Requires:       %{name} = %{version}-%{release}  
 Requires:       cmake  
 Recommends:     mariadb-server  
   
 %description test  
 Testsuite files for mariadb-connector-c.  
 Contains binaries and a prepared CMake ctest file.  
 Requires running MariaDB / MySQL server with create database "test".  
 %endif  
   
   
46  %package config  %package config
47  Summary:        Configuration files for packages that use /etc/my.cnf as a configuration file  Summary:        Configuration files for packages that use /etc/my.cnf as a configuration file
48  BuildArch:      noarch  BuildArch:      noarch
# Line 83  and require this package, so the /etc/my Line 58  and require this package, so the /etc/my
58    
59  %prep  %prep
60  %setup -q -n %{name}-%{version}-src  %setup -q -n %{name}-%{version}-src
 %if %{with testsuite}  
 %patch1 -p1  
 %endif  
61    
62  # Remove unsused parts  # Remove unsused parts
63  rm -r win win-iconv zlib  rm -r win zlib win-iconv
64    
65    
66    
67  %build  %build
68    %{set_build_flags}
69    
70    # Override all optimization flags when making a debug build
71    %{?with_debug: CFLAGS="$CFLAGS -O0 -g"}
72    CXXFLAGS="$CFLAGS"
73    export CFLAGS CXXFLAGS
74    
75  # https://jira.mariadb.org/browse/MDEV-13836:  # https://jira.mariadb.org/browse/MDEV-13836:
76  #   The server has (used to have for ages) some magic around the port number.  #   The server has (used to have for ages) some magic around the port number.
77  #   If it's 0, the default port value will use getservbyname("mysql", "tcp"), that is, whatever is written in /etc/services.  #   If it's 0, the default port value will use getservbyname("mysql", "tcp"), that is, whatever is written in /etc/services.
78  #   If it's a positive number, say, 3306, it will be 3306, no matter what /etc/services say.  #   If it's a positive number, say, 3306, it will be 3306, no matter what /etc/services say.
79  #   I don't know if that behavior makes much sense, /etc/services wasn't supposed to be a system configuration file.  #   I don't know if that behavior makes much sense, /etc/services wasn't supposed to be a system configuration file.
80    
81  # The INSTALL_* macros have to be specified relative to CMAKE_INSTALL_PREFIX  # The INSTALL_xxx macros have to be specified relative to CMAKE_INSTALL_PREFIX
82  # so we can't use %%{_datadir} and so forth here.  # so we can't use %%{_datadir} and so forth here.
83    
84  %cmake . \  %cmake . \
# Line 109  rm -r win win-iconv zlib Line 88  rm -r win win-iconv zlib
88         -DMARIADB_UNIX_ADDR=%{_sharedstatedir}/mysql/mysql.sock \         -DMARIADB_UNIX_ADDR=%{_sharedstatedir}/mysql/mysql.sock \
89         -DMARIADB_PORT=3306 \         -DMARIADB_PORT=3306 \
90  \  \
91         -DWITH_EXTERNAL_ZLIB=ON \         -DWITH_EXTERNAL_ZLIB=YES \
92         -DWITH_SSL=OPENSSL \         -DWITH_SSL=OPENSSL \
93         -DWITH_MYSQLCOMPAT=ON \         -DWITH_MYSQLCOMPAT=ON \
94         -DPLUGIN_CLIENT_ED25519=DYNAMIC \         -DPLUGIN_CLIENT_ED25519=DYNAMIC \
95  \  \
96         -DINSTALL_LAYOUT=RPM \         -DINSTALL_LAYOUT=RPM \
97           -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
98         -DINSTALL_BINDIR="bin" \         -DINSTALL_BINDIR="bin" \
99         -DINSTALL_LIBDIR="%{_lib}" \         -DINSTALL_LIBDIR="%{_lib}" \
100         -DINSTALL_INCLUDEDIR="include/mysql" \         -DINSTALL_INCLUDEDIR="include/mysql" \
101         -DINSTALL_PLUGINDIR="%{_lib}/mariadb/plugin" \         -DINSTALL_PLUGINDIR="%{_lib}/mariadb/plugin" \
102         -DINSTALL_PCDIR="%{_lib}/pkgconfig" \         -DINSTALL_PCDIR="%{_lib}/pkgconfig" \
103  \  \
104  %if %{with testsuite}         -DWITH_UNITTEST=ON
        -DWITH_UNIT_TESTS=ON  
 %endif  
105    
 # Override all optimization flags when making a debug build  
 %if %{with debug}  
 CFLAGS="$CFLAGS     -O0 -g"; export CFLAGS  
 CXXFLAGS="$CXXFLAGS -O0 -g"; export CXXFLAGS  
 FFLAGS="$FFLAGS     -O0 -g"; export FFLAGS  
 FCFLAGS="$FCFLAGS   -O0 -g"; export FCFLAGS  
 %endif  
106    
 cmake -B %__cmake_builddir -LAH  
107    
108  %cmake_build  #cmake -LAH
109    
110    %make_build
111    
112    
113    
114  %install  %install
115  %cmake_install  %make_install
116    
117  %multilib_fix_c_header --file %{_includedir}/mysql/mariadb_version.h  %multilib_fix_c_header --file %{_includedir}/mysql/mariadb_version.h
118    
# Line 165  install -D -p -m 0644 %{SOURCE3} %{build Line 137  install -D -p -m 0644 %{SOURCE3} %{build
137  # - don't run mytap tests  # - don't run mytap tests
138  # - ignore the testsuite result for now. Enable tests now, fix them later.  # - ignore the testsuite result for now. Enable tests now, fix them later.
139  # Note: there must be a database called 'test' created for the testcases to be run  # Note: there must be a database called 'test' created for the testcases to be run
 %if %{with testsuite}  
140  pushd unittest/libmariadb/  pushd unittest/libmariadb/
141  %ctest || :  ctest || :
142  popd  popd
143  %endif  
144    
145    
146  %files  %files
# Line 201  popd Line 172  popd
172  %dir %{_includedir}/mysql  %dir %{_includedir}/mysql
173  %{_includedir}/mysql/*  %{_includedir}/mysql/*
174    
175    %license COPYING.LIB
176    
177    
178  %files config  %files config
# Line 210  popd Line 182  popd
182    
183    
184    
 %if %{with testsuite}  
 %files test  
 %dir %{_datadir}/%{name}  
 %{_datadir}/%{name}/*  
 %{_libdir}/libcctap.so  
 %endif  
   
   
 # Opened issues on the upstream tracker:  
 #   https://jira.mariadb.org/browse/CONC-293  
 #      DESCRIPTION: add mysql_config and mariadb_config man page  
 #      IN_PROGRESS: upsteam plans to add it to 3.1 release  
 #   https://jira.mariadb.org/browse/CONC-436  
 #      DESCRIPTION: Make testsuite independent / portable  
 #      NEW:         PR submitted, problem explained, waiting on upstream response  
   
 # Downstream issues:  
 #   Start running this package testsuite at the build time  
 #      It requires a running MariaDB server  
 #         mariadb-server package pulls in mariadb-connector-c as a dependency  
 #         Need to ensure, that the testsuite is ran against the newly build library, instead of the one from the pulled package  
 #      Need to ensure, that the testsuite will also run properly on 'fedpkg local' buid, not damaging the host machine  
   
185  %changelog  %changelog
186  * Fri May 14 2021 Michal Schorm <mschorm@redhat.com> - 3.1.13-1  * Fri May 14 2021 Michal Schorm <mschorm@redhat.com> - 3.1.13-1
187  - Rebase to 3.1.13  - Rebase to 3.1.13
# Line 240  popd Line 189  popd
189  * Wed Feb 24 2021 Michal Schorm <mschorm@redhat.com> - 3.1.12-1  * Wed Feb 24 2021 Michal Schorm <mschorm@redhat.com> - 3.1.12-1
190  - Rebase to 3.1.12  - Rebase to 3.1.12
191    
192  * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.11-2  * Thu Dec 03 2020 Michal Schorm <mschorm@redhat.com> - 3.1.11-2
193  - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild  - Require specific minimal version of the 'mariadb' package, if it is installed
194    
195  * Wed Nov 04 2020 Michal Schorm <mschorm@redhat.com> - 3.1.11-1  * Tue Nov 10 2020 Michal Schorm <mschorm@redhat.com> - 3.1.11-1
196  - Rebase to 3.1.11  - Rebase to 3.1.11
197    
 * Fri Sep 18 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.10-1  
 - Rebase to 3.1.10  
   
 * Tue Aug 04 2020 Michal Schorm <mschorm@redhat.com> - 3.1.9-5  
 - Revert the CMake change regarding the in-source builds for now  
 - %%cmake macro covers the %%{set_build_flags}, so they are not needed  
   That also means, the debug buildchnages to the build flags must be done AFTER the  
   %%cmake macro was used.  
 - %%cmake macro also covers the CMAKE_INSTALL_PREFIX="%%{_prefix}" option  
 - Default to %%cmake commands instead fo %%make commands  
 - Update the WITH_UNITTEST macro to the one upstream use now  
 - Introduce macro to enable / disable testusite (and building of the *-test subpackage)  
   
 * Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.9-4  
 - Second attempt - Rebuilt for  
   https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild  
   
 * Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.9-3  
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild  
   
 * Tue Jul 14 2020 Michal Schorm <mschorm@redhat.com> - 3.1.9-2  
 - Add explicit confict between mariadb-connector-c-devel and community-mysql-devel packages  
   
198  * Wed Jun 24 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.9-1  * Wed Jun 24 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.9-1
199  - Rebase to 3.1.9  - Rebase to 3.1.9
200    - Overlinking issues fixed by upstream in 3.1.3 release
201  * Thu May 14 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.8-1  - Add explicit confict between mariadb-connector-c-devel and mysql-devel packages
 - Rebase to 3.1.8  
   
 * Mon Mar 16 2020 Michal Schorm <mschorm@redhat.com> - 3.1.7-2  
 - Rebase to 3.1.7 latest git  
   Fix for: https://jira.mariadb.org/browse/CONC-441  
   
 * Mon Feb 03 2020 Michal Schorm <mschorm@redhat.com> - 3.1.7-1  
 - Rebase to 3.1.7  
   
 * Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.6-2  
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild  
   
 * Tue Dec 17 2019 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.6-1  
 - Rebase to 3.1.6  
   
 * Tue Nov 12 2019 Michal Schorm <mschorm@redhat.com> - 3.1.5-1  
 - Rebase to 3.1.5  
   
 * Sun Nov 03 2019 Michal Schorm <mschorm@redhat.com> - 3.1.4-2  
 - Fix for #1624533  
   
 * Wed Sep 18 2019 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.4-1  
 - Rebase to 3.1.4  
   
 * Wed Sep 11 2019 Michal Schorm <mschorm@redhat.com> - 3.1.3-3  
 - Enable building of the ed25519 client plugin.  
   It won't be shipped anymore by 'mariadb-server'  
   
 * Mon Aug 19 2019 Michal Schorm <mschorm@redhat.com> - 3.1.3-2  
 - Extract the prepared testsuite to the standalone subpackage so it can be run outside of the buildroot  
   
 * Fri Aug 02 2019 Michal Schorm <mschorm@redhat.com> - 3.1.3-1  
 - Rebase to 3.1.3 version  
 - Patch upstreamed  
 - Remove glob from library version, as per Fedora Packaging Guidelines  
   
 * Fri Jul 19 2019 Michal Schorm <mschorm@redhat.com> - 3.1.2-2  
 - Use macro to set build flags  
202    
203  * Fri Jul 12 2019 Michal Schorm <mschorm@redhat.com> - 3.1.2-1  * Fri Jul 12 2019 Michal Schorm <mschorm@redhat.com> - 3.1.2-1
204  - Rebase to 3.1 version  - Rebase to 3.1.2
205  - Disabling the ED25519 plugin  - Introducing ED25519 plugin
206  - Plugindir patch upstreamed  - Plugindir issues (from 3.0.9 release) fixed by upstream
207  - Added debug build switch    Resolves: #1691176
   
 * Tue May 21 2019 Michal Schorm <mschorm@redhat.com> - 3.0.10-2  
 - Fix overlinking issues  
208    
209  * Wed May 15 2019 Michal Schorm <mschorm@redhat.com> - 3.0.10-1  * Wed May 15 2019 Michal Schorm <mschorm@redhat.com> - 3.0.10-1
210  - Rebase to 3.0.10  - Rebase to 3.0.10
211  - Remove scriplet; no longer needed  - Use macro for tarball name
212    - Use macro to set build flags
213    - Use macros for make commands
214    - Remove the scriptlets non relevant for RHEL-8
215    - Add info for the testsuite execution
216    - Remove glob from library version
217    - Remove info about the upstream issues
218    
219  * Fri Mar 29 2019 Michal Schorm <mschorm@redhat.com> - 3.0.9-3  * Fri Mar 29 2019 Michal Schorm <mschorm@redhat.com> - 3.0.8-2
220  - Add "zlib-devel" requirement in "-devel" subpackage. MariaDB requires  - Add "zlib-devel" requirement in "-devel" subpackage. MariaDB requires
221    linking with "-lz", which will fail without the zlib library    linking with "-lz", which will fail without the zlib library
222  - Related: #1693966  - Resolves: #1710471
   
 * Mon Feb 18 2019 Michal Schorm <mschorm@redhat.com> - 3.0.9-2  
 - Fix plugindir issues  
   Resolves: #1624533  
   
 * Mon Feb 18 2019 Michal Schorm <mschorm@redhat.com> - 3.0.9-1  
 - Rebase to 3.0.9  
   
 * Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.8-2  
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild  
223    
224  * Wed Jan 02 2019 Michal Schorm <mschorm@redhat.com> - 3.0.8-1  * Wed Jan 02 2019 Michal Schorm <mschorm@redhat.com> - 3.0.8-1
225  - Rebase to 3.0.8  - Rebase to 3.0.8
226    
227  * Mon Nov 19 2018 Michal Schorm <mschorm@redhat.com> - 3.0.7-1  * Mon Dec 10 2018 Michal Schorm <mschorm@redhat.com> - 3.0.7-1
228  - Rebase to 3.0.7  - Rebase to 3.0.7
229    
230  * Tue Sep 04 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-2  * Tue Sep 04 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-2
231  - Fix parallel installability of x86_64 and i686 devel package  - Fix parallel installability of x86_64 and i686 devel package
232    - Resolves: #1637031
233    
234  * Fri Aug 03 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-1  * Fri Aug 03 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-1
235  - Rebase to 3.0.6  - Rebase to 3.0.6
236    
237  * Tue Jul 17 2018 Honza Horak <hhorak@redhat.com> - 3.0.5-3  * Tue Jul 17 2018 Honza Horak <hhorak@redhat.com> - 3.0.5-2
238  - Add -config sub-package that delivers system-wide /etc/my.cnf and  - Add -config sub-package that delivers system-wide /etc/my.cnf and
239    /etc/my.cnf.d directory, that other packages should use    /etc/my.cnf.d directory, that other packages should use
240    This package also obsoletes mariadb-config    This package also obsoletes mariadb-config
241    
 * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-2  
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild  
   
242  * Fri Jun 08 2018 Michal Schorm <mschorm@redhat.com> - 3.0.5-1  * Fri Jun 08 2018 Michal Schorm <mschorm@redhat.com> - 3.0.5-1
243  - Rebase to 3.0.5  - Rebase to 3.0.5
244    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed