#! /usr/bin/make -f
# -*- coding: utf-8; -*- vim: filetype=make fileencoding=utf-8 :

# debian/rules
# Part of lojban-common package
#
# Copyright © 2005, 2008 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 2 or later.
# No warranty expressed or implied. See the file LICENSE for details.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

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

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


.PHONY: build
build: ${SOURCE_FILES}

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

.PHONY: clean
clean:
	dh clean

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

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

.PHONY: binary-arch
binary-arch: ;

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