summaryrefslogtreecommitdiff
path: root/storage/mroonga/packages/debian/rules
blob: 2a397b333e1121559edc5360f26226bb77732eff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/make -f
# -*- makefile-gmake -*-
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# 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}')

%:
	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
	dh_auto_configure -- --with-mysql-source=./mysql-$(MYSQL_VERSION)

# disable 'make check'.
override_dh_auto_test:

override_dh_install:
	mv debian/tmp/usr/share/doc/mroonga/ \
	  debian/tmp/usr/share/doc/mysql-server-mroonga-doc/
	dh_install
#	if test -x /usr/bin/dh_apparmor; then			\
#	  dh_apparmor						\
#	    -pmysql-server-mroonga				\
#	    --profile-name=usr.lib.mysql.plugin.ha_mroonga;	\
#	fi