#!/usr/bin/make -f
# Generated automatically from debian/packages
# by yada v0.55, of Tue, 15 Dec 2009

DEB_HOST_ARCH        := $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
DEB_HOST_ARCH_OS     := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
DEB_HOST_ARCH_CPU    := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null)
DEB_HOST_GNU_CPU     := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU 2>/dev/null)
DEB_HOST_GNU_TYPE    := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE 2>/dev/null)
DEB_HOST_GNU_SYSTEM  := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM 2>/dev/null)

DEB_BUILD_ARCH       := $(shell dpkg-architecture -qDEB_BUILD_ARCH 2>/dev/null)
DEB_BUILD_ARCH_OS    := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS 2>/dev/null)
DEB_BUILD_ARCH_CPU   := $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU 2>/dev/null)
DEB_BUILD_GNU_CPU    := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU 2>/dev/null)
DEB_BUILD_GNU_TYPE   := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE 2>/dev/null)
DEB_BUILD_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM 2>/dev/null)

# Take account of old dpkg-architecture output.
ifeq ($(DEB_HOST_ARCH_CPU),)
  DEB_HOST_ARCH_CPU := $(DEB_HOST_GNU_CPU))
  ifeq ($(DEB_HOST_ARCH_CPU),i486)
    DEB_HOST_ARCH_OS := i386
  else
  ifeq ($(DEB_HOST_ARCH_CPU),x86_64)
    DEB_HOST_ARCH_OS := amd64
  endif
  endif
endif
ifeq ($(DEB_HOST_ARCH_OS),)
  DEB_HOST_ARCH_OS := $(subst -gnu,,$(DEB_HOST_GNU_SYSTEM))
  ifeq ($(DEB_HOST_ARCH_OS),gnu)
    DEB_HOST_ARCH_OS := hurd
  endif
endif
ifeq ($(DEB_BUILD_ARCH_CPU),)
  DEB_BUILD_ARCH_CPU := $(DEB_BUILD_GNU_CPU))
  ifeq ($(DEB_BUILD_ARCH_CPU),i486)
    DEB_BUILD_ARCH_OS := i386
  else
  ifeq ($(DEB_BUILD_ARCH_CPU),x86_64)
    DEB_BUILD_ARCH_OS := amd64
  endif
  endif
endif
ifeq ($(DEB_BUILD_ARCH_OS),)
  DEB_BUILD_ARCH_OS := $(subst -gnu,,$(DEB_BUILD_GNU_SYSTEM))
  ifeq ($(DEB_BUILD_ARCH_OS),gnu)
    DEB_BUILD_ARCH_OS := hurd
  endif
endif

