libmariadb-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. Name: libmariadb
  2. Version: 3.1.3
  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 Aug 30 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.1.3-1
  142. - new upstream release.
  143. * Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.0.7-1
  144. - new upstream release.
  145. - dropped Patch0: fixed in upstream.
  146. * Mon Nov 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.0.6-3
  147. - initial built for Vine Linux.
  148. * Tue Sep 04 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-2
  149. - Fix parallel installability of x86_64 and i686 devel package
  150. * Fri Aug 03 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-1
  151. - Rebase to 3.0.6
  152. * Tue Jul 17 2018 Honza Horak <hhorak@redhat.com> - 3.0.5-3
  153. - Add -config sub-package that delivers system-wide /etc/my.cnf and
  154. /etc/my.cnf.d directory, that other packages should use
  155. This package also obsoletes mariadb-config
  156. * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-2
  157. - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
  158. * Fri Jun 08 2018 Michal Schorm <mschorm@redhat.com> - 3.0.5-1
  159. - Rebase to 3.0.5
  160. * Thu Apr 26 2018 Michal Schorm <mschorm@redhat.com> - 3.0.4-1
  161. - Rebase to 3.0.4
  162. * Mon Apr 23 2018 Michal Schorm <mschorm@redhat.com> - 3.0.3-4
  163. - Further fix of the '--plugindir' output from the config binary
  164. Realted: #1569159
  165. * Wed Mar 21 2018 Richard W.M. Jones <rjones@redhat.com> - 3.0.3-3
  166. - Fix plugin install directory (INSTALL_PLUGINDIR not PLUGIN_INSTALL_DIR).
  167. * Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-2
  168. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  169. * Fri Jan 19 2018 Michal Schorm <mschorm@redhat.com> - 3.0.3-1
  170. - Rebase to 3.0.3
  171. * Mon Nov 27 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-21
  172. - Remove unneeded dependency on xmlto
  173. * Tue Nov 14 2017 Pavel Raiskup <praiskup@redhat.com> - 3.0.2-19
  174. - drop misleading provides
  175. * Wed Nov 08 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-19
  176. - Move the scriptlet to the correct package
  177. * Thu Nov 02 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-18
  178. - Fix typo in require
  179. * Wed Nov 01 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-17
  180. - Use correct require for OpenSSL
  181. * Wed Nov 01 2017 Merlin Mathesius <mmathesi@redhat.com> - 3.0.2-16
  182. - Correct typo in spec file conditional
  183. * Tue Oct 31 2017 Merlin Mathesius <mmathesi@redhat.com> - 3.0.2-15
  184. - Cleanup spec file conditionals
  185. * Tue Oct 31 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-14
  186. - Remove Requires for openssl. Managed by RPM.
  187. * Mon Oct 30 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-13
  188. - Update scriplet dealing with symlinks as Guidelines suggests
  189. Related: #1501933
  190. * Thu Oct 26 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-12
  191. - Move library directly to libdir, don't create any symlinks to directories
  192. - Update scritplets, so they only check for old symlinks to directories
  193. Related: #1501933
  194. - Add 'Conflicts' with mariadb package on F<28
  195. Related: #1506441
  196. * Mon Oct 09 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-11
  197. - Fix ldconfig path
  198. * Wed Oct 04 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-10
  199. - Add scriptlets to handle errors in /usr/lib64/ created by older versions
  200. of mariadb and mariadb-connector-c pakages
  201. * Wed Sep 20 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-9
  202. - Add symlinks so more packages will build succesfully
  203. - Change libdir from .../lib64/mariadb to mysql
  204. Related: #1497234
  205. * Wed Sep 13 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-7
  206. - Move header files to the same location, as they would be in mariadb-server
  207. - Add provides "libmysqlclient.so"
  208. * Tue Sep 05 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-5
  209. - Remove a symlink /usr/lib64/mysql that conflicts with mariadb-libs
  210. * Mon Aug 14 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-4
  211. - Add compatibility symlinks
  212. * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-3
  213. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
  214. * Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
  215. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  216. * Wed Jun 07 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-1
  217. - Rebase to version 3.0.2
  218. - Library libmariadb.so.3 introduced
  219. - Plugin Remote-IO enabled
  220. * Wed Jun 07 2017 Michal Schorm <mschorm@redhat.com> - 2.3.3-1
  221. - Rebase to version 2.3.3
  222. - Patch dropped, solved by upstream; https://jira.mariadb.org/browse/CONC-231
  223. * Tue Feb 07 2017 Michal Schorm <mschorm@redhat.com> - 2.3.2-2
  224. - Fix based on output from RPMLint in previous version
  225. * Tue Jan 24 2017 Michal Schorm <mschorm@redhat.com> - 2.3.2-1
  226. - Rebase to version 2.3.2, patch needed (fixed by upstream in later versions)
  227. - Plugin dir moved from /libdir/plugin to /libdir/mariadb/plugin
  228. * Thu Oct 27 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-3
  229. - Fixed ownership of {_libdir}/mariadb (this dir must me owned by package)
  230. - Fixed ownership of {_sysconfigdir}/ld.so.conf.d (this dir must me owned by package)
  231. - Fixed redundnace on lines with {_sysconfigdir}/ld.so.conf.d
  232. - Fixed ownership of {_bindir} (only one program is owned, so let's be accurate)
  233. - Some comments added, for me and future maintainers
  234. * Mon Oct 17 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-2
  235. - Fixed ownership of {_libdir}/mariadb directory and cosmetic specfile changes
  236. * Tue Sep 13 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-1
  237. - Rebase to version 2.3.1
  238. * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
  239. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  240. * Thu Jul 23 2015 Matej Mužila <mmuzila@redhat.com> - 2.1.0-1
  241. - Rebase to version 2.1.0
  242. * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-3
  243. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  244. * Wed Sep 24 2014 Matej Mužila <mmuzila@redhat.com> - 2.0.0-2
  245. - Fixed html IDs in documentation
  246. * Tue Aug 26 2014 Matej Mužila <mmuzila@redhat.com> - 2.0.0-2
  247. - Initial version for 2.0.0