File: rules

package info (click to toggle)
android-platform-frameworks-base 1:8.1.0+r23-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 179,108 kB
  • sloc: java: 783,264; cpp: 234,851; xml: 204,638; python: 2,837; ansic: 366; sh: 274; makefile: 43; sed: 19
file content (57 lines) | stat: -rwxr-xr-x 2,465 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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk

# See https://android.googlesource.com/platform/development/+/master/sdk/build_tools_source.prop_template
export ANDROID_BUILD_TOOLS_VERSION = 27.0.1
export DEB_HOST_MULTIARCH
export DEB_CPPFLAGS_MAINT_APPEND = -DNDEBUG -I/usr/include/android
export DEB_LDFLAGS_MAINT_APPEND = -fPIC

debian/out/aapt: debian/aapt.mk debian/out/libaapt.so
	dh_auto_build --buildsystem=makefile -- -f $<

debian/out/aapt2: debian/aapt2.mk debian/out/libandroidfw.so
	dh_auto_build --buildsystem=makefile -- -f $<

debian/out/libaapt.so: debian/libaapt.mk debian/out/libandroidfw.so
	dh_auto_build --buildsystem=makefile -- -f $<

debian/out/libandroidfw.so: debian/libandroidfw.mk
	dh_auto_build --buildsystem=makefile -- -f $<

debian/out/split-select: debian/split-select.mk debian/out/libandroidfw.so debian/out/libaapt.so
	dh_auto_build --buildsystem=makefile -- -f $<

%:
	dh $@ --with bash-completion

override_dh_auto_build-arch: debian/out/aapt debian/out/aapt2 debian/out/split-select
	mkdir --parent debian/out
	pandoc -s -o debian/out/split-select.1 debian/split-select.1.md

override_dh_auto_build-indep: debian/out/aapt2
	mkdir --parents debian/out
	cp /usr/lib/$(DEB_HOST_MULTIARCH)/android/*.so.0 debian/out
	ln -s /usr/lib/p7zip/7z.so debian/out/7z.so
	chrpath --replace debian/out debian/out/aapt2
	debian/out/aapt2 compile --dir core/res/res \
				-o debian/out/resources.zip
	debian/out/aapt2 link --manifest core/res/AndroidManifest.xml \
				debian/out/resources.zip \
				-o debian/out/framework-res.apk \
				-A core/res/assets \
				--min-sdk-version 27 --target-sdk-version 27 \
				--product default \
				--version-code 27 --version-name 8.1.0 \				
	chrpath --replace /usr/lib/$(DEB_HOST_MULTIARCH)/android debian/out/aapt2

get-orig-source: $(subst android-platform-,,$(DEB_SOURCE)).tar.gz
	mkdir -p $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)
	tar -f $< -x --gzip --directory $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)
	(cd $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM); tar --create --xz -f ../../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz --exclude-from ../debian/orig.excludes --mtime=20121221 *)
	$(RM) -r $(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM)

$(subst android-platform-,,$(DEB_SOURCE)).tar.gz:
	wget https://android.googlesource.com/platform/$(subst -,/,$(subst android-platform-,,$(DEB_SOURCE)))/+archive/android-$(subst +,_,$(DEB_VERSION_UPSTREAM)).tar.gz -O $@