LEFT_PARENTHESIS:=(
VERSION:=$(shell head -n1 debian/changelog | sed -e "s/^[0-9a-zA-Z.-]* $(LEFT_PARENTHESIS)//" -e "s/[^0-9a-zA-Z.:+~-].*//")

SHELL=/bin/bash

.PHONY: default
default:
	@echo "Specify a target:"; \
	echo " build              compile the package"; \
	echo " build-arch         compile the architecture-dependent package"; \
	echo " build-indep        compile the architecture-independent package"; \
	echo " binary             make all binary packages"; \
	echo " binary-arch        make all architecture-dependent binary packages"; \
	echo " binary-indep       make all architecture-independent binary packages"; \
	echo " clean              clean up the source package"; \
	echo; \
	echo " clean-install-tree clean up only under debian/"; \
	echo

# Build the package and prepare the install tree

.PHONY: build-only build
build-only: debian/build-stamp
build: build-only

.PHONY: build-arch-only build-arch
build-arch-only: debian/build-arch-stamp
build-arch: build-arch-only

.PHONY: build-indep-only build-indep
build-indep-only: debian/build-indep-stamp
build-indep: build-indep-only

# Make sure these rules and the control file are up-to-date

.PHONY: rules control templates
rules: debian/rules
debian/rules: $(shell which yada) debian/packages-tmp
	yada rebuild rules

control: debian/control
debian/control: $(shell which yada) debian/packages-tmp
	yada rebuild control

templates: debian/templates debian/po/POTFILES.in
debian/templates: $(shell which yada) debian/packages-tmp
	yada rebuild templates
debian/po/POTFILES.in: $(shell which yada) debian/packages-tmp
	yada rebuild templates

debian/build-stamp: debian/build-arch-stamp debian/build-indep-stamp
	@[ -f $(shell which yada) -a -f debian/rules ]
	touch debian/build-stamp

debian/build-arch-stamp:
	@[ -f $(shell which yada) -a -f debian/rules ]
	touch debian/build-arch-stamp

debian/build-indep-stamp: debian/build-arch-stamp
	@[ -f $(shell which yada) -a -f debian/rules ]
	@umask 022 \
	  && export pwd="$$(pwd)" \
	  && export TMPROOT="$$(pwd)/debian/tmp" \
	  && export SOURCE="xfonts-biznet" \
	  && export VERSION="$(VERSION)" \
	  && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
	  && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
	  && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
	  && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
	  && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
	  && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\
	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
	echo -E 'for i in $$(cat debian/xfonts-biznet.list); do';\
	echo -E '   /usr/bin/X11/bdftopcf $$i -o $${i%bdf}pcf';\
	echo -E '   gzip -9 $${i%bdf}pcf';\
	echo -E 'done';\
	echo -E 'for i in misc; do';\
	echo -E '    grep -v '\''.*-.*-.*-.*-.*-.*-.*-0-0-.*-.*-.*-0-.*-.*'\'' biznet/$$i/fonts.alias \';\
	echo -E '        > $$i.alias';\
	echo -E 'done';\
	echo -E 'for i in 75dpi 100dpi; do';\
	echo -E '    grep -v '\''.*-.*-.*-.*-.*-.*-.*-0-0-.*-.*-.*-0-.*-.*'\'' biznet/$$i/fonts.alias \';\
	echo -E '        | grep chartis \';\
	echo -E '        > $$i.alias';\
	echo -E 'done') | /bin/sh
	touch debian/build-indep-stamp

.PHONY: install-tree
install-tree: install-tree-any
install-tree-any: \
	debian/tmp-xfonts-biznet-base/DEBIAN/control \
	debian/tmp-xfonts-biznet-100dpi/DEBIAN/control \
	debian/tmp-xfonts-biznet-75dpi/DEBIAN/control

debian/tmp-xfonts-biznet-base/DEBIAN/control: debian/build-indep-stamp debian/control
	rm -rf debian/tmp-xfonts-biznet-base
	umask 022 && install -d debian/tmp-xfonts-biznet-base/DEBIAN
	install -d debian/tmp-xfonts-biznet-base/usr/share/doc/xfonts-biznet-base
	umask 022; yada generate copyright xfonts-biznet-base \
	  > debian/tmp-xfonts-biznet-base/usr/share/doc/xfonts-biznet-base/copyright
	install -m 644 -p debian/changelog \
	  debian/tmp-xfonts-biznet-base/usr/share/doc/xfonts-biznet-base/changelog.Debian
	@umask 022 \
	  && export pwd="$$(pwd)" \
	  && export ROOT="$$(pwd)/debian/tmp-xfonts-biznet-base" \
	  && export TMPROOT="$$(pwd)/debian/tmp" \
	  && export CONTROL="$$(pwd)/debian/tmp-xfonts-biznet-base/DEBIAN" \
	  && export PACKAGE="xfonts-biznet-base" \
	  && export SOURCE="xfonts-biznet" \
	  && export VERSION="$(VERSION)" \
	  && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
	  && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
	  && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
	  && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
	  && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
	  && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\
	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
	echo -E 'yada install -dir /usr/share/fonts/X11/misc';\
	echo -E 'yada install -data -into /usr/share/fonts/X11/misc biznet/misc/*.pcf.gz';\
	echo -E 'yada install -data -into /etc/X11/fonts/misc -as $$PACKAGE.alias misc.alias';\
	echo -E 'yada install -doc -as README biznet/RELEASE_NOTES.TXT') | /bin/sh
	@umask 022 \
	  && export pwd="$$(pwd)" \
	  && export ROOT="$$(pwd)/debian/tmp-xfonts-biznet-base" \
	  && export TMPROOT="$$(pwd)/debian/tmp" \
	  && export CONTROL="$$(pwd)/debian/tmp-xfonts-biznet-base/DEBIAN" \
	  && export PACKAGE="xfonts-biznet-base" \
	  && export SOURCE="xfonts-biznet" \
	  && export VERSION="$(VERSION)" && (\
	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
	echo -E 'yada perl';\
	echo -E 'yada python';\
	echo -E 'yada strip';\
	echo -E 'yada shlibdeps') | /bin/sh
	yada compress xfonts-biznet-base
	yada generate maintscripts xfonts-biznet-base
	find debian/tmp-xfonts-biznet-base -type f -print \
	  | sed -n 's/^debian\/tmp-xfonts-biznet-base\(\/etc\/.*\)$$/\1/p' \
	  > debian/tmp-xfonts-biznet-base/DEBIAN/conffiles
	test -s debian/tmp-xfonts-biznet-base/DEBIAN/conffiles || rm -f debian/tmp-xfonts-biznet-base/DEBIAN/conffiles
	yada rebuild control
	yada generate substvars xfonts-biznet-base
	umask 022 && dpkg-gencontrol -isp -pxfonts-biznet-base -Pdebian/tmp-xfonts-biznet-base

