summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules56
1 files changed, 36 insertions, 20 deletions
diff --git a/debian/rules b/debian/rules
index 7b83bc4b97c..8a10e0e6762 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,11 +18,19 @@ ifeq ("x$(MYSQL_FLAVOR)","x")
endif
ifneq ("x$(MYSQL_FLAVOR)","x")
- MYSQL_BASE_VERSION:=$(MYSQL_FLAVOR)-$(MYSQL_BASE_VERSION)
- MYSQL_PREVIOUS_BASE_VERSION:=$(MYSQL_FLAVOR)-$(MYSQL_PREVIOUS_BASE_VERSION)
+ MYSQL_BRANDED_BASE_VERSION:=$(MYSQL_FLAVOR)-$(MYSQL_BASE_VERSION)
+ MYSQL_BRANDED_PREVIOUS_BASE_VERSION:=$(MYSQL_FLAVOR)-$(MYSQL_PREVIOUS_BASE_VERSION)
+else
+ ifeq ( "$(MYSQL_BRANDED_BASE_VERSION)","@MYSQL_BRANDED_BASE_VERSION@" )
+ MYSQL_BRANDED_BASE_VERSION:=$(MYSQL_BASE_VERSION)
+ MYSQL_BRANDED_PREVIOUS_BASE_VERSION:=$(MYSQL_PREVIOUS_BASE_VERSION)
+ else
+ MYSQL_BRANDED_BASE_VERSION:=$(MYSQL_BRANDED_BASE_VERSION)
+ MYSQL_BRANDED_PREVIOUS_BASE_VERSION:=$(MYSQL_BRANDED_PREVIOUS_BASE_VERSION)
+ endif
endif
-PACKAGE=mysql-$(MYSQL_BASE_VERSION)
+PACKAGE=mysql-$(MYSQL_BRANDED_BASE_VERSION)
PWD=$(shell pwd)
TMP=$(PWD)/debian/tmp/
@@ -65,9 +73,10 @@ endif
control-file:
@echo "## This file is autogenerated you want to edit control.in instead" > debian/control.tmp
sed -e "s/@MYSQL_BASE_VERSION@/$(MYSQL_BASE_VERSION)/g" \
- -e "s/@VER@/$(VER)/g" \
+ -e "s/@MYSQL_BRANDED_BASE_VERSION@/$(MYSQL_BRANDED_BASE_VERSION)/g" \
-e "s/@VERSIONSTRING@/$(VERSIONSTRING)/g" \
-e "s/@MYSQL_PREVIOUS_BASE_VERSION@/$(MYSQL_PREVIOUS_BASE_VERSION)/g" \
+ -e "s/@MYSQL_BRANDED_PREVIOUS_BASE_VERSION@/$(MYSQL_BRANDED_PREVIOUS_BASE_VERSION)/g" \
-e "s/@MYSQL_SOURCE_BASE_VERSION@/$(MYSQL_SOURCE_BASE_VERSION)/g" \
-e "s/@SHARED_LIB_MAJOR_VERSION@/$(SHARED_LIB_MAJOR_VERSION)/g" \
-e "s/@NDB_SHARED_LIB_MAJOR_VERSION@/$(NDB_SHARED_LIB_MAJOR_VERSION)/g" \
@@ -174,18 +183,20 @@ build-stamp: configure
stamp-control:
# We have to prepare the various control files
+ echo "in stamp-control - BASE_VER==$(MYSQL_BASE_VERSION)"
# We have some naming inconsistencies here...
for f in debian/*.in debian/po/POTFILES.in.in ; do \
- f2=`echo $$f | sed "s,BASE,$(MYSQL_BASE_VERSION),g;\
- s,PREV,$(MYSQL_PREVIOUS_BASE_VERSION),g;\
+ f2=`echo $$f | sed "s,BASE,$(MYSQL_BRANDED_BASE_VERSION),g;\
+ s,PREV,$(MYSQL_BRANDED_PREVIOUS_BASE_VERSION),g;\
s,NLIB,$(NDB_SHARED_LIB_MAJOR_VERSION),g;\
s,SLIB,$(SHARED_LIB_MAJOR_VERSION),g;s,\.in$$,,"`; \
if [ $$f2 != debian/control -a $$f2 != debian/Makefile ]; then \
sed -e "s/@MYSQL_BASE_VERSION@/$(MYSQL_BASE_VERSION)/g" \
+ -e "s/@MYSQL_BRANDED_BASE_VERSION@/$(MYSQL_BRANDED_BASE_VERSION)/g" \
-e "s/@VERSIONSTRING@/$(VERSIONSTRING)/g" \
- -e "s/@VER@/$(VER)/g" \
-e "s/@PRIORITY@/$(PRIORITY)/g" \
-e "s/@MYSQL_PREVIOUS_BASE_VERSION@/$(MYSQL_PREVIOUS_BASE_VERSION)/g" \
+ -e "s/@MYSQL_BRANDED_PREVIOUS_BASE_VERSION@/$(MYSQL_BRANDED_PREVIOUS_BASE_VERSION)/g" \
-e "s/@MYSQL_SOURCE_BASE_VERSION@/$(MYSQL_SOURCE_BASE_VERSION)/g" \
-e "s/@SHARED_LIB_MAJOR_VERSION@/$(SHARED_LIB_MAJOR_VERSION)/g" \
-e "s/@NDB_SHARED_LIB_MAJOR_VERSION@/$(NDB_SHARED_LIB_MAJOR_VERSION)/g" \
@@ -194,13 +205,19 @@ stamp-control:
<$$f >$$f2; \
fi; \
done
+ echo "MYSQL_BUILD_OPTS=$(MYSQL_BUILD_OPTS)" >> debian/defs.mk
+ echo "MYSQL_BUILD_CXXFLAGS=$(MYSQL_BUILD_CXXFLAGS)" >> debian/defs.mk
+ echo "MYSQL_BUILD_CFLAGS=$(MYSQL_BUILD_CFLAGS)" >> debian/defs.mk
+ echo "MYSQL_BUILD_CC=$(MYSQL_BUILD_CC)" >> debian/defs.mk
+ echo "MYSQL_BUILD_CXX=$(MYSQL_BUILD_CXX)" >> debian/defs.mk
+
# depending on two files we expect to be in the root
# to protect from accidentally deleting a whole bunch of
# files somewhere else.
clean: configure.in Makefile.am control-file
- rm -f debian/mysql-server-$(MYSQL_BASE_VERSION).mysql.init
+ rm -f debian/mysql-server-$(MYSQL_BRANDED_BASE_VERSION).mysql.init
# We depend on this later, and delete the results in the mean time
$(MAKE) -f debian/rules stamp-control
@@ -218,11 +235,10 @@ clean: configure.in Makefile.am control-file
debconf-updatepo
for f in debian/*.in; do \
- f2=`echo $$f | sed "s,MYSQL_BASE_VERSION,$(MYSQL_BASE_VERSION),g;\
- s,MYSQL_PREVIOUS_BASE_VERSION,$(MYSQL_PREVIOUS_BASE_VERSION),g;\
- s,MYSQL_SOURCE_BASE_VERSION,$(MYSQL_SOURCE_BASE_VERSION),g;\
- s,NDB_SHARED_LIB_MAJOR_VERSION,$(NDB_SHARED_LIB_MAJOR_VERSION),g;\
- s,SHARED_LIB_MAJOR_VERSION,$(SHARED_LIB_MAJOR_VERSION),g;s,\.in$$,,"`; \
+ f2=`echo $$f | sed "s,BASE,$(MYSQL_BRANDED_BASE_VERSION),g;\
+ s,PREV,$(MYSQL_BRANDED_PREVIOUS_BASE_VERSION),g;\
+ s,NLIB,$(NDB_SHARED_LIB_MAJOR_VERSION),g;\
+ s,SLIB,$(SHARED_LIB_MAJOR_VERSION),g;s,\.in$$,,"`; \
if [ $$f2 != debian/control -a $$f2 != debian/Makefile -a $$f2 != debian/defs.mk ]; then \
rm -f $$f2; \
fi; \
@@ -243,7 +259,7 @@ install: build stamp-control
# Sort of hackish way to make sure we have a init script
# for dh_installinit
- cp support-files/mysql.server debian/mysql-server-$(MYSQL_BASE_VERSION).mysql.init
+ cp support-files/mysql.server debian/mysql-server-$(MYSQL_BRANDED_BASE_VERSION).mysql.init
mkdir -p $(TMP)/usr/lib/mysql/mysqld.sym
cp sql/mysqld.sym $(TMP)/usr/lib/mysql/mysqld.sym
@@ -292,8 +308,8 @@ install: build stamp-control
# mysql-server
install -m 0755 scripts/mysqld_safe $(TMP)/usr/bin/mysqld_safe
- mkdir -p $(TMP)/usr/share/doc/mysql-server-$(MYSQL_BASE_VERSION)/examples
- mv $(TMP)/usr/share/mysql/*cnf $(TMP)/usr/share/doc/mysql-server-$(MYSQL_BASE_VERSION)/examples/
+ mkdir -p $(TMP)/usr/share/doc/mysql-server-$(MYSQL_BRANDED_BASE_VERSION)/examples
+ mv $(TMP)/usr/share/mysql/*cnf $(TMP)/usr/share/doc/mysql-server-$(MYSQL_BRANDED_BASE_VERSION)/examples/
rm -vf $(TMP)/usr/share/mysql/mi_test_all* \
$(TMP)/usr/share/mysql/mysql-log-rotate \
$(TMP)/usr/share/mysql/mysql.server \
@@ -305,14 +321,14 @@ install: build stamp-control
cp -a sql-bench $(TMP)/usr/share/mysql/
# lintian overrides
mkdir -p $(TMP)/usr/share/lintian/overrides/
- cp debian/mysql-server-$(MYSQL_BASE_VERSION).lintian-overrides $(TMP)/usr/share/lintian/overrides/mysql-server-$(MYSQL_BASE_VERSION)
- cp debian/mysql-client-$(MYSQL_BASE_VERSION).lintian-overrides $(TMP)/usr/share/lintian/overrides/mysql-client-$(MYSQL_BASE_VERSION)
+ cp debian/mysql-server-$(MYSQL_BRANDED_BASE_VERSION).lintian-overrides $(TMP)/usr/share/lintian/overrides/mysql-server-$(MYSQL_BRANDED_BASE_VERSION)
+ cp debian/mysql-client-$(MYSQL_BRANDED_BASE_VERSION).lintian-overrides $(TMP)/usr/share/lintian/overrides/mysql-client-$(MYSQL_BRANDED_BASE_VERSION)
# For 4.1 -> 5.0 transition
d=$(TMP)/usr/share/mysql-common/internal-use-only/; \
mkdir -p $$d; \
- cp debian/mysql-server-$(MYSQL_BASE_VERSION).mysql.init $$d/_etc_init.d_mysql; \
- cp debian/mysql-server-$(MYSQL_BASE_VERSION).mysql-server.logrotate $$d/_etc_logrotate.d_mysql-server; \
+ cp debian/mysql-server-$(MYSQL_BRANDED_BASE_VERSION).mysql.init $$d/_etc_init.d_mysql; \
+ cp debian/mysql-server-$(MYSQL_BRANDED_BASE_VERSION).mysql-server.logrotate $$d/_etc_logrotate.d_mysql-server; \
dh_movefiles