Navigation Menu

Skip to content

Commit

Permalink
package ubuntu: mysql-5.7 requires running cmake to generate files
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 30, 2016
1 parent cc62c7e commit b5ba7df
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
Expand Up @@ -2,4 +2,4 @@
/usr/lib/*/groonga/plugins/** rm,
/etc/mecabrc r,
/var/lib/mecab/dic/** r,
#include <local/mysql-server-5.6-mroonga>
#include <local/mysql-server-5.7-mroonga>
23 changes: 18 additions & 5 deletions packages/debian-5.7/rules
Expand Up @@ -6,25 +6,38 @@
# This has to be exported to make some magic below work.
export DH_OPTIONS

export MYSQL_VERSION_FULL := $(shell apt-cache show mysql-server-5.7 | grep Version | head -n 1 | awk '{print $$2}')
export MYSQL_VERSION := $(shell apt-cache show mysql-server-5.7 | grep Version | head -n 1 | awk '{print $$2}' | awk -F '-' '{print $$1}')

%:
dh $@

override_dh_auto_configure:
archive_base=mysql-$(MYSQL_VERSION); \
archive=mysql-5.7_$(MYSQL_VERSION).orig.tar.gz; \
path=main/m/mysql-5.7/$${archive}; \
debian=mysql-5.7_$(MYSQL_VERSION_FULL).debian.tar.xz; \
path=main/m/mysql-5.7; \
if [ "$$(lsb_release --id --short)" = "Ubuntu" ]; then \
base_url=http://archive.ubuntu.com/ubuntu/pool; \
security_base_url=http://security.ubuntu.com/ubuntu/pool; \
else \
base_url=http://ftp.debian.org/debian/pool; \
security_base_url=http://security.debian.org/pool/updates; \
fi; \
wget $${security_base_url}/$${path} || \
wget $${base_url}/$${path}; \
tar xf $${archive}
dh_auto_configure -- --with-mysql-source=./mysql-$(MYSQL_VERSION)
wget $${security_base_url}/$${path}/$${archive} || \
wget $${base_url}/$${path}/$${archive}; \
wget $${security_base_url}/$${path}/$${debian} || \
wget $${base_url}/$${path}/$${debian}; \
tar xf $${archive}; \
(cd $${archive_base} && \
tar xf ../$${debian} && \
debian/rules override_dh_auto_configure && \
echo "TODO: Remove the following cp after 6.03 is released" &&\
cp builddir/libbinlogevents/include/binlog_config.h \
libbinlogevents/include/); \
dh_auto_configure -- \
--with-mysql-source=./$${archive_base} \
--with-mysql-build=./$${archive_base}/builddir

# disable 'make check'.
override_dh_auto_test:
Expand Down

0 comments on commit b5ba7df

Please sign in to comment.