]> git.pld-linux.org Git - packages/mysql.git/commitdiff
- merge from AC-branch: bconds, CXXFLAGS optimize
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 15 Feb 2005 22:51:12 +0000 (22:51 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mysql.spec -> 1.255

mysql.spec

index 37c7bf3edf79ce572342de58969695d0060d6feb..a32a72eb9ccf1fc6a1d7f63064b06f898abbc8f8 100644 (file)
@@ -2,9 +2,15 @@
 # - trigger that prepares system from pre-cluster into cluster
 # - trigger /etc/mysqld.conf into /etc/mysql/mysqld.conf. Solve possible
 #   conflict with /var/lib/mysql/mysqld.conf
+# - what's the libwrapper constistent bcond name? I see in specs 'libwrap', 'tcpd', 'tcp_wrappers'
 #
 # Conditional build:
 %bcond_with    bdb     # Berkeley DB support
+%bcond_without innodb  # Without InnoDB support
+%bcond_without isam    # Without ISAM table format (used in mysql 3.22)
+%bcond_without raid    # Without raid
+%bcond_without ssl     # Without OpenSSL
+%bcond_without tcpd    # Without libwrap (tcp_wrappers) support
 #
 %include       /usr/lib/rpm/macros.perl
 Summary:       MySQL: a very fast and reliable SQL database engine
@@ -17,7 +23,7 @@ Summary(zh_CN):       MySQL
 Name:          mysql
 Group:         Applications/Databases
 Version:       4.1.10
-Release:       0.1
+Release:       0.2
 License:       GPL + MySQL FLOSS Exception
 Source0:       http://mysql.mirror.anlx.net/Downloads/MySQL-4.1/%{name}-%{version}.tar.gz
 # Source0-md5: 27b27b74f430aaeb77fb8d4e6f32ac4d
@@ -50,9 +56,9 @@ BuildRequires:        automake
 %{?with_bdb:BuildRequires:     db3-devel}
 BuildRequires: libstdc++-devel >= 5:3.0
 BuildRequires: libtool
-BuildRequires: libwrap-devel
+%{?with_tcpd:BuildRequires:    libwrap-devel}
 BuildRequires: ncurses-devel >= 4.2
-BuildRequires: openssl-devel >= 0.9.7d
+%{?with_ssl:BuildRequires:     openssl-devel >= 0.9.7d}
 BuildRequires: perl-DBI
 BuildRequires: perl-devel >= 1:5.6.1
 BuildRequires: readline-devel >= 4.2
@@ -251,7 +257,7 @@ Summary(ru):        MySQL - 
 Summary(uk):   MySQL - ÈÅÄÅÒÉ ÔÁ Â¦Â̦ÏÔÅËÉ ÐÒÏÇÒÁͦÓÔÁ
 Group:         Development/Libraries
 Requires:      %{name}-libs = %{version}-%{release}
-Requires:      openssl-devel
+%{?with_ssl:Requires:  openssl-devel}
 Requires:      zlib-devel
 Obsoletes:     MySQL-devel
 Obsoletes:     libmysql10-devel
@@ -395,7 +401,7 @@ Ten pakiet zawiera standardowego demona MySQL NDB CPC.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
+%{?with_tcpd:%patch1 -p1}
 %patch2 -p1
 %patch3 -p1
 %ifarch alpha
@@ -415,7 +421,8 @@ Ten pakiet zawiera standardowego demona MySQL NDB CPC.
 %{__aclocal}
 %{__automake}
 %{__autoconf}
-CXXFLAGS="%{rpmcflags} -fno-rtti -fno-exceptions %{!?debug:-fomit-frame-pointer}"
+# The compiler flags are as per their "official" spec ;)
+CXXFLAGS="%{rpmcflags} -felide-constructors -fno-rtti -fno-exceptions %{!?debug:-fomit-frame-pointer}"
 CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
 %configure \
        PS='/bin/ps' \
@@ -426,18 +433,20 @@ CFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"
        --enable-shared \
        --enable-static \
        --enable-thread-safe-client \
-       %{?with_bdb:--with-berkeley-db} \
+       --with%{!?with_bdb:out}-berkeley-db \
+       --with%{!?with_innodb:out}-innodb \
+       --with%{!?with_isam:out}-isam \
+       --with%{!?with_raid:out}-raid \
+       --with%{!?with_ssl:out}-openssl \
+       --with%{!?with_tcpd:out}-libwrap \
        --with-comment="PLD Linux Distribution MySQL RPM" \
        --with%{!?debug:out}-debug \
        --with-embedded-server \
        --with-extra-charsets=all \
-       --with-libwrap \
        --with-low-memory \
        --with-mysqld-user=mysql \
        --with-named-curses-libs="-lncurses" \
-       --with-openssl \
        --with-pthread \
-       --with-raid \
        --with-unix-socket-path=/var/lib/mysql/mysql.sock \
        --with-vio \
        --with-ndbcluster \
@@ -479,11 +488,25 @@ install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql
 # This is template for configuration file which is created after 'service mysql init'
-install %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf
+install %{SOURCE4} mysqld.conf
 install %{SOURCE5} $RPM_BUILD_ROOT/etc/mysql/clusters.conf
 install %{SOURCE6} $RPM_BUILD_ROOT/etc/monit
 touch $RPM_BUILD_ROOT/var/log/mysql/{err,log,update,isamlog.log}
 
+# remove innodb directives from mysqld.conf if mysqld is configured without
+%if %{without innodb}
+       cp mysqld.conf mysqld.tmp
+       awk 'BEGIN { RS="\n\n" } !/innodb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
+%endif
+
+# remove berkeley-db directives from mysqld.conf if mysqld is configured without
+%if %{without bdb}
+       cp mysqld.conf mysqld.tmp
+       awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf
+%endif
+
+install mysqld.conf $RPM_BUILD_ROOT%{_datadir}/mysql/mysqld.conf
+
 # NDB
 install %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb
 install %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb
This page took 0.129057 seconds and 4 git commands to generate.