#! /usr/bin/make -f

# debian/rules
# Part of the ‘lojban-common’ package.
#
# Copyright © 2005–2013 Ben Finney <ben+debian@benfinney.id.au>
# This is free software; you may copy, modify, and/or distribute this work
# under the terms of the GNU General Public License, version 3 or later.
# No warranty expressed or implied.
# See the file ‘/usr/share/common-licenses/GPL-3’ for details.

# Packaging variables
PACKAGE_NAME = lojban-common
SHA1SUMS_FILE = debian/upstream.sha1sums

GET_ORIG_SOURCE = $(dir $_)get-orig-source


.PHONY: build
build: build-arch build-indep
	dh $@

.PHONY: build-arch
build-arch:
	dh $@

.PHONY: build-indep
build-indep:
	dh $@

.PHONY: get-orig-source
get-orig-source:
	$(GET_ORIG_SOURCE)

.PHONY: clean
clean:
	dh $@

.PHONY: install
install: build
	cut -d ' ' -f 3 ${SHA1SUMS_FILE} \
		| sed -e 's_$$_\tusr/share/lojban_' \
		> debian/${PACKAGE_NAME}.install
	dh $@

.PHONY: binary-indep
binary-indep: build install
	dh $@

.PHONY: binary-arch
binary-arch:
	dh $@

.PHONY: binary
binary: binary-indep binary-arch


# Local variables:
# mode: makefile
# coding: utf-8
# End:
# vim: filetype=make fileencoding=utf-8 :
