Debian Codegraph @

debian/common/pkgvars.mk

raw symbols SCIP
1 ############################ -*- Mode: Makefile -*- ###########################
2 ## pkgvars.mk ---
3 ## Author : Manoj Srivastava ( [email protected] )
4 ## Created On : Sat Nov 15 02:56:30 2003
5 ## Created On Node : glaurung.green-gryphon.com
6 ## Last Modified By : Manoj Srivastava
7 ## Last Modified On : Thu Jun 15 12:05:46 2006
8 ## Last Machine Used: glaurung.internal.golden-gryphon.com
9 ## Update Count : 11
10 ## Status : Unknown, Use with caution!
11 ## HISTORY :
12 ## Description : This is what allows us toseparate out the top level
13 ## targets, by determining which packages needto be built.
14 ##
15 ## arch-tag: 75fcc720-7389-4eaa-a7ac-c556d3eac331
16 ##
17 ##
18 ## This program is free software; you can redistribute it and/or modify
19 ## it under the terms of the GNU General Public License as published by
20 ## the Free Software Foundation; either version 2 of the License, or
21 ## (at your option) any later version.
22 ##
23 ## This program is distributed in the hope that it will be useful,
24 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
25 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ## GNU General Public License for more details.
27 ##
28 ## You should have received a copy of the GNU General Public License
29 ## along with this program; if not, write to the Free Software
30 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 ##
32 ###############################################################################
33
34 # The maintainer information.
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 # Priority of this version (or urgency, as dchanges would call it)
41 urgency := $(shell LC_ALL=C dpkg-parsechangelog | grep ^Urgency: | \
42 sed 's/^Urgency: *//')
43
44 # Common useful variables
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 # This package is what we get after removing the psuedo dirs we use in rules
91 package = $(notdir $@)
92
93 #Local variables:
94 #mode: makefile
95 #End: