libmariadb-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. Name: libmariadb
  2. Version: 3.0.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.org/interstitial/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. %ifarch x86_64
  79. mv -f %{buildroot}%{_prefix}/lib/pkgconfig %{buildroot}%{_libdir}/
  80. %endif
  81. sed -e 's/libmariadb/libmysqlclient/' < %{buildroot}%{_libdir}/pkgconfig/libmariadb.pc > %{buildroot}%{_libdir}/pkgconfig/libmysqlclient.pc
  82. # Remove static linked libraries and symlinks to them
  83. rm %{buildroot}%{_libdir}/lib*.a
  84. # Add a compatibility symlinks
  85. ln -s mariadb_config %{buildroot}%{_bindir}/mysql_config
  86. ln -s mariadb_version.h %{buildroot}%{_includedir}/mysql/mysql_version.h
  87. # Install config files
  88. install -D -p -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/my.cnf
  89. install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/my.cnf.d/client.cnf
  90. %check
  91. # Check the generated configuration on the actual machine
  92. %{buildroot}%{_bindir}/mariadb_config
  93. # Run the unit tests
  94. # - don't run mytap tests
  95. # - ignore the testsuite result for now. Enable tests now, fix them later.
  96. pushd unittest/libmariadb/
  97. ctest || :
  98. popd
  99. # https://fedoraproject.org/wiki/Packaging:Directory_Replacement
  100. %pretrans -p <lua>
  101. path = "%{_libdir}/mariadb"
  102. st = posix.stat(path)
  103. if st and st.type == "link" then
  104. os.remove(path)
  105. end
  106. path = "%{_libdir}/mysql"
  107. st = posix.stat(path)
  108. if st and st.type == "link" then
  109. os.remove(path)
  110. end
  111. %files
  112. %{_libdir}/libmariadb.so.*
  113. %dir %{_libdir}/mariadb
  114. %dir %{_libdir}/mariadb/plugin
  115. %{_libdir}/mariadb/plugin/*
  116. %doc README
  117. %license COPYING.LIB
  118. %files devel
  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. %license COPYING.LIB
  133. %files -n mariadb-common
  134. %dir %{_sysconfdir}/my.cnf.d
  135. %config(noreplace) %{_sysconfdir}/my.cnf
  136. %config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf
  137. # RPMLint issues from 2.3.2 release tracked on the upstream JIRA:
  138. # https://jira.mariadb.org/browse/CONC-232
  139. # https://jira.mariadb.org/browse/CONC-234
  140. # RPMLint issues from 3.0.2 release tracked on the upstream JIRA:
  141. # https://jira.mariadb.org/browse/CONC-287
  142. # https://jira.mariadb.org/browse/CONC-291
  143. %changelog
  144. * Tue Nov 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.0.7-1
  145. - new upstream release.
  146. - dropped Patch0: fixed in upstream.
  147. * Mon Nov 05 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 3.0.6-3
  148. - initial built for Vine Linux.
  149. * Tue Sep 04 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-2
  150. - Fix parallel installability of x86_64 and i686 devel package
  151. * Fri Aug 03 2018 Michal Schorm <mschorm@redhat.com> - 3.0.6-1
  152. - Rebase to 3.0.6
  153. * Tue Jul 17 2018 Honza Horak <hhorak@redhat.com> - 3.0.5-3
  154. - Add -config sub-package that delivers system-wide /etc/my.cnf and
  155. /etc/my.cnf.d directory, that other packages should use
  156. This package also obsoletes mariadb-config
  157. * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.5-2
  158. - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
  159. * Fri Jun 08 2018 Michal Schorm <mschorm@redhat.com> - 3.0.5-1
  160. - Rebase to 3.0.5
  161. * Thu Apr 26 2018 Michal Schorm <mschorm@redhat.com> - 3.0.4-1
  162. - Rebase to 3.0.4
  163. * Mon Apr 23 2018 Michal Schorm <mschorm@redhat.com> - 3.0.3-4
  164. - Further fix of the '--plugindir' output from the config binary
  165. Realted: #1569159
  166. * Wed Mar 21 2018 Richard W.M. Jones <rjones@redhat.com> - 3.0.3-3
  167. - Fix plugin install directory (INSTALL_PLUGINDIR not PLUGIN_INSTALL_DIR).
  168. * Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-2
  169. - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
  170. * Fri Jan 19 2018 Michal Schorm <mschorm@redhat.com> - 3.0.3-1
  171. - Rebase to 3.0.3
  172. * Mon Nov 27 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-21
  173. - Remove unneeded dependency on xmlto
  174. * Tue Nov 14 2017 Pavel Raiskup <praiskup@redhat.com> - 3.0.2-19
  175. - drop misleading provides
  176. * Wed Nov 08 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-19
  177. - Move the scriptlet to the correct package
  178. * Thu Nov 02 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-18
  179. - Fix typo in require
  180. * Wed Nov 01 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-17
  181. - Use correct require for OpenSSL
  182. * Wed Nov 01 2017 Merlin Mathesius <mmathesi@redhat.com> - 3.0.2-16
  183. - Correct typo in spec file conditional
  184. * Tue Oct 31 2017 Merlin Mathesius <mmathesi@redhat.com> - 3.0.2-15
  185. - Cleanup spec file conditionals
  186. * Tue Oct 31 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-14
  187. - Remove Requires for openssl. Managed by RPM.
  188. * Mon Oct 30 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-13
  189. - Update scriplet dealing with symlinks as Guidelines suggests
  190. Related: #1501933
  191. * Thu Oct 26 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-12
  192. - Move library directly to libdir, don't create any symlinks to directories
  193. - Update scritplets, so they only check for old symlinks to directories
  194. Related: #1501933
  195. - Add 'Conflicts' with mariadb package on F<28
  196. Related: #1506441
  197. * Mon Oct 09 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-11
  198. - Fix ldconfig path
  199. * Wed Oct 04 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-10
  200. - Add scriptlets to handle errors in /usr/lib64/ created by older versions
  201. of mariadb and mariadb-connector-c pakages
  202. * Wed Sep 20 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-9
  203. - Add symlinks so more packages will build succesfully
  204. - Change libdir from .../lib64/mariadb to mysql
  205. Related: #1497234
  206. * Wed Sep 13 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-7
  207. - Move header files to the same location, as they would be in mariadb-server
  208. - Add provides "libmysqlclient.so"
  209. * Tue Sep 05 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-5
  210. - Remove a symlink /usr/lib64/mysql that conflicts with mariadb-libs
  211. * Mon Aug 14 2017 Honza Horak <hhorak@redhat.com> - 3.0.2-4
  212. - Add compatibility symlinks
  213. * Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-3
  214. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
  215. * Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
  216. - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
  217. * Wed Jun 07 2017 Michal Schorm <mschorm@redhat.com> - 3.0.2-1
  218. - Rebase to version 3.0.2
  219. - Library libmariadb.so.3 introduced
  220. - Plugin Remote-IO enabled
  221. * Wed Jun 07 2017 Michal Schorm <mschorm@redhat.com> - 2.3.3-1
  222. - Rebase to version 2.3.3
  223. - Patch dropped, solved by upstream; https://jira.mariadb.org/browse/CONC-231
  224. * Tue Feb 07 2017 Michal Schorm <mschorm@redhat.com> - 2.3.2-2
  225. - Fix based on output from RPMLint in previous version
  226. * Tue Jan 24 2017 Michal Schorm <mschorm@redhat.com> - 2.3.2-1
  227. - Rebase to version 2.3.2, patch needed (fixed by upstream in later versions)
  228. - Plugin dir moved from /libdir/plugin to /libdir/mariadb/plugin
  229. * Thu Oct 27 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-3
  230. - Fixed ownership of {_libdir}/mariadb (this dir must me owned by package)
  231. - Fixed ownership of {_sysconfigdir}/ld.so.conf.d (this dir must me owned by package)
  232. - Fixed redundnace on lines with {_sysconfigdir}/ld.so.conf.d
  233. - Fixed ownership of {_bindir} (only one program is owned, so let's be accurate)
  234. - Some comments added, for me and future maintainers
  235. * Mon Oct 17 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-2
  236. - Fixed ownership of {_libdir}/mariadb directory and cosmetic specfile changes
  237. * Tue Sep 13 2016 Michal Schorm <mschorm@redhat.com> - 2.3.1-1
  238. - Rebase to version 2.3.1
  239. * Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
  240. - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
  241. * Thu Jul 23 2015 Matej Mužila <mmuzila@redhat.com> - 2.1.0-1
  242. - Rebase to version 2.1.0
  243. * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-3
  244. - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
  245. * Wed Sep 24 2014 Matej Mužila <mmuzila@redhat.com> - 2.0.0-2
  246. - Fixed html IDs in documentation
  247. * Tue Aug 26 2014 Matej Mužila <mmuzila@redhat.com> - 2.0.0-2
  248. - Initial version for 2.0.0