File: build-essential-crossonly.diff

package info (click to toggle)
build-essential-mipsen 12.9
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 408 kB
  • sloc: sh: 557; makefile: 123; python: 78
file content (150 lines) | stat: -rw-r--r-- 4,928 bytes parent folder | download
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
diff --git a/debian/control.in b/debian/control.in
index 354e3a7..c4a9ec8 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -1,32 +1,7 @@
-Source: build-essential
+Source: @src_name@
 Section: devel
 Priority: optional
 Maintainer: Matthias Klose <doko@debian.org>
 Uploaders: Scott James Remnant <scott@netsplit.com>
 Standards-Version: 4.4.0
 Build-Depends: debhelper (>= 9), python3:any, g++ (>= 4:9.2)
-
-Package: build-essential
-Architecture: any
-Depends: ${build-essential}, ${misc:Depends}
-Description: Informational list of build-essential packages
- If you do not plan to build Debian packages, you don't need this
- package.  Starting with dpkg (>= 1.14.18) this package is required
- for building Debian packages.
- .
- This package contains an informational list of packages which are
- considered essential for building Debian packages.  This package also
- depends on the packages on that list, to make it easy to have the
- build-essential packages installed.
- .
- If you have this package installed, you only need to install whatever
- a package specifies as its build-time dependencies to build the
- package.  Conversely, if you are determining what your package needs
- to build-depend on, you can always leave out the packages this
- package depends on.
- .
- This package is NOT the definition of what packages are
- build-essential; the real definition is in the Debian Policy Manual.
- This package contains merely an informational list, which is all
- most people need.   However, if this package and the manual disagree,
- the manual is correct.
diff --git a/debian/control.native.in b/debian/control.native.in
new file mode 100644
index 0000000..34e3e14
--- /dev/null
+++ b/debian/control.native.in
@@ -0,0 +1,25 @@
+
+Package: build-essential
+Architecture: any
+Depends: ${build-essential}, ${misc:Depends}
+Description: Informational list of build-essential packages
+ If you do not plan to build Debian packages, you don't need this
+ package.  Starting with dpkg (>= 1.14.18) this package is required
+ for building Debian packages.
+ .
+ This package contains an informational list of packages which are
+ considered essential for building Debian packages.  This package also
+ depends on the packages on that list, to make it easy to have the
+ build-essential packages installed.
+ .
+ If you have this package installed, you only need to install whatever
+ a package specifies as its build-time dependencies to build the
+ package.  Conversely, if you are determining what your package needs
+ to build-depend on, you can always leave out the packages this
+ package depends on.
+ .
+ This package is NOT the definition of what packages are
+ build-essential; the real definition is in the Debian Policy Manual.
+ This package contains merely an informational list, which is all
+ most people need.   However, if this package and the manual disagree,
+ the manual is correct.
diff --git a/debian/cross-targets b/debian/cross-targets
index 3eddf0c..cb095d8 100644
--- a/debian/cross-targets
+++ b/debian/cross-targets
@@ -10,9 +10,6 @@ i386
 #kfreebsd-amd64
 #kfreebsd-i386
 #m68k
-#mipsel
-#mips64
-#mips64el
 powerpc
 #powerpcspe
 #ppc64
diff --git a/debian/cross-targets-mipsen b/debian/cross-targets-mipsen
new file mode 100644
index 0000000..b63aebe
--- /dev/null
+++ b/debian/cross-targets-mipsen
@@ -0,0 +1,12 @@
+mips
+mipsel
+#mipsn32
+#mipsn32el
+mips64
+mips64el
+mipsr6
+mipsr6el
+#mipsn32r6
+#mipsn32r6el
+mips64r6
+mips64r6el
diff --git a/debian/rules b/debian/rules
index 8786a52..6bf7666 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,15 +6,25 @@
 #export DH_VERBOSE=1
 
 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
-
-cross_archs := $(shell grep -v '^\#' debian/cross-targets)
+src_name := $(shell dpkg-parsechangelog -S Source)
+
+ifeq ($(src_name),build-essential)
+  cross_archs := $(shell grep -v '^\#' debian/cross-targets)
+else ifeq ($(src_name),build-essential-mipsen)
+  cross_archs := $(shell grep -v '^\#' debian/cross-targets-mipsen)
+else
+  $(error Unknown src_name)
+endif
 
 build: build-arch build-indep
 build-arch: build-arch-stamp
 build-indep: build-indep-stamp
 
 debian/control: debian/control.in debian/control.cross debian/cross-targets
-	cat debian/control.in > $@
+	sed -e "s/@src_name@/$(src_name)/" debian/control.in > $@
+ifeq ($(src_name),build-essential)
+	cat debian/control.native.in >> $@
+endif
 	for a in $(cross_archs); do \
 	  sed -e "s/@DEB_TARGET_ARCH@/$$a/g" debian/control.cross >> $@; \
 	done
@@ -57,6 +67,7 @@ svnclean: clean
 	rm -rf `svn propget svn:ignore`
 
 install-arch: build-arch
+ifeq ($(src_name),build-essential)
 	dh_testdir
 	dh_testroot
 	dh_prep
@@ -71,6 +82,7 @@ install-arch: build-arch
 	ln -sf	../../build-essential/list \
 		../../build-essential/essential-packages-list \
 		debian/build-essential/usr/share/doc/build-essential
+endif
 
 install-indep: build-indep
 	set -e; \