debian/tmp-xfonts-biznet-100dpi/DEBIAN/control: debian/build-indep-stamp debian/control
	rm -rf debian/tmp-xfonts-biznet-100dpi
	umask 022 && install -d debian/tmp-xfonts-biznet-100dpi/DEBIAN
	install -d debian/tmp-xfonts-biznet-100dpi/usr/share/doc/xfonts-biznet-100dpi
	umask 022; yada generate copyright xfonts-biznet-100dpi \
	  > debian/tmp-xfonts-biznet-100dpi/usr/share/doc/xfonts-biznet-100dpi/copyright
	install -m 644 -p debian/changelog \
	  debian/tmp-xfonts-biznet-100dpi/usr/share/doc/xfonts-biznet-100dpi/changelog.Debian
	@umask 022 \
	  && export pwd="$$(pwd)" \
	  && export ROOT="$$(pwd)/debian/tmp-xfonts-biznet-100dpi" \
	  && export TMPROOT="$$(pwd)/debian/tmp" \
	  && export CONTROL="$$(pwd)/debian/tmp-xfonts-biznet-100dpi/DEBIAN" \
	  && export PACKAGE="xfonts-biznet-100dpi" \
	  && export SOURCE="xfonts-biznet" \
	  && export VERSION="$(VERSION)" \
	  && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
	  && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
	  && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
	  && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
	  && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
	  && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\
	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
	echo -E 'yada install -dir /usr/share/fonts/X11/100dpi';\
	echo -E 'yada install -data -into /usr/share/fonts/X11/100dpi biznet/100dpi/*.pcf.gz';\
	echo -E 'yada install -data -into /etc/X11/fonts/100dpi -as $$PACKAGE.alias 100dpi.alias';\
	echo -E 'yada install -doc -as README biznet/RELEASE_NOTES.TXT') | /bin/sh
	@umask 022 \
	  && export pwd="$$(pwd)" \
	  && export ROOT="$$(pwd)/debian/tmp-xfonts-biznet-100dpi" \
	  && export TMPROOT="$$(pwd)/debian/tmp" \
	  && export CONTROL="$$(pwd)/debian/tmp-xfonts-biznet-100dpi/DEBIAN" \
	  && export PACKAGE="xfonts-biznet-100dpi" \
	  && export SOURCE="xfonts-biznet" \
	  && export VERSION="$(VERSION)" && (\
	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
	echo -E 'yada perl';\
	echo -E 'yada python';\
	echo -E 'yada strip';\
	echo -E 'yada shlibdeps') | /bin/sh
	yada compress xfonts-biznet-100dpi
	yada generate maintscripts xfonts-biznet-100dpi
	find debian/tmp-xfonts-biznet-100dpi -type f -print \
	  | sed -n 's/^debian\/tmp-xfonts-biznet-100dpi\(\/etc\/.*\)$$/\1/p' \
	  > debian/tmp-xfonts-biznet-100dpi/DEBIAN/conffiles
	test -s debian/tmp-xfonts-biznet-100dpi/DEBIAN/conffiles || rm -f debian/tmp-xfonts-biznet-100dpi/DEBIAN/conffiles
	yada rebuild control
	yada generate substvars xfonts-biznet-100dpi
	umask 022 && dpkg-gencontrol -isp -pxfonts-biznet-100dpi -Pdebian/tmp-xfonts-biznet-100dpi

