Author: glen                         Date: Tue Feb 15 22:51:18 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- merge from AC-branch: bconds, CXXFLAGS optimize

---- Files affected:
SPECS:
   mysql.spec (1.254 -> 1.255) 

---- Diffs:

================================================================
Index: SPECS/mysql.spec
diff -u SPECS/mysql.spec:1.254 SPECS/mysql.spec:1.255
--- SPECS/mysql.spec:1.254      Tue Feb 15 19:48:06 2005
+++ SPECS/mysql.spec    Tue Feb 15 23:51:12 2005
@@ -3,9 +3,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
@@ -18,7 +24,7 @@
 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
@@ -51,9 +57,9 @@
 %{?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
@@ -252,7 +258,7 @@
 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
@@ -396,7 +402,7 @@
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
+%{?with_tcpd:%patch1 -p1}
 %patch2 -p1
 %patch3 -p1
 %ifarch alpha
@@ -416,7 +422,8 @@
 %{__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' \
@@ -427,18 +434,20 @@
        --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 \
@@ -480,11 +489,25 @@
 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
@@ -764,6 +787,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.255  2005/02/15 22:51:12  glen
+- merge from AC-branch: bconds, CXXFLAGS optimize
+
 Revision 1.254  2005/02/15 18:48:06  qboosh
 - cosmetic
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/mysql.spec?r1=1.254&r2=1.255&f=u


_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to