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

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

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


Revision 1.1 - (hide annotations) (download)
Wed Nov 10 04:26:08 2021 UTC (3 years ago) by jpp
Branch: MAIN
CVS Tags: mariadb-connector-c-3_1_13-1_fc33
Initial import

1 jpp 1.1 # For deep debugging we need to build binaries with extra debug info
2     %bcond_with debug
3     # Enable building and packing of the testsuite
4     %bcond_without testsuite
5    
6     # Enable CMake in-source builds
7     # This is is a workaround for the https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds
8     # which reverts the CMake behaviour to before F33
9     # The Change owners offered themselves to help fix the affected packages via ProvenPackager rights.
10     # I'm generally in favor of this change, however when I tried to adapt it, I encountered a number of issues.
11     # That's why I disabled it for now.
12     %global __cmake_in_source_build 1
13    
14    
15    
16     Name: mariadb-connector-c
17     Version: 3.1.13
18     Release: 1%{?with_debug:.debug}%{?dist}
19     Summary: The MariaDB Native Client library (C driver)
20     License: LGPLv2+
21     Source: https://downloads.mariadb.org/interstitial/connector-c-%{version}/%{name}-%{version}-src.tar.gz
22     Source2: my.cnf
23     Source3: client.cnf
24     Url: http://mariadb.org/
25     # More information: https://mariadb.com/kb/en/mariadb/building-connectorc-from-source/
26    
27     %if %{with testsuite}
28     Patch1: testsuite.patch
29     %endif
30    
31     Requires: %{_sysconfdir}/my.cnf
32     BuildRequires: gcc-c++ cmake openssl-devel zlib-devel
33     # Remote-IO plugin
34     BuildRequires: libcurl-devel
35     # auth_gssapi_client plugin
36     BuildRequires: krb5-devel
37    
38     %description
39     The MariaDB Native Client library (C driver) is used to connect applications
40     developed in C/C++ to MariaDB and MySQL databases.
41    
42    
43    
44     %package devel
45     Summary: Development files for mariadb-connector-c
46     Requires: %{name} = %{version}-%{release}
47     Requires: openssl-devel zlib-devel
48     BuildRequires: multilib-rpm-config
49     Conflicts: %{?fedora:community-}mysql-devel
50    
51     %description devel
52     Development files for mariadb-connector-c.
53     Contains everything needed to build against libmariadb.so >=3 client library.
54    
55    
56    
57     %if %{with testsuite}
58     %package test
59     Summary: Testsuite files for mariadb-connector-c
60     Requires: %{name} = %{version}-%{release}
61     Requires: cmake
62     Recommends: mariadb-server
63    
64     %description test
65     Testsuite files for mariadb-connector-c.
66     Contains binaries and a prepared CMake ctest file.
67     Requires running MariaDB / MySQL server with create database "test".
68     %endif
69    
70    
71     %package config
72     Summary: Configuration files for packages that use /etc/my.cnf as a configuration file
73     BuildArch: noarch
74     Obsoletes: mariadb-config <= 3:10.3.8-4
75    
76     %description config
77     This package delivers /etc/my.cnf that includes other configuration files
78     from the /etc/my.cnf.d directory and ships this directory as well.
79     Other packages should only put their files into /etc/my.cnf.d directory
80     and require this package, so the /etc/my.cnf file is present.
81    
82    
83    
84     %prep
85     %setup -q -n %{name}-%{version}-src
86     %if %{with testsuite}
87     %patch1 -p1
88     %endif
89    
90     # Remove unsused parts
91     rm -r win win-iconv zlib
92    
93    
94    
95     %build
96     # https://jira.mariadb.org/browse/MDEV-13836:
97     # The server has (used to have for ages) some magic around the port number.
98     # If it's 0, the default port value will use getservbyname("mysql", "tcp"), that is, whatever is written in /etc/services.
99     # If it's a positive number, say, 3306, it will be 3306, no matter what /etc/services say.
100     # I don't know if that behavior makes much sense, /etc/services wasn't supposed to be a system configuration file.
101    
102     # The INSTALL_* macros have to be specified relative to CMAKE_INSTALL_PREFIX
103     # so we can't use %%{_datadir} and so forth here.
104    
105     %cmake . \
106     -DCMAKE_BUILD_TYPE="%{?with_debug:Debug}%{!?with_debug:RelWithDebInfo}" \
107     -DCMAKE_SYSTEM_PROCESSOR="%{_arch}" \
108     \
109     -DMARIADB_UNIX_ADDR=%{_sharedstatedir}/mysql/mysql.sock \
110     -DMARIADB_PORT=3306 \
111     \
112     -DWITH_EXTERNAL_ZLIB=ON \
113     -DWITH_SSL=OPENSSL \
114     -DWITH_MYSQLCOMPAT=ON \
115     -DPLUGIN_CLIENT_ED25519=DYNAMIC \
116     \
117     -DINSTALL_LAYOUT=RPM \
118     -DINSTALL_BINDIR="bin" \
119     -DINSTALL_LIBDIR="%{_lib}" \
120     -DINSTALL_INCLUDEDIR="include/mysql" \
121     -DINSTALL_PLUGINDIR="%{_lib}/mariadb/plugin" \
122     -DINSTALL_PCDIR="%{_lib}/pkgconfig" \
123     \
124     %if %{with testsuite}
125     -DWITH_UNIT_TESTS=ON
126     %endif
127    
128     # Override all optimization flags when making a debug build
129     %if %{with debug}
130     CFLAGS="$CFLAGS -O0 -g"; export CFLAGS
131     CXXFLAGS="$CXXFLAGS -O0 -g"; export CXXFLAGS
132     FFLAGS="$FFLAGS -O0 -g"; export FFLAGS
133     FCFLAGS="$FCFLAGS -O0 -g"; export FCFLAGS
134     %endif
135    
136     cmake -B %__cmake_builddir -LAH
137    
138     %cmake_build
139    
140    
141    
142     %install
143     %cmake_install
144    
145     %multilib_fix_c_header --file %{_includedir}/mysql/mariadb_version.h
146    
147     # Remove static linked libraries and symlinks to them
148     rm %{buildroot}%{_libdir}/lib*.a
149    
150     # Add a compatibility symlinks
151     ln -s mariadb_config %{buildroot}%{_bindir}/mysql_config
152     ln -s mariadb_version.h %{buildroot}%{_includedir}/mysql/mysql_version.h
153    
154     # Install config files
155     install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/my.cnf
156     install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf
157    
158    
159    
160     %check
161     # Check the generated configuration on the actual machine
162     %{buildroot}%{_bindir}/mariadb_config
163    
164     # Run the unit tests
165     # - don't run mytap tests
166     # - ignore the testsuite result for now. Enable tests now, fix them later.
167     # Note: there must be a database called 'test' created for the testcases to be run
168     %if %{with testsuite}
169     pushd unittest/libmariadb/
170     %ctest || :
171     popd
172     %endif
173    
174    
175     %files
176     %{_libdir}/libmariadb.so.3
177    
178     %dir %{_libdir}/mariadb
179     %dir %{_libdir}/mariadb/plugin
180     %{_libdir}/mariadb/plugin/*
181    
182     %doc README
183     %license COPYING.LIB
184    
185    
186    
187     %files devel
188     # Binary which provides compiler info for software compiling against this library
189     %{_bindir}/mariadb_config
190     %{_bindir}/mysql_config
191    
192     # Symlinks to the versioned library
193     %{_libdir}/libmariadb.so
194     %{_libdir}/libmysqlclient.so
195     %{_libdir}/libmysqlclient_r.so
196    
197     # Pkgconfig
198     %{_libdir}/pkgconfig/libmariadb.pc
199    
200     # Header files
201     %dir %{_includedir}/mysql
202     %{_includedir}/mysql/*
203    
204    
205    
206     %files config
207     %dir %{_sysconfdir}/my.cnf.d
208     %config(noreplace) %{_sysconfdir}/my.cnf
209     %config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf
210    
211    
212    
213     %if %{with testsuite}
214     %files test
215     %dir %{_datadir}/%{name}
216     %{_datadir}/%{name}/*
217     %{_libdir}/libcctap.so
218     %endif
219    
220    
221     # Opened issues on the upstream tracker:
222     # https://jira.mariadb.org/browse/CONC-293
223     # DESCRIPTION: add mysql_config and mariadb_config man page
224     # IN_PROGRESS: upsteam plans to add it to 3.1 release
225     # https://jira.mariadb.org/browse/CONC-436
226     # DESCRIPTION: Make testsuite independent / portable
227     # NEW: PR submitted, problem explained, waiting on upstream response
228    
229     # Downstream issues:
230     # Start running this package testsuite at the build time
231     # It requires a running MariaDB server
232     # mariadb-server package pulls in mariadb-connector-c as a dependency
233     # Need to ensure, that the testsuite is ran against the newly build library, instead of the one from the pulled package
234     # Need to ensure, that the testsuite will also run properly on 'fedpkg local' buid, not damaging the host machine
235    
236     %changelog
237     * Fri May 14 2021 Michal Schorm <mschorm@redhat.com> - 3.1.13-1
238     - Rebase to 3.1.13
239    
240     * Wed Feb 24 2021 Michal Schorm <mschorm@redhat.com> - 3.1.12-1
241     - Rebase to 3.1.12
242    
243     * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.11-2
244     - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
245    
246     * Wed Nov 04 2020 Michal Schorm <mschorm@redhat.com> - 3.1.11-1
247     - Rebase to 3.1.11
248    
249     * Fri Sep 18 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.10-1
250     - Rebase to 3.1.10
251    
252     * Tue Aug 04 2020 Michal Schorm <mschorm@redhat.com> - 3.1.9-5
253     - Revert the CMake change regarding the in-source builds for now
254     - %%cmake macro covers the %%{set_build_flags}, so they are not needed
255     That also means, the debug buildchnages to the build flags must be done AFTER the
256     %%cmake macro was used.
257     - %%cmake macro also covers the CMAKE_INSTALL_PREFIX="%%{_prefix}" option
258     - Default to %%cmake commands instead fo %%make commands
259     - Update the WITH_UNITTEST macro to the one upstream use now
260     - Introduce macro to enable / disable testusite (and building of the *-test subpackage)
261    
262     * Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.9-4
263     - Second attempt - Rebuilt for
264     https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
265    
266     * Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.9-3
267     - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
268    
269     * Tue Jul 14 2020 Michal Schorm <mschorm@redhat.com> - 3.1.9-2
270     - Add explicit confict between mariadb-connector-c-devel and community-mysql-devel packages
271    
272     * Wed Jun 24 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.9-1
273     - Rebase to 3.1.9
274    
275     * Thu May 14 2020 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.8-1
276     - Rebase to 3.1.8
277    
278     * Mon Mar 16 2020 Michal Schorm <mschorm@redhat.com> - 3.1.7-2
279     - Rebase to 3.1.7 latest git
280     Fix for: https://jira.mariadb.org/browse/CONC-441
281    
282     * Mon Feb 03 2020 Michal Schorm <mschorm@redhat.com> - 3.1.7-1
283     - Rebase to 3.1.7
284    
285     * Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.6-2
286     - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
287    
288     * Tue Dec 17 2019 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.6-1
289     - Rebase to 3.1.6
290    
291     * Tue Nov 12 2019 Michal Schorm <mschorm@redhat.com> - 3.1.5-1
292     - Rebase to 3.1.5
293    
294     * Sun Nov 03 2019 Michal Schorm <mschorm@redhat.com> - 3.1.4-2
295     - Fix for #1624533
296    
297     * Wed Sep 18 2019 Lukas Javorsky <ljavorsk@redhat.com> - 3.1.4-1
298     - Rebase to 3.1.4
299    
300     * Wed Sep 11 2019 Michal Schorm <mschorm@redhat.com> - 3.1.3-3
301     - Enable building of the ed25519 client plugin.
302     It won't be shipped anymore by 'mariadb-server'
303    
304     * Mon Aug 19 2019 Michal Schorm <mschorm@redhat.com> - 3.1.3-2
305     - Extract the prepared testsuite to the standalone subpackage so it can be run outside of the buildroot
306    
307     * Fri Aug 02 2019 Michal Schorm <mschorm@redhat.com> - 3.1.3-1
308     - Rebase to 3.1.3 version
309     - Patch upstreamed
310     - Remove glob from library version, as per Fedora Packaging Guidelines
311    
312     * Fri Jul 19 2019 Michal Schorm <mschorm@redhat.com> - 3.1.2-2
313     - Use macro to set build flags
314    
315     * Fri Jul 12 2019 Michal Schorm <mschorm@redhat.com> - 3.1.2-1
316     - Rebase to 3.1 version
317     - Disabling the ED25519 plugin
318     - Plugindir patch upstreamed
319     - Added debug build switch
320    
321     * Tue May 21 2019 Michal Schorm <mschorm@redhat.com> - 3.0.10-2
322     - Fix overlinking issues
323    
324     * Wed May 15 2019 Michal Schorm <mschorm@redhat.com> - 3.0.10-1
325     - Rebase to 3.0.10
326     - Remove scriplet; no longer needed
327    
328     * Fri Mar 29 2019 Michal Schorm <mschorm@redhat.com> - 3.0.9-3
329     - Add "zlib-devel" requirement in "-devel" subpackage. MariaDB requires
330     linking with "-lz", which will fail without the zlib library
331     - Related: #1693966
332    
333     * Mon Feb 18 2019 Michal Schorm <mschorm@redhat.com> - 3.0.9-2
334     - Fix plugindir issues
335     Resolves: #1624533
336    
337     * Mon Feb 18 2019 Michal Schorm <mschorm@redhat.com> - 3.0.9-1
338     - Rebase to 3.0.9
339    
340     * Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.8-2
341     - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
342    
343     * Wed Jan 02 2019 Michal Schorm <mschorm@redhat.com> - 3.0.8-1
344     - Rebase to 3.0.8
345    
346     * Mon Nov 19 2018 Michal Schorm <mschorm@redhat.com> - 3.0.7-1
347     - Rebase to 3.0.7
348    
349     * Tue Sep 04 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-2
350     - Fix parallel installability of x86_64 and i686 devel package
351    
352     * Fri Aug 03 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-1
353     - Rebase to 3.0.6
354    
355     * Tue Jul 17 2018 Honza Horak <hhorak@redhat.com> - 3.0.5-3
356     - Add -config sub-package that delivers system-wide /etc/my.cnf and
357     /etc/my.cnf.d directory, that other packages should use
358     This package also obsoletes mariadb-config
359    
360     * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-2
361     - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
362    
363     * Fri Jun 08 2018 Michal Schorm <mschorm@redhat.com> - 3.0.5-1
364     - Rebase to 3.0.5
365    
366     * Thu Apr 26 2018 Michal Schorm <mschorm@redhat.com> - 3.0.4-1
367     - Rebase to 3.0.4
368    
369     * Mon Apr 23 2018 Michal Schorm <mschorm@redhat.com> - 3.0.3-4
370     - Further fix of the '--plugindir' output from the config binary
371     Realted: #1569159
372    
373     * Wed Mar 21 2018 Richard W.M. Jones <rjones@redhat.com> - 3.0.3-3
374     - Fix plugin install directory (INSTALL_PLUGINDIR not PLUGIN_INSTALL_DIR).
375    
376     * Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-2
377     - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
378    
379     * Fri Jan 19 2018 Michal Schorm <mschorm@redhat.com> - 3.0.3-1
380     - Rebase to 3.0.3
381    
382     * Mon Nov 27 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-21
383     - Remove unneeded dependency on xmlto
384    
385     * Tue Nov 14 2017 Pavel Raiskup <praiskup@redhat.com> - 3.0.2-19
386     - drop misleading provides
387    
388     * Wed Nov 08 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-19
389     - Move the scriptlet to the correct package
390    
391     * Thu Nov 02 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-18
392     - Fix typo in require
393    
394     * Wed Nov 01 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-17
395     - Use correct require for OpenSSL
396    
397     * Wed Nov 01 2017 Merlin Mathesius <mmathesi@redhat.com> - 3.0.2-16
398     - Correct typo in spec file conditional
399    
400     * Tue Oct 31 2017 Merlin Mathesius <mmathesi@redhat.com> - 3.0.2-15
401     - Cleanup spec file conditionals
402    
403     * Tue Oct 31 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-14
404     - Remove Requires for openssl. Managed by RPM.
405    
406     * Mon Oct 30 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-13
407     - Update scriplet dealing with symlinks as Guidelines suggests
408     Related: #1501933
409    
410     * Thu Oct 26 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-12
411     - Move library directly to libdir, don't create any symlinks to directories
412     - Update scritplets, so they only check for old symlinks to directories
413     Related: #1501933
414     - Add 'Conflicts' with mariadb package on F<28
415     Related: #1506441
416    
417     * Mon Oct 09 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-11
418     - Fix ldconfig path
419    
420     * Wed Oct 04 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-10
421     - Add scriptlets to handle errors in /usr/lib64/ created by older versions
422     of mariadb and mariadb-connector-c pakages
423    
424     * Wed Sep 20 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-9
425     - Add symlinks so more packages will build succesfully
426     - Change libdir from .../lib64/mariadb to mysql
427     Related: #1497234
428    
429     * Wed Sep 13 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-7
430     - Move header files to the same location, as they would be in mariadb-server
431     - Add provides "libmysqlclient.so"
432    
433     * Tue Sep 05 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-5
434     - Remove a symlink /usr/lib64/mysql that conflicts with mariadb-libs
435    
436     * Mon Aug 14 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-4
437     - Add compatibility symlinks
438    
439     * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-3
440     - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
441    
442     * Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
443     - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
444    
445     * Wed Jun 07 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-1
446     - Rebase to version 3.0.2
447     - Library libmariadb.so.3 introduced
448     - Plugin Remote-IO enabled
449    
450     * Wed Jun 07 2017 Michal Schorm <mschorm@redhat.com> - 2.3.3-1
451     - Rebase to version 2.3.3
452     - Patch dropped, solved by upstream; https://jira.mariadb.org/browse/CONC-231
453    
454     * Tue Feb 07 2017 Michal Schorm <mschorm@redhat.com> - 2.3.2-2
455     - Fix based on output from RPMLint in previous version
456    
457     * Tue Jan 24 2017 Michal Schorm <mschorm@redhat.com> - 2.3.2-1
458     - Rebase to version 2.3.2, patch needed (fixed by upstream in later versions)
459     - Plugin dir moved from /libdir/plugin to /libdir/mariadb/plugin
460    
461     * Thu Oct 27 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-3
462     - Fixed ownership of {_libdir}/mariadb (this dir must me owned by package)
463     - Fixed ownership of {_sysconfigdir}/ld.so.conf.d (this dir must me owned by package)
464     - Fixed redundnace on lines with {_sysconfigdir}/ld.so.conf.d
465     - Fixed ownership of {_bindir} (only one program is owned, so let's be accurate)
466     - Some comments added, for me and future maintainers
467    
468     * Mon Oct 17 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-2
469     - Fixed ownership of {_libdir}/mariadb directory and cosmetic specfile changes
470    
471     * Tue Sep 13 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-1
472     - Rebase to version 2.3.1
473    
474     * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
475     - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
476    
477     * Thu Jul 23 2015 Matej Mužila <mmuzila@redhat.com> - 2.1.0-1
478     - Rebase to version 2.1.0
479    
480     * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-3
481     - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
482    
483     * Wed Sep 24 2014 Matej Mužila <mmuzila@redhat.com> - 2.0.0-2
484     - Fixed html IDs in documentation
485    
486     * Tue Aug 26 2014 Matej Mužila <mmuzila@redhat.com> - 2.0.0-2
487     - Initial version for 2.0.0

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