debian/tmp-xfonts-biznet-75dpi/DEBIAN/control: debian/build-indep-stamp debian/control
	rm -rf debian/tmp-xfonts-biznet-75dpi
	umask 022 && install -d debian/tmp-xfonts-biznet-75dpi/DEBIAN
	install -d debian/tmp-xfonts-biznet-75dpi/usr/share/doc/xfonts-biznet-75dpi
	umask 022; yada generate copyright xfonts-biznet-75dpi \
	  > debian/tmp-xfonts-biznet-75dpi/usr/share/doc/xfonts-biznet-75dpi/copyright
	install -m 644 -p debian/changelog \
	  debian/tmp-xfonts-biznet-75dpi/usr/share/doc/xfonts-biznet-75dpi/changelog.Debian
	@umask 022 \
	  && export pwd="$$(pwd)" \
	  && export ROOT="$$(pwd)/debian/tmp-xfonts-biznet-75dpi" \
	  && export TMPROOT="$$(pwd)/debian/tmp" \
	  && export CONTROL="$$(pwd)/debian/tmp-xfonts-biznet-75dpi/DEBIAN" \
	  && export PACKAGE="xfonts-biznet-75dpi" \
	  && export SOURCE="xfonts-biznet" \
	  && export VERSION="$(VERSION)" \
	  && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
	  && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
	  && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
	  && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
	  && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
	  && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\
	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
	echo -E 'yada install -dir /usr/share/fonts/X11/75dpi';\
	echo -E 'yada install -data -into /usr/share/fonts/X11/75dpi biznet/75dpi/*.pcf.gz';\
	echo -E 'yada install -data -into /etc/X11/fonts/75dpi -as $$PACKAGE.alias 75dpi.alias';\
	echo -E 'yada install -doc -as README biznet/RELEASE_NOTES.TXT') | /bin/sh
	@umask 022 \
	  && export pwd="$$(pwd)" \
	  && export ROOT="$$(pwd)/debian/tmp-xfonts-biznet-75dpi" \
	  && export TMPROOT="$$(pwd)/debian/tmp" \
	  && export CONTROL="$$(pwd)/debian/tmp-xfonts-biznet-75dpi/DEBIAN" \
	  && export PACKAGE="xfonts-biznet-75dpi" \
	  && export SOURCE="xfonts-biznet" \
	  && export VERSION="$(VERSION)" && (\
	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
	echo -E 'yada perl';\
	echo -E 'yada python';\
	echo -E 'yada strip';\
	echo -E 'yada shlibdeps') | /bin/sh
	yada compress xfonts-biznet-75dpi
	yada generate maintscripts xfonts-biznet-75dpi
	find debian/tmp-xfonts-biznet-75dpi -type f -print \
	  | sed -n 's/^debian\/tmp-xfonts-biznet-75dpi\(\/etc\/.*\)$$/\1/p' \
	  > debian/tmp-xfonts-biznet-75dpi/DEBIAN/conffiles
	test -s debian/tmp-xfonts-biznet-75dpi/DEBIAN/conffiles || rm -f debian/tmp-xfonts-biznet-75dpi/DEBIAN/conffiles
	yada rebuild control
	yada generate substvars xfonts-biznet-75dpi
	umask 022 && dpkg-gencontrol -isp -pxfonts-biznet-75dpi -Pdebian/tmp-xfonts-biznet-75dpi

