Navigation Menu

Skip to content

Commit

Permalink
package ubuntu: support Wily
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Oct 29, 2015
1 parent 843fbba commit 39a0fb5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
33 changes: 21 additions & 12 deletions packages/debian/rules
Expand Up @@ -6,23 +6,32 @@
# This has to be exported to make some magic below work.
export DH_OPTIONS

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

%:
dh $@

override_dh_auto_configure:
path=main/m/mysql-5.5/mysql-5.5_$(MYSQL_VERSION).orig.tar.gz; \
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 mysql-5.5_$(MYSQL_VERSION).orig.tar.gz
case "$(MYSQL_VERSION)" in \
5.5.*) \
archive=mysql-5.5_$(MYSQL_VERSION).orig.tar.gz; \
path=main/m/mysql-5.5/$${archive}; \
;; \
5.6.*) \
archive=mysql-5.6_$(MYSQL_VERSION).orig.tar.gz; \
path=main/m/mysql-5.6/$${archive}; \
;; \
esac; \
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)

# disable 'make check'.
Expand Down
2 changes: 1 addition & 1 deletion packages/ubuntu/upload.rb
Expand Up @@ -125,7 +125,7 @@ def upload(code_name)
"--newversion", deb_version,
"Build for #{code_name}.")
case code_name
when "vivid"
when "vivid", "wily"
run_command("sed",
"-i", "-e", "s,5\\.5,5.6,g",
"debian/rules")
Expand Down

0 comments on commit 39a0fb5

Please sign in to comment.