libmariadb-vl.spec 11 KB

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