# Build package files

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

.PHONY: binary-arch-any
binary-arch-any:
binary-indep: \
	binary-package-xfonts-biznet-base \
	binary-package-xfonts-biznet-100dpi \
	binary-package-xfonts-biznet-75dpi

.PHONY: binary-package-xfonts-biznet-base
binary-package-xfonts-biznet-base: check-root debian/tmp-xfonts-biznet-base/DEBIAN/control
	@[ -f $(shell which yada) -a -f debian/rules ]
	chown -R 0.0 debian/tmp-xfonts-biznet-base
	chmod -R u=rwX,go=rX debian/tmp-xfonts-biznet-base
	@if [ -d debian/tmp-xfonts-biznet-base/usr/doc/xfonts-biznet-base ]; then \
	  echo "*** Yada warning: /usr/doc/xfonts-biznet-base should be /usr/share/doc/xfonts-biznet-base";\
	fi
	dpkg-deb --build debian/tmp-xfonts-biznet-base ..

.PHONY: binary-package-xfonts-biznet-100dpi
binary-package-xfonts-biznet-100dpi: check-root debian/tmp-xfonts-biznet-100dpi/DEBIAN/control
	@[ -f $(shell which yada) -a -f debian/rules ]
	chown -R 0.0 debian/tmp-xfonts-biznet-100dpi
	chmod -R u=rwX,go=rX debian/tmp-xfonts-biznet-100dpi
	@if [ -d debian/tmp-xfonts-biznet-100dpi/usr/doc/xfonts-biznet-100dpi ]; then \
	  echo "*** Yada warning: /usr/doc/xfonts-biznet-100dpi should be /usr/share/doc/xfonts-biznet-100dpi";\
	fi
	dpkg-deb --build debian/tmp-xfonts-biznet-100dpi ..

.PHONY: binary-package-xfonts-biznet-75dpi
binary-package-xfonts-biznet-75dpi: check-root debian/tmp-xfonts-biznet-75dpi/DEBIAN/control
	@[ -f $(shell which yada) -a -f debian/rules ]
	chown -R 0.0 debian/tmp-xfonts-biznet-75dpi
	chmod -R u=rwX,go=rX debian/tmp-xfonts-biznet-75dpi
	@if [ -d debian/tmp-xfonts-biznet-75dpi/usr/doc/xfonts-biznet-75dpi ]; then \
	  echo "*** Yada warning: /usr/doc/xfonts-biznet-75dpi should be /usr/share/doc/xfonts-biznet-75dpi";\
	fi
	dpkg-deb --build debian/tmp-xfonts-biznet-75dpi ..

.PHONY: check-root
check-root:
	@[ `id -u` = 0 ] || (echo "You must be root to do this!"; false)

debian/packages-tmp: debian/packages debian/packages.common debian/packages.common debian/packages.common
	yada rebuild packages

## Clean up afterwards

.PHONY: clean clean-install-tree clean-build

clean: clean-install-tree clean-build debian/control debian/rules
	rm -f debian/packages-tmp debian/packages-tmp-new debian/packages-tmp-include

clean-build:
	@[ -f $(shell which yada) -a -f debian/rules ]
	rm -f debian/build-stamp debian/build-arch-stamp debian/build-indep-stamp
	@umask 022 \
	  && export pwd="$$(pwd)" \
	  && export TMPROOT="$$(pwd)/debian/tmp" \
	  && export SOURCE="xfonts-biznet" \
	  && export VERSION="$(VERSION)" \
	  && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
	  && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
	  && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
	  && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
	  && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
	  && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\
	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
	echo -E 'rm -f $$(find biznet -name '\''*.pcf'\'') $$(find biznet -name '\''*.pcf.gz'\'') || true';\
	echo -E 'rm -f *.alias || true') | /bin/sh
	yada unpatch
	rm -rf debian/tmp

clean-install-tree: debian/rules
	@[ -f $(shell which yada) -a -f debian/rules ]
	rm -f debian/install-tree-stamp
	rm -rf debian/tmp-* debian/files* debian/substvars debian/shlibs.local debian/ucf
