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