#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
#
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
#
# Modified to make a template file for a multi-binary package with separated
# build-arch and build-indep targets  by Bill Allombert 2001

# 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

build:
	scons

install:
	

clean:
	rm -rf debian/galera
	rm -f debian/files

binary:
	dh_installdirs -a
	cp garb/files/garb.cnf debian/galera/etc/default/garb
	cp garb/files/garb.sh debian/galera/etc/init.d/garb
	touch debian/galera/etc/ld.so.conf.d/galera.conf
	cp garb/garbd debian/galera/usr/bin/garbd
	cp libgalera_smm.so debian/galera/usr/lib/galera
	cp LICENSE debian/galera/usr/share/doc/galera/COPYING
	cp asio/LICENSE_1_0.txt debian/galera/usr/share/doc/galera/LICENSE.asio
	cp www.evanjones.ca/LICENSE debian/galera/usr/share/doc/galera/LICENSE.crc32c
	cp chromium/LICENSE debian/galera/usr/share/doc/galera/LICENSE.chromium
	cp README debian/galera/usr/share/doc/galera
	cp scripts/packages/README-MySQL debian/galera/usr/share/doc/galera
	#dh_installdebconf -a
	#dh_installdocs -a
	#dh_installexamples -a
	#dh_installinit -a -n -u 'defaults 20 32'
	#dh_installman -a
	dh_lintian
	#dh_installchangelogs
	#dh_link -a
	dh_strip -a --dbg-package=galera-dbg
	
	#dh_compress -a
	dh_fixperms -a
	
	#dh_makeshlibs -a -V
	#dh_perl -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a
