~percona-dev/percona-xtradb-cluster/galera-25.2.x

« back to all changes in this revision

Viewing changes to scripts/mysql/rpm.sh

  • Committer: Raghavendra D Prabhu
  • Date: 2013-11-12 17:40:58 UTC
  • mfrom: (95.3.12 2.x)
  • Revision ID: raghavendra.prabhu@percona.com-20131112174058-t48nvve98oquq21f
Merge galera revision upto revno 165

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash
 
1
#!/bin/bash -e
2
2
 
3
3
if test -z "$MYSQL_SRC"
4
4
then
116
116
 
117
117
export MAKE="make -j $(cat /proc/cpuinfo | grep -c ^processor)"
118
118
 
 
119
[ "$MYSQL_VERSION_MAJOR$MYSQL_VERSION_MINOR" -ge "56" ] \
 
120
&& MEMCACHED_OPT="-DWITH_LIBEVENT=system -DWITH_INNODB_MEMCACHED=ON" \
 
121
|| MEMCACHED_OPT=""
 
122
export MEMCACHED_OPT # for RPM build
 
123
 
119
124
if [ $MYSQL_VERSION_MINOR -eq 1 ]
120
125
then
121
126
    ./configure --with-wsrep > /dev/null
126
131
    -DBUILD_CONFIG=mysql_release \
127
132
    -DWITH_WSREP=1 \
128
133
    -DWITH_EXTRA_CHARSETS=all \
129
 
    -DWITH_SSL=yes \ # tries system then bundled
 
134
    -DWITH_SSL=system \
130
135
    -DWITH_ZLIB=system \
 
136
    $MEMCACHED_OPT
131
137
    $MYSQL_SRC \
132
138
    && make -S
133
139
fi
176
182
 
177
183
RPMBUILD()
178
184
{
179
 
[ $MYSQL_VERSION_MINOR -lt 5 ]                             && \
180
 
    WSREP_RPM_OPTIONS=(--with wsrep --with yassl \
181
 
                       --define "optflags $RPM_OPT_FLAGS") || \
182
 
    WSREP_RPM_OPTIONS=(--define='with_wsrep 1' \
183
 
                       --define='distro_specific 1' \
184
 
                       --define='runselftest 0' \
185
 
                       --define='mysql_packager Codership Oy <info@codership.com>')
 
185
    if [ $MYSQL_VERSION_MINOR -lt 5 ]
 
186
    then
 
187
        WSREP_RPM_OPTIONS=(--with wsrep --with yassl \
 
188
                           --define "optflags $RPM_OPT_FLAGS")
 
189
    else
 
190
        WSREP_RPM_OPTIONS=(--define='with_wsrep 1' \
 
191
                           --define='distro_specific 1' \
 
192
                           --define='runselftest 0' \
 
193
                           --define='with_ssl system' \
 
194
                           --define='mysql_packager Codership Oy <info@codership.com>')
 
195
    fi
186
196
 
187
 
$(which rpmbuild) --clean --rmsource --define "_topdir $RPM_BUILD_ROOT" \
188
 
                  "${WSREP_RPM_OPTIONS[@]}" -ba $WSREP_SPEC
 
197
    $(which rpmbuild) --rmsource --define "_topdir $RPM_BUILD_ROOT" \
 
198
                      "${WSREP_RPM_OPTIONS[@]}" -ba $WSREP_SPEC
189
199
}
190
200
 
191
201
pushd "$RPM_BUILD_ROOT"