1
- # This file should be %included into a device specific spec file
1
+ # This file should be %% included into a device specific spec file
2
2
# where macros are defined:
3
3
# device: should be the CM codename
4
4
# vendor: determine the directory used for ./device/<vendor>/<device>
5
5
# device_pretty: User-visible model name of the device
6
6
# vendor_pretty: User-visible manufacturer name of the device
7
+ # hadk_make_target: the target used when running make in the HABUILD_SDK on the OBS. Defaults to "hybris-hal"
7
8
8
9
%define __provides_exclude_from ^%{_libexecdir }/droid -hybris /. *$
9
10
%define android_root .
10
11
%define rel_date %(date +'%%Y%%m%%d%%H%%M' )
11
12
13
+ # On the OBS this package should be built in the i486 scheduler against
14
+ # mer/sailfish *_i486 targets.
15
+ # The prjconf should have an ExportFilter like this (mer/sailfish has this):
16
+ # ExportFilter: \.armv7hl\.rpm$ armv8el
17
+ # We lie about our architecture and allows OBS to cross-publish this 486 cross-built spec to the armv7hl repos
18
+ %define _target_cpu armv7hl
19
+
12
20
# Support build info extracted from OBS builds too
13
21
%if 0 %{?_obs_build_project :1 }
14
22
%define _build_flavour %(echo %{_obs_build_project } | awk -F : '{if (NF == 3) print $3; else if (NF == 2) print strdevel; else print strunknown}' strdevel = devel strunknown = unknown )
@@ -37,10 +45,6 @@ Name: droid-hal-%{device}
37
45
Version : 0.0.6
38
46
Release : %{rel_date }
39
47
Provides : droid -hal
40
- %if %{device } == hammerhead
41
- # Each device that provides files in /etc/ofono should have this provides
42
- Provides : ofono -configs
43
- %endif
44
48
Provides : flash -partition
45
49
# The repo sync service on OBS prepares a 'source tarball' of the rpm
46
50
# dir since we currently have a complex setup with subdirs which OBS
@@ -89,7 +93,7 @@ BuildRequires: sudo-for-abuild
89
93
# ###############
90
94
%package devel
91
95
Group : Development /Tools
92
- # Requires: %{name} = %{version}-%{release}
96
+ # Requires: %% {name} = %% {version}-% %{release}
93
97
Provides : droid -hal -devel
94
98
Summary : Development files for droid -hal device : %{device }
95
99
@@ -249,7 +253,7 @@ cp %{SOURCE40} %{SOURCE0}
249
253
%if 0 %{?_obs_build_project :1 }
250
254
# Hadk style build of android on OBS
251
255
echo Running droid build in HABUILD_SDK
252
- ubu -chroot -r /srv /mer /sdks /ubu "cd %android_root; source build/envsetup.sh; breakfast %{device}; rm -f .repo/local_manifests/roomservice.xml; make hybris-hal"
256
+ ubu -chroot -r /srv /mer /sdks /ubu "cd %android_root; source build/envsetup.sh; breakfast %{device}; rm -f .repo/local_manifests/roomservice.xml; make %{?_smp_mflags} %{?hadk_make_target}%{!?hadk_make_target: hybris-hal} "
253
257
%endif
254
258
255
259
# Make a tmp location for built installables
@@ -384,7 +388,7 @@ mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig/
384
388
mv $HDRS /android -headers . pc $RPM_BUILD_ROOT %{_libdir }/pkgconfig /
385
389
386
390
# If this ever becomes unmanageable then
387
- # grep -l dev/alog %{android_root}/out/target/product/%{device}/system/lib/*
391
+ # grep -l dev/alog %% {android_root}/out/target/product/%{device}/system/lib/*
388
392
# libdsyscalls.so and libc.so are blacklisted
389
393
ln -s .. /system /lib /{liblog . so , libcutils . so } $RPM_BUILD_ROOT %{_libexecdir }/droid -hybris /lib -dev -alog /.
390
394
@@ -400,7 +404,7 @@ cp -a %{SOURCE12} $RPM_BUILD_ROOT/
400
404
401
405
# droid user support This may be better done by passing a list of
402
406
# users/groups and running 'ensure_usergroups_exist newlist oldlist'
403
- # which would preserve oldlist in %post and delete any users no longer
407
+ # which would preserve oldlist in %% post and delete any users no longer
404
408
# needed (unlikely!). This avoids the transient removal of uids and
405
409
# group issues
406
410
install -D tmp /rpmsrc /droid -user -add . sh $RPM_BUILD_ROOT %{_libdir }/droid /droid -user -add . sh
@@ -453,7 +457,7 @@ sed -e 's|%DEVICE%|%{device}|g' \
453
457
-e "s|%ARCH%|%{__isa_name}|g" \
454
458
rpm /ssu /board -mappings . d /05 -sfe . ini . in >$RPM_BUILD_ROOT /%{board_mapping_file }
455
459
456
- # Copy kickstart packs (for %{device}-kickstart-configuration)
460
+ # Copy kickstart packs (for %% {device}-kickstart-configuration)
457
461
mkdir -p $RPM_BUILD_ROOT /%{_datadir }/ssu /kickstart /pack /%{device }
458
462
sed -e 's|@DEVICE@|%{device}|g' rpm /kickstart /pack /package -droid -updater > $RPM_BUILD_ROOT /%{_datadir }/ssu /kickstart /pack /%{device }/package -droid -updater
459
463
# and attachments
0 commit comments