1 Star 0 Fork 3

xurr2020/boostkit-mysql

forked from src-oepkgs/boostkit-mysql 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
mysql.spec 3.91 KB
一键复制 编辑 原始数据 按行查看 历史
maxiaoqi2020 提交于 2023-03-01 17:48 . create boostkit mysql rpm package
name: boostKit-mysql
Version: 8.0.25
Release: 1
License: GPLv2
URL: http://www.mysql.com
Group: applications/database
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Source0: mysql-boost-8.0.25.tar.gz
Source1: my.cnf
Patch0001: KunpengBoostKit22.0.RC4-CODE-THREADPOOL-FOR-MySQL-8.0.25.patch
%if 0%{?rhel} >= 8
BuildRequires: cmake >= 3.6.1
BuildRequires: libtirpc-devel
BuildRequires: rpcgen
%else
BuildRequires: cmake3 >= 3.6.1
%endif
BuildRequires: bison >= 2.1
BuildRequires: perl
BuildRequires: gcc-c++ libtirpc-devel rpcgen
%{?el7:BuildRequires: perl(Env)}
%{?el8:BuildRequires: perl(Env)}
BuildRequires: perl(Carp)
BuildRequires: perl(Config)
BuildRequires: perl(Cwd)
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(English)
BuildRequires: perl(Errno)
BuildRequires: perl(Exporter)
BuildRequires: perl(Fcntl)
BuildRequires: perl(File::Basename)
BuildRequires: perl(File::Copy)
BuildRequires: perl(File::Find)
BuildRequires: perl(File::Path)
BuildRequires: perl(File::Spec)
BuildRequires: perl(File::Spec::Functions)
BuildRequires: perl(File::Temp)
BuildRequires: perl(Getopt::Long)
BuildRequires: perl(IO::File)
BuildRequires: perl(IO::Handle)
BuildRequires: perl(IO::Pipe)
BuildRequires: perl(IO::Select)
BuildRequires: perl(IO::Socket)
BuildRequires: perl(IO::Socket::INET)
BuildRequires: perl(JSON)
BuildRequires: perl(Memoize)
BuildRequires: perl(POSIX)
BuildRequires: perl(Sys::Hostname)
BuildRequires: perl(Time::HiRes)
BuildRequires: perl(Time::localtime)
BuildRequires: time
BuildRequires: libaio-devel
BuildRequires: ncurses-devel
BuildRequires: numactl-devel
BuildRequires: openssl-devel
BuildRequires: zlib-devel
BuildRequires: cyrus-sasl-devel
BuildRequires: openldap-devel
Requires: perl(Carp)
Requires: perl(Config)
Requires: perl(Cwd)
Requires: perl(Data::Dumper)
Requires: perl(English)
Requires: perl(Errno)
Requires: perl(Exporter)
Requires: perl(Fcntl)
Requires: perl(File::Basename)
Requires: perl(File::Copy)
Requires: perl(File::Find)
Requires: perl(File::Path)
Requires: perl(File::Spec)
Requires: perl(File::Spec::Functions)
Requires: perl(File::Temp)
Requires: perl(Getopt::Long)
Requires: perl(IO::File)
Requires: perl(IO::Handle)
Requires: perl(IO::Pipe)
Requires: perl(IO::Select)
Requires: perl(IO::Socket)
Requires: perl(IO::Socket::INET)
Requires: perl(JSON)
Requires: perl(Memoize)
Requires: perl(POSIX)
Requires: perl(Sys::Hostname)
Requires: perl(Time::HiRes)
Requires: perl(Time::localtime)
Summary: A very fast and reliable SQL database server
%description
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
and robust SQL (Structured Query Language) databae server.
%define mysql_server_path /usr/local/mysql
%define mysql_conf_path /etc
%define MYSQL_USER mysql
%define MYSQL_GROUP mysql
%prep
%setup -q -n mysql-%{version}
%autopatch -p1
%build
cmake . -DCMAKE_INSTALL_PREFIX=%{mysql_server_path} -DDOWNLOAD_BOOST=0 -DWITH_BOOST=./boost -DFORCE_INSOURCE_BUILD=1
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
mkdir -p %{buildroot}%{mysql_conf_path}
cp %{_sourcedir}/my.cnf $RPM_BUILD_ROOT%{mysql_conf_path}/
%clean
rm -rf \$RPM_BUILD_ROOT
rm -rf \$RPM_BUILD_DIR/*
%files
%defattr(-, %{MYSQL_USER}, %{MYSQL_GROUP})
%attr(755, %{MYSQL_USER}, %{MYSQL_GROUP}) %{mysql_server_path}/*
%attr(755, %{MYSQL_USER}, %{MYSQL_GROUP}) %{mysql_conf_path}/my.cnf
%dir %{mysql_server_path}/
%{mysql_server_path}/
%{mysql_conf_path}/my.cnf
%pre
if ! id %{MYSQL_USER} > /dev/null 2>&1;then
useradd -M -s /sbin/nologin %{MYSQL_USER}
fi
if [ -f %{_sysconfdir}/my.cnf ];then
mv %{_sysconfdir}/my.cnf %{_sysconfdir}/my.cnf.rpmold
fi
%preun
if [ -f %{_initddir}/mysql ];then
mv %{_initddir}/mysql %{_initddir}/mysql.rpmold
fi
%postun
rm -rf %{prefix}
userdel -r %{MYSQL_USER} >/dev/null 2>&1
%changelog
* Wed Mar 1 2023 caiyuanhuan <caiyuanhuan@huawei.com> - 1.0.0.0
- First script for KunpengBoostKit-MySQL package
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xurr2020/boostkit-mysql.git
git@gitee.com:xurr2020/boostkit-mysql.git
xurr2020
boostkit-mysql
boostkit-mysql
master

搜索帮助