| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
maintainer := $(shell LC_ALL=C dpkg-parsechangelog | grep ^Maintainer: | \ |
| 36 |
sed 's/^Maintainer: *//') |
| 37 |
email := $(shell LC_ALL=C dpkg-parsechangelog | grep ^Maintainer: | \ |
| 38 |
sed -e 's/^Maintainer:[^<]*<//' -e 's/>//') |
| 39 |
|
| 40 |
|
| 41 |
urgency := $(shell LC_ALL=C dpkg-parsechangelog | grep ^Urgency: | \ |
| 42 |
sed 's/^Urgency: *//') |
| 43 |
|
| 44 |
|
| 45 |
DEB_SOURCE_PACKAGE := $(strip $(shell egrep '^Source: ' debian/control | \ |
| 46 |
cut -f 2 -d ':')) |
| 47 |
DEB_VERSION := $(strip $(shell LC_ALL=C dpkg-parsechangelog | \ |
| 48 |
egrep '^Version:' | cut -f 2 -d ' ')) |
| 49 |
DEB_ISNATIVE := $(strip $(shell LC_ALL=C dpkg-parsechangelog | \ |
| 50 |
perl -ne 'print if (m/^Version:/g && ! m/^Version:.*\-/);')) |
| 51 |
DEB_DISTRIBUTION := $(strip $(shell LC_ALL=C dpkg-parsechangelog | \ |
| 52 |
egrep '^Distribution:' | cut -f 2 -d ' ')) |
| 53 |
|
| 54 |
DEB_PACKAGES := $(shell perl -e ' \ |
| 55 |
$$/=""; \ |
| 56 |
while(<>){ \ |
| 57 |
$$p=$$1 if m/^Package:\s*(\S+)/; \ |
| 58 |
die "duplicate package $$p" if $$seen{$$p}; \ |
| 59 |
$$seen{$$p}++; print "$$p " if $$p; \ |
| 60 |
}' debian/control ) |
| 61 |
|
| 62 |
DEB_INDEP_PACKAGES := $(shell perl -e ' \ |
| 63 |
$$/=""; \ |
| 64 |
while(<>){ \ |
| 65 |
$$p=$$1 if m/^Package:\s*(\S+)/; \ |
| 66 |
die "duplicate package $$p" if $$seen{$$p}; \ |
| 67 |
$$seen{$$p}++; \ |
| 68 |
$$a=$$1 if m/^Architecture:\s*(\S+)/m; \ |
| 69 |
next unless ($$a eq "all"); \ |
| 70 |
print "$$p " if $$p; \ |
| 71 |
}' debian/control ) |
| 72 |
|
| 73 |
DEB_ARCH_PACKAGES := $(shell perl -e ' \ |
| 74 |
$$/=""; \ |
| 75 |
while(<>){ \ |
| 76 |
$$p=$$1 if m/^Package:\s*(\S+)/; \ |
| 77 |
die "duplicate package $$p" if $$seen{$$p}; \ |
| 78 |
$$seen{$$p}++; \ |
| 79 |
$$c=""; \ |
| 80 |
if (/^Architecture:\s*(.*?)\s*$$/sm) { \ |
| 81 |
@a = split /\s+/, $$1 }; \ |
| 82 |
for my $$b (@a) { \ |
| 83 |
next unless ($$b eq "$(DEB_HOST_ARCH)" || \ |
| 84 |
$$b eq "any"); \ |
| 85 |
$$c="$$p"; \ |
| 86 |
} \ |
| 87 |
print "$$c " if $$c; \ |
| 88 |
}' debian/control ) |
| 89 |
|
| 90 |
|
| 91 |
package = $(notdir $@) |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|