1#!/usr/bin/make -f 2# Generated automatically from debian/packages 3# by yada v0.34, of Mon, 25 Apr 2005 4 5DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) 6DEB_HOST_GNU_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU) 7DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) 8DEB_HOST_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM) 9 10DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH) 11DEB_BUILD_GNU_CPU := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU) 12DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) 13DEB_BUILD_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM) 14 15VERSION:=$(shell LC_ALL=C dpkg-parsechangelog | sed -ne 's/^Version: *\([^2]*\)/\1/p') 16 17SHELL=/bin/bash 18 19.PHONY: default 20default: 21 @echo "Specify a target:"; \ 22 echo " build compile the package"; \ 23 echo " build-arch compile the architecture-dependent package"; \ 24 echo " build-indep compile the architecture-independent package"; \ 25 echo " binary make all binary packages"; \ 26 echo " binary-arch make all architecture-dependent binary packages"; \ 27 echo " binary-indep make all architecture-independent binary packages"; \ 28 echo " clean clean up the source package"; \ 29 echo; \ 30 echo " clean-install-tree clean up only under debian/"; \ 31 echo 32 33# Build the package and prepare the install tree 34 35.PHONY: build-only build 36build-only: debian/build-stamp 37build: build-only 38 39.PHONY: build-arch-only build-arch 40build-arch-only: debian/build-arch-stamp 41build-arch: build-arch-only 42 43.PHONY: build-indep-only build-indep 44build-indep-only: debian/build-indep-stamp 45build-indep: build-indep-only 46 47# Make sure these rules and the control file are up-to-date 48 49.PHONY: rules control templates 50rules: debian/rules 51debian/rules: $(shell which yada) debian/packages-tmp 52 yada rebuild rules 53 54control: debian/control 55debian/control: $(shell which yada) debian/packages-tmp 56 yada rebuild control 57 58templates: debian/templates 59debian/templates: $(shell which yada) debian/packages-tmp 60 yada rebuild templates 61 62debian/build-stamp: debian/build-arch-stamp debian/build-indep-stamp 63 @[ -f $(shell which yada) -a -f debian/rules ] 64 yada patch "debian/*.dpatch" 65 @umask 022 \ 66 && export pwd="$$(pwd)" \ 67 && export TMPROOT="$$(pwd)/debian/tmp" \ 68 && export SOURCE="gramofile" \ 69 && export VERSION="$(VERSION)" \ 70 && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \ 71 && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \ 72 && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \ 73 && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \ 74 && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \ 75 && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\ 76 echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\ 77 echo -E 'make') | /bin/sh 78 touch debian/build-stamp 79 80debian/build-arch-stamp: 81 @[ -f $(shell which yada) -a -f debian/rules ] 82 yada patch "debian/*.dpatch" 83 touch debian/build-arch-stamp 84 85debian/build-indep-stamp: 86 @[ -f $(shell which yada) -a -f debian/rules ] 87 yada patch "debian/*.dpatch" 88 touch debian/build-indep-stamp 89 90.PHONY: install-tree 91install-tree: install-tree-any 92install-tree-any: \ 93 debian/tmp-gramofile/DEBIAN/control 94 95debian/tmp-gramofile/DEBIAN/control: debian/build-stamp debian/control 96 rm -rf debian/tmp-gramofile 97 umask 022 && install -d debian/tmp-gramofile/DEBIAN 98 install -d debian/tmp-gramofile/usr/share/doc/gramofile 99 umask 022; yada generate copyright \ 100 > debian/tmp-gramofile/usr/share/doc/gramofile/copyright 101 install -m 644 -p debian/changelog \ 102 debian/tmp-gramofile/usr/share/doc/gramofile/changelog.Debian 103 @umask 022 \ 104 && export pwd="$$(pwd)" \ 105 && export ROOT="$$(pwd)/debian/tmp-gramofile" \ 106 && export TMPROOT="$$(pwd)/debian/tmp" \ 107 && export CONTROL="$$(pwd)/debian/tmp-gramofile/DEBIAN" \ 108 && export PACKAGE="gramofile" \ 109 && export SOURCE="gramofile" \ 110 && export VERSION="$(VERSION)" \ 111 && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \ 112 && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \ 113 && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \ 114 && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \ 115 && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \ 116 && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\ 117 echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\ 118 echo -E 'yada install -bin gramofile';\ 119 echo -E 'yada install -lib -exec -subdir gramofile bplay_gramo';\ 120 echo -E 'ln -s bplay_gramo $$ROOT/usr/lib/gramofile/brec_gramo';\ 121 echo -E 'yada install -man debian/gramofile.1';\ 122 echo -E 'yada install -doc ChangeLog -as changelog';\ 123 echo -E 'yada install -doc README TODO *.txt') | /bin/sh 124 @umask 022 \ 125 && export pwd="$$(pwd)" \ 126 && export ROOT="$$(pwd)/debian/tmp-gramofile" \ 127 && export TMPROOT="$$(pwd)/debian/tmp" \ 128 && export CONTROL="$$(pwd)/debian/tmp-gramofile/DEBIAN" \ 129 && export PACKAGE="gramofile" \ 130 && export SOURCE="gramofile" \ 131 && export VERSION="$(VERSION)" && (\ 132 echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\ 133 echo -E 'yada perl';\ 134 echo -E 'yada python';\ 135 echo -E 'yada strip';\ 136 echo -E 'yada shlibdeps') | /bin/sh 137 rm -f debian/shlibs.local || true 138 LD_LIBRARY_PATH="$$LD_LIBRARY_PATH:debian/tmp-gramofile/lib:debian/tmp-gramofile/usr/lib" dpkg-shlibdeps -pshlibs:gramofile -dDepends debian/tmp-gramofile/usr/bin/* 139 yada compress gramofile 140 yada generate maintscripts gramofile 141 find debian/tmp-gramofile -type f -print \ 142 | sed -n 's/^debian\/tmp-gramofile\(\/etc\/.*\)$$/\1/p' \ 143 > debian/tmp-gramofile/DEBIAN/conffiles 144 if test ! -s debian/tmp-gramofile/DEBIAN/conffiles; then rm -f debian/tmp-gramofile/DEBIAN/conffiles; fi 145 yada rebuild control 146 yada generate substvars gramofile 147 umask 022 && dpkg-gencontrol -isp -pgramofile -Pdebian/tmp-gramofile 148 149# Build package files 150 151.PHONY: binary binary-arch binary-indep 152binary: binary-arch binary-indep 153binary-arch: binary-arch-any 154 155.PHONY: binary-arch-any 156binary-arch-any: \ 157 binary-package-gramofile 158binary-indep: 159 160.PHONY: binary-package-gramofile 161binary-package-gramofile: check-root debian/tmp-gramofile/DEBIAN/control 162 @[ -f $(shell which yada) -a -f debian/rules ] 163 chown -R 0.0 debian/tmp-gramofile 164 chmod -R u=rwX,go=rX debian/tmp-gramofile 165 @if [ -d debian/tmp-gramofile/usr/doc/gramofile ]; then \ 166 echo "*** Yada warning: /usr/doc/gramofile should be /usr/share/doc/gramofile";\ 167 fi 168 dpkg-deb --build debian/tmp-gramofile .. 169 170.PHONY: check-root 171check-root: 172 @[ `id -u` = 0 ] || (echo "You must be root to do this!"; false) 173 174debian/packages-tmp: debian/packages 175 yada rebuild packages 176 177## Clean up afterwards 178 179.PHONY: clean clean-install-tree clean-build 180 181clean: clean-install-tree clean-build debian/control debian/rules 182 rm -f debian/packages-tmp debian/packages-tmp-new debian/packages-tmp-include 183 184clean-build: 185 @[ -f $(shell which yada) -a -f debian/rules ] 186 rm -f debian/build-stamp debian/build-arch-stamp debian/build-indep-stamp 187 @umask 022 \ 188 && export pwd="$$(pwd)" \ 189 && export TMPROOT="$$(pwd)/debian/tmp" \ 190 && export SOURCE="gramofile" \ 191 && export VERSION="$(VERSION)" \ 192 && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \ 193 && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \ 194 && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \ 195 && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \ 196 && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \ 197 && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\ 198 echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\ 199 echo -E 'make clean || :') | /bin/sh 200 yada unpatch 201 rm -rf debian/tmp 202 203clean-install-tree: debian/rules 204 @[ -f $(shell which yada) -a -f debian/rules ] 205 rm -f debian/install-tree-stamp 206 rm -rf debian/tmp-* debian/files* debian/substvars debian/shlibs.local debian/ucf 207