libmysqlclient-vl.spec 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. Vendor: Project Vine
  2. Distribution: Vine Linux
  3. Packager: tomop
  4. %define soversion 18
  5. Name: libmysqlclient
  6. Summary: libraries and headers of MariaDB.
  7. Version: 10.0.15
  8. Release: 1%{_dist_release}
  9. Group: Applications/Databases
  10. License: GPLv2
  11. URL: http://www.mariadb.org/
  12. Source: mariadb-%{version}.tar.gz
  13. #Patch0: mysql-5.5.15-jp-all.patch
  14. # lib64 patch for vine
  15. #Patch200: pysql-5.1.44-lib64.patch
  16. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  17. BuildRequires: perl, readline-devel, libaio-devel, libevent-devel
  18. BuildRequires: gcc-c++, ncurses-devel, zlib-devel, openssl-devel
  19. BuildRequires: groff, cmake, bison
  20. Requires: fileutils sh-utils
  21. %description
  22. build client libraries and headers of MariaDB.
  23. %package -n mariadb-common
  24. Summary: The configuration file of MariaDB server and clients
  25. Group: Applications/System
  26. %description -n mariadb-common
  27. This package contains the configuration file for MariaDB server and
  28. clients.
  29. %package -n libmysqlclient%{soversion}
  30. Summary: The shared libraries required for MariaDB/MySQL clients
  31. Group: System Environment/Libraries
  32. Requires: mariadb-common
  33. Obsoletes: MySQL-shared < 5.5.0
  34. %description -n libmysqlclient%{soversion}
  35. This package contains the shared libraries which certain languages
  36. and applications need to dynamically load and use MariaDB/MySQL.
  37. %package devel
  38. Summary: libraries and headers for MariaDB/MySQL clients
  39. Group: Development/Libraries
  40. Requires: libmysqlclient%{soversion} = %{version}-%{release}
  41. Requires: openssl-devel, zlib-devel
  42. Provides: MySQL-devel mysql-devel MySQL5-devel
  43. Obsoletes: MySQL-devel mysql-devel MySQL5-devel
  44. Conflicts: mariadb-devel
  45. %description devel
  46. This package contains the development header files and libraries
  47. necessary to develop MariaDB/MySQL client applications.
  48. %prep
  49. %setup -q -n mariadb-%{version}
  50. #%patch0 -p1 -b .jp
  51. %build
  52. # Be strict about variables, bail at earliest opportunity, etc.
  53. set -eu
  54. # Optional package files
  55. touch optional-files-devel
  56. export CFLAGS=${MYSQL_BUILD_CFLAGS:-${CFLAGS:-$RPM_OPT_FLAGS}}
  57. export CXXFLAGS=${MYSQL_BUILD_CXXFLAGS:-${CXXFLAGS:-$RPM_OPT_FLAGS -felide-constructors -fno-exceptions -fno-rtti}}
  58. export LDFLAGS=${MYSQL_BUILD_LDFLAGS:-${LDFLAGS:-}}
  59. export CMAKE=${MYSQL_BUILD_CMAKE:-${CMAKE:-cmake}}
  60. export MAKE_JFLAG=${MYSQL_BUILD_MAKE_JFLAG:-}
  61. # Build full release
  62. mkdir release
  63. (
  64. cd release
  65. # XXX: MYSQL_UNIX_ADDR should be in cmake/* but mysql_version is included before
  66. # XXX: install_layout so we can't just set it based on INSTALL_LAYOUT=RPM
  67. ${CMAKE} ../ \
  68. -DINSTALL_LAYOUT=RPM \
  69. -DCMAKE_BUILD_TYPE=Release \
  70. -DINSTALL_UNIX_ADDRDIR="/var/lib/mysql/mysql.sock" \
  71. -DMANUFACTURER="Vine Linux MariaDB RPM" \
  72. -DWITH_PIC="ON" \
  73. -DWITHOUT_SERVER="yes" \
  74. -DWITH_ZLIB="system" \
  75. -DWITH_LIBEVENT="system" \
  76. -DWITH_LOCALES="yes" \
  77. -DWITH_UNIT_TESTS="no"
  78. # -DWITH_PCRE="system"
  79. echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG
  80. make %{?_smp_mflags}
  81. # make %{?_smp_mflags} -C libmysql
  82. # make %{?_smp_mflags} -C include
  83. )
  84. ##############################################################################
  85. %install
  86. rm -rf %{buildroot}
  87. # Install all binaries
  88. # Install all binaries
  89. (
  90. cd release
  91. make DESTDIR=%{buildroot} install
  92. )
  93. mv -f %{buildroot}%{_datadir}/doc ./
  94. rm -rf %{buildroot}%{_sysconfdir}/{init.d,logrotate.d}
  95. rm -rf %{buildroot}%{_sysconfdir}/my.cnf.d/{mysql-clients.cnf,server.cnf}
  96. rm -rf %{buildroot}%{_datadir}/{man/man8,mysql}
  97. rm -f %{buildroot}%{_libdir}/*.a
  98. find %{buildroot}%{_bindir} -type f | grep -v -e mysql_config | xargs rm -f
  99. find %{buildroot}%{_mandir} -type f | grep -v -e mysql_config | xargs rm -f
  100. ##############################################################################
  101. %post -n libmysqlclient%{soversion}
  102. /sbin/ldconfig
  103. %postun -n libmysqlclient%{soversion}
  104. /sbin/ldconfig
  105. %clean
  106. rm -rf %{buildroot}
  107. %files -n mariadb-common
  108. %defattr(-, root, root)
  109. %config(noreplace) %{_sysconfdir}/my.cnf
  110. %dir %{_sysconfdir}/my.cnf.d
  111. %config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf
  112. %files -n libmysqlclient%{soversion}
  113. %defattr(-, root, root)
  114. %doc doc/*
  115. %{_libdir}/libmysql*.so.*
  116. %files devel
  117. %defattr(-, root, root)
  118. %doc %{_mandir}/man1/mysql_config.1*
  119. %{_bindir}/mysql_config
  120. %{_includedir}/mysql
  121. %{_datadir}/aclocal/mysql.m4
  122. %{_libdir}/*.so
  123. %changelog
  124. * Thu Nov 27 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.15-1
  125. - new upstream release.
  126. * Sat May 31 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.11-1
  127. - new upstream release.
  128. * Sun Apr 13 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.10-2
  129. - fixed Conflicts: and Obsoletes:.
  130. * Mon Mar 31 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.10-1
  131. - new upstream release.
  132. * Mon Mar 24 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.9-1
  133. - new upstream release.
  134. * Tue Feb 11 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.8-1
  135. - new upstream release.
  136. * Tue Dec 03 2013 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 10.0.6-1
  137. - initial build.