libmariadb-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. Name: libmariadb
  2. Summary: The MariaDB Native Client library (C driver)
  3. Epoch: 1
  4. Version: 3.1.11
  5. Release: 1%{?_dist_release}
  6. Group: system
  7. Vendor: Project Vine
  8. Distribution: Vine Linux
  9. Packager: tomop
  10. License: LGPLv2+
  11. Url: http://mariadb.org/
  12. Source: https://downloads.mariadb.com/Connectors/c/connector-c-%{version}/mariadb-connector-c-%{version}-src.tar.gz
  13. Source2: my.cnf
  14. Source3: client.cnf
  15. # More information: https://mariadb.com/kb/en/mariadb/building-connectorc-from-source/
  16. Requires: mariadb-common
  17. BuildRequires: zlib-devel cmake openssl-devel gcc-c++
  18. # Remote-IO plugin
  19. BuildRequires: curl-devel
  20. %description
  21. The MariaDB Native Client library (C driver) is used to connect applications
  22. developed in C/C++ to MariaDB and MySQL databases.
  23. %package devel
  24. Summary: Development files for mariadb-connector-c
  25. Group: programming
  26. Provides: libmysqlclient-devel = %{epoch}:%{version}-%{release}
  27. Obsoletes: libmysqlclient-devel
  28. Requires: %{name} = %{epoch}:%{version}-%{release}
  29. Requires: openssl-devel
  30. %description devel
  31. Development files for mariadb-connector-c.
  32. Contains everything needed to build against libmariadb.so >=3 client library.
  33. %package -n mariadb-common
  34. Summary: Configuration files for packages that use /etc/my.cnf as a configuration file
  35. Group: system
  36. BuildArch: noarch
  37. %description -n mariadb-common
  38. This package delivers /etc/my.cnf that includes other configuration files
  39. from the /etc/my.cnf.d directory and ships this directory as well.
  40. Other packages should only put their files into /etc/my.cnf.d directory
  41. and require this package, so the /etc/my.cnf file is present.
  42. %debug_package
  43. %prep
  44. %setup -q -n mariadb-connector-c-%{version}-src
  45. # Remove unsused parts
  46. rm -r win zlib win-iconv
  47. %build
  48. # https://jira.mariadb.org/browse/MDEV-13836:
  49. # The server has (used to have for ages) some magic around the port number.
  50. # If it's 0, the default port value will use getservbyname("mysql", "tcp"), that is, whatever is written in /etc/services.
  51. # If it's a positive number, say, 3306, it will be 3306, no matter what /etc/services say.
  52. # I don't know if that behavior makes much sense, /etc/services wasn't supposed to be a system configuration file.
  53. # The INSTALL_xxx macros have to be specified relative to CMAKE_INSTALL_PREFIX
  54. # so we can't use %%{_datadir} and so forth here.
  55. %cmake . \
  56. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  57. -DCMAKE_SYSTEM_PROCESSOR="%{_arch}" \
  58. \
  59. -DMARIADB_UNIX_ADDR=%{_sharedstatedir}/mysql/mysql.sock \
  60. -DMARIADB_PORT=3306 \
  61. \
  62. -DWITH_EXTERNAL_ZLIB=YES \
  63. -DWITH_SSL=OPENSSL \
  64. -DWITH_MYSQLCOMPAT=ON \
  65. \
  66. -DINSTALL_LAYOUT=RPM \
  67. -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
  68. -DINSTALL_BINDIR="bin" \
  69. -DINSTALL_LIBDIR="%{_lib}" \
  70. -DINSTALL_INCLUDEDIR="include/mysql" \
  71. -DINSTALL_PLUGINDIR="%{_lib}/mariadb/plugin" \
  72. \
  73. -DWITH_UNITTEST=ON
  74. #cmake -LAH
  75. make %{?_smp_mflags}
  76. %install
  77. rm -rf %{buildroot}
  78. make install DESTDIR=%{buildroot}
  79. #multilib_fix_c_header --file %{_includedir}/mysql/mariadb_version.h
  80. sed -e 's/libmariadb/libmysqlclient/' < %{buildroot}%{_libdir}/pkgconfig/libmariadb.pc > %{buildroot}%{_libdir}/pkgconfig/libmysqlclient.pc
  81. # Remove static linked libraries and symlinks to them
  82. rm %{buildroot}%{_libdir}/lib*.a
  83. # Add a compatibility symlinks
  84. ln -s mariadb_config %{buildroot}%{_bindir}/mysql_config
  85. ln -s mariadb_version.h %{buildroot}%{_includedir}/mysql/mysql_version.h
  86. # Install config files
  87. install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/my.cnf
  88. install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf
  89. %check
  90. # Check the generated configuration on the actual machine
  91. %{buildroot}%{_bindir}/mariadb_config
  92. # Run the unit tests
  93. # - don't run mytap tests
  94. # - ignore the testsuite result for now. Enable tests now, fix them later.
  95. pushd unittest/libmariadb/
  96. ctest || :
  97. popd
  98. # https://fedoraproject.org/wiki/Packaging:Directory_Replacement
  99. %pretrans -p <lua>
  100. path = "%{_libdir}/mariadb"
  101. st = posix.stat(path)
  102. if st and st.type == "link" then
  103. os.remove(path)
  104. end
  105. path = "%{_libdir}/mysql"
  106. st = posix.stat(path)
  107. if st and st.type == "link" then
  108. os.remove(path)
  109. end
  110. %files
  111. %doc README
  112. %license COPYING.LIB
  113. %{_libdir}/libmariadb.so.*
  114. %dir %{_libdir}/mariadb
  115. %dir %{_libdir}/mariadb/plugin
  116. %{_libdir}/mariadb/plugin/*
  117. %files devel
  118. %license COPYING.LIB
  119. # Binary which provides compiler info for software compiling against this library
  120. %{_bindir}/mariadb_config
  121. %{_bindir}/mysql_config
  122. # Symlinks to the versioned library
  123. %{_libdir}/libmariadb.so
  124. %{_libdir}/libmysqlclient.so
  125. %{_libdir}/libmysqlclient_r.so
  126. # pkgconfig files
  127. %dir %{_libdir}/pkgconfig
  128. %{_libdir}/pkgconfig/*
  129. # Header files
  130. %dir %{_includedir}/mysql
  131. %{_includedir}/mysql/*
  132. %files -n mariadb-common
  133. %dir %{_sysconfdir}/my.cnf.d
  134. %config(noreplace) %{_sysconfdir}/my.cnf
  135. %config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf
  136. # RPMLint issues from 2.3.2 release tracked on the upstream JIRA:
  137. # https://jira.mariadb.org/browse/CONC-232
  138. # https://jira.mariadb.org/browse/CONC-234
  139. # RPMLint issues from 3.0.2 release tracked on the upstream JIRA:
  140. # https://jira.mariadb.org/browse/CONC-287
  141. # https://jira.mariadb.org/browse/CONC-291
  142. %changelog
  143. * Sat Feb 13 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.11-1
  144. - new upstream release.
  145. * Sat May 23 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.8-1
  146. - new upstream release.
  147. * Fri Feb 14 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.7-1
  148. - new upstream release.
  149. * Fri Aug 30 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.3-1
  150. - new upstream release.
  151. * Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.0.7-1
  152. - new upstream release.
  153. - dropped Patch0: fixed in upstream.
  154. * Mon Nov 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.0.6-3
  155. - initial built for Vine Linux.
  156. * Tue Sep 04 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-2
  157. - Fix parallel installability of x86_64 and i686 devel package
  158. * Fri Aug 03 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-1
  159. - Rebase to 3.0.6
  160. * Tue Jul 17 2018 Honza Horak <hhorak@redhat.com> - 3.0.5-3
  161. - Add -config sub-package that delivers system-wide /etc/my.cnf and
  162. /etc/my.cnf.d directory, that other packages should use
  163. This package also obsoletes mariadb-config
  164. * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-2
  165. - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
  166. * Fri Jun 08 2018 Michal Schorm <mschorm@redhat.com> - 3.0.5-1
  167. - Rebase to 3.0.5
  168. * Thu Apr 26 2018 Michal Schorm <mschorm@redhat.com> - 3.0.4-1
  169. - Rebase to 3.0.4
  170. * Mon Apr 23 2018 Michal Schorm <mschorm@redhat.com> - 3.0.3-4
  171. - Further fix of the '--plugindir' output from the config binary
  172. Realted: #1569159
  173. * Wed Mar 21 2018 Richard W.M. Jones <rjones@redhat.com> - 3.0.3-3
  174. - Fix plugin install directory (INSTALL_PLUGINDIR not PLUGIN_INSTALL_DIR).
  175. * Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-2
  176. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  177. * Fri Jan 19 2018 Michal Schorm <mschorm@redhat.com> - 3.0.3-1
  178. - Rebase to 3.0.3
  179. * Mon Nov 27 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-21
  180. - Remove unneeded dependency on xmlto
  181. * Tue Nov 14 2017 Pavel Raiskup <praiskup@redhat.com> - 3.0.2-19
  182. - drop misleading provides
  183. * Wed Nov 08 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-19
  184. - Move the scriptlet to the correct package
  185. * Thu Nov 02 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-18
  186. - Fix typo in require
  187. * Wed Nov 01 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-17
  188. - Use correct require for OpenSSL
  189. * Wed Nov 01 2017 Merlin Mathesius <mmathesi@redhat.com> - 3.0.2-16
  190. - Correct typo in spec file conditional
  191. * Tue Oct 31 2017 Merlin Mathesius <mmathesi@redhat.com> - 3.0.2-15
  192. - Cleanup spec file conditionals
  193. * Tue Oct 31 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-14
  194. - Remove Requires for openssl. Managed by RPM.
  195. * Mon Oct 30 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-13
  196. - Update scriplet dealing with symlinks as Guidelines suggests
  197. Related: #1501933
  198. * Thu Oct 26 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-12
  199. - Move library directly to libdir, don't create any symlinks to directories
  200. - Update scritplets, so they only check for old symlinks to directories
  201. Related: #1501933
  202. - Add 'Conflicts' with mariadb package on F<28
  203. Related: #1506441
  204. * Mon Oct 09 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-11
  205. - Fix ldconfig path
  206. * Wed Oct 04 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-10
  207. - Add scriptlets to handle errors in /usr/lib64/ created by older versions
  208. of mariadb and mariadb-connector-c pakages
  209. * Wed Sep 20 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-9
  210. - Add symlinks so more packages will build succesfully
  211. - Change libdir from .../lib64/mariadb to mysql
  212. Related: #1497234
  213. * Wed Sep 13 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-7
  214. - Move header files to the same location, as they would be in mariadb-server
  215. - Add provides "libmysqlclient.so"
  216. * Tue Sep 05 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-5
  217. - Remove a symlink /usr/lib64/mysql that conflicts with mariadb-libs
  218. * Mon Aug 14 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-4
  219. - Add compatibility symlinks
  220. * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-3
  221. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
  222. * Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
  223. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  224. * Wed Jun 07 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-1
  225. - Rebase to version 3.0.2
  226. - Library libmariadb.so.3 introduced
  227. - Plugin Remote-IO enabled
  228. * Wed Jun 07 2017 Michal Schorm <mschorm@redhat.com> - 2.3.3-1
  229. - Rebase to version 2.3.3
  230. - Patch dropped, solved by upstream; https://jira.mariadb.org/browse/CONC-231
  231. * Tue Feb 07 2017 Michal Schorm <mschorm@redhat.com> - 2.3.2-2
  232. - Fix based on output from RPMLint in previous version
  233. * Tue Jan 24 2017 Michal Schorm <mschorm@redhat.com> - 2.3.2-1
  234. - Rebase to version 2.3.2, patch needed (fixed by upstream in later versions)
  235. - Plugin dir moved from /libdir/plugin to /libdir/mariadb/plugin
  236. * Thu Oct 27 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-3
  237. - Fixed ownership of {_libdir}/mariadb (this dir must me owned by package)
  238. - Fixed ownership of {_sysconfigdir}/ld.so.conf.d (this dir must me owned by package)
  239. - Fixed redundnace on lines with {_sysconfigdir}/ld.so.conf.d
  240. - Fixed ownership of {_bindir} (only one program is owned, so let's be accurate)
  241. - Some comments added, for me and future maintainers
  242. * Mon Oct 17 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-2
  243. - Fixed ownership of {_libdir}/mariadb directory and cosmetic specfile changes
  244. * Tue Sep 13 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-1
  245. - Rebase to version 2.3.1
  246. * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
  247. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  248. * Thu Jul 23 2015 Matej Mužila <mmuzila@redhat.com> - 2.1.0-1
  249. - Rebase to version 2.1.0
  250. * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-3
  251. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  252. * Wed Sep 24 2014 Matej Mužila <mmuzila@redhat.com> - 2.0.0-2
  253. - Fixed html IDs in documentation
  254. * Tue Aug 26 2014 Matej Mužila <mmuzila@redhat.com> - 2.0.0-2
  255. - Initial version for 2.0.0