mysql_spec rpmbuild

# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not, write to the
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston
# MA  02110-1301  USA.

##############################################################################
# Some common macro definitions
##############################################################################

# NOTE: "vendor" is used in upgrade/downgrade check, so you can't
# change these, has to be exactly as is.
%define mysql_old_vendor    MySQL AB               #vendor 供应商
%define mysql_vendor_2        Sun Microsystems, Inc.
%define mysql_vendor        Oracle and/or its affiliates

%define mysql_version 5.1.60                  #定义版本  后面需要查找 mysql.ysql_version.tat.gz

%define mysqld_user    mysql
%define mysqld_group   mysql
%define mysqldatadir   /var/lib/mysql          #数据库存储位置
%define see_base For a description of MySQL see the base MySQL RPM or http://www.mysql.com

# ------------------------------------------------------------------------------
# On SuSE 9 no separate "debuginfo" package is built. To enable basic
# debugging on that platform, we don't strip binaries on SuSE 9. We
# disable the strip of binaries by redefining the RPM macro
# "__os_install_post" leaving out the script calls that normally does
# this. We do this in all cases, as on platforms where "debuginfo" is
# created, a script "find-debuginfo.sh" will be called that will do
# the strip anyway, part of separating the executable and debug
# information into separate files put into separate packages.
#
# Some references (shows more advanced conditional usage):
# http://www.redhat.com/archives/rpm-list/2001-November/msg00257.html
# http://www.redhat.com/archives/rpm-list/2003-February/msg00275.html
# http://www.redhat.com/archives/rhl-devel-list/2004-January/msg01546.html
# http://lists.opensuse.org/archive/opensuse-commit/2006-May/1171.html
# ------------------------------------------------------------------------------
%define __os_install_post /usr/lib/rpm/brp-compress   #调试

# ------------------------------------------------------------------------------
# We don't package all files installed into the build root by intention -      #没有把所有的文件打包
# See BUG#998 for details.
# ------------------------------------------------------------------------------
%define _unpackaged_files_terminate_build 0

# ------------------------------------------------------------------------------
# RPM build tools now automatically detects Perl module dependencies.   #自动检测perl模块依赖关系
# This detection gives problems as it is broken in some versions, and it also  #这种检测  
# give unwanted dependencies from mandatory scripts in our package.     #强制脚本
# Might not be possible to disable in all RPM tool versions, but here we    
# try. We keep the "AutoReqProv: no" for the "test" sub package, as disabling   
# here might fail, and that package has the most problems.  #可能会失败
# See http://fedoraproject.org/wiki/Packaging/Perl#Filtering_Requires:_and_Provides
#     http://www.wideopen.com/archives/rpm-list/2002-October/msg00343.html
# ------------------------------------------------------------------------------ 
%undefine __perl_provides             
%undefine __perl_requires

##############################################################################
# Command line handling   #命令行处理
##############################################################################

# ----------------------------------------------------------------------
# use "rpmbuild --with yassl" or "rpm --define '_with_yassl 1'" (for RPM 3.x)
# to build with yaSSL support (off by default)
# ----------------------------------------------------------------------
%{?_with_yassl:%define YASSL_BUILD 1}
%{!?_with_yassl:%define YASSL_BUILD 0}

# ----------------------------------------------------------------------
# use "rpmbuild --without bundled_zlib" or "rpm --define '_without_bundled_zlib 1'"
# (for RPM 3.x) to not build using the bundled zlib (on by default)
# ----------------------------------------------------------------------
%{!?_with_bundled_zlib: %{!?_without_bundled_zlib: %define WITH_BUNDLED_ZLIB 1}}
%{?_with_bundled_zlib:%define WITH_BUNDLED_ZLIB 1}
%{?_without_bundled_zlib:%define WITH_BUNDLED_ZLIB 0}

# ----------------------------------------------------------------------
# use "rpmbuild --without innodb_plugin" or "rpm --define '_without_innodb_plugin 1'"
# (for RPM 3.x) to not build the innodb plugin (on by default with innodb builds)
# ----------------------------------------------------------------------
%{!?_with_innodb_plugin: %{!?_without_innodb_plugin: %define WITH_INNODB_PLUGIN 1}}
%{?_with_innodb_plugin:%define WITH_INNODB_PLUGIN 1}
%{?_without_innodb_plugin:%define WITH_INNODB_PLUGIN 0}

# ----------------------------------------------------------------------
# use "rpmbuild --with cluster" or "rpm --define '_with_cluster 1'" (for RPM 3.x)
# to build with cluster support (off by default)
# ----------------------------------------------------------------------
%{?_with_cluster:%define CLUSTER_BUILD 1}
%{!?_with_cluster:%define CLUSTER_BUILD 0}

##############################################################################
# Product definitions - set for a "community" package   #产品定义   一个社区的包
##############################################################################

%define server_suffix  -community
%define package_suffix -community
%define ndbug_comment MySQL Community Server (GPL)
%define debug_comment MySQL Community Server - Debug (GPL)
%define commercial 0
%define EMBEDDED_BUILD 1
%define PARTITION_BUILD 1
# Default for CLUSTER_BUILD is "0", but command line option may override it
%define COMMUNITY_BUILD 1
%define INNODB_BUILD 1
%define NORMAL_TEST_MODE test-bt
%define DEBUG_TEST_MODE test-bt-debug

%define release 1.glibc23

%define mysql_license GPL
%define src_dir mysql-%{mysql_version}

##############################################################################
# Main spec file section   #主要spec文件标签
##############################################################################

Name:        MySQL-eol
Summary:    MySQL: a very fast and reliable SQL database server
Group:        Applications/Databases
Version:    @MYSQL_U_SCORE_VERSION@
Release:    %{release}
License:    Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Under %{mysql_license} license as shown in the Description field.
Source:        http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/%{src_dir}.tar.gz
URL:        http://www.mysql.com/
Packager:    %{mysql_vendor} Product Engineering Team <build@mysql.com>
Vendor:        %{mysql_vendor}
Provides:    msqlormysql MySQL-server mysql
BuildRequires: ncurses-devel
Obsoletes:    mysql

# Think about what you use here since the first step is to
# run a rm -rf
BuildRoot:    %{_tmppath}/%{name}-%{version}-build

# From the manual
%description
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
and robust SQL (Structured Query Language) database server. MySQL Server
is intended for mission-critical, heavy-load production systems as well
as for embedding into mass-deployed software. MySQL is a trademark of
%{mysql_vendor}

Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved.

This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license.

The MySQL web site (http://www.mysql.com/) provides the latest
news and information about the MySQL software. Also please see the
documentation and the manual for more information.

##############################################################################
# Sub package definition   #子包定义
##############################################################################

%package server    #server**
Summary:    MySQL: a very fast and reliable SQL database server
Group:        Applications/Databases
Requires:    coreutils grep procps /usr/sbin/useradd /usr/sbin/groupadd /sbin/chkconfig
Provides:    msqlormysql mysql MySQL mysql-server MySQL-server
Obsoletes:    mysql MySQL mysql-server MySQL-server
Obsoletes:    MySQL-server-classic MySQL-server-community MySQL-server-enterprise
Obsoletes:    MySQL-server-advanced MySQL-server-advanced-gpl MySQL-server-enterprise-gpl

%description server 
The MySQL(TM) software delivers a very fast, multi-threaded, multi-user,
and robust SQL (Structured Query Language) database server. MySQL Server
is intended for mission-critical, heavy-load production systems as well
as for embedding into mass-deployed software. MySQL is a trademark of

%{mysql_vendor}


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值