diff options
author | MyungJoo Ham <myungjoo.ham@samsung.com> | 2016-12-01 10:54:12 +0900 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2017-02-15 14:59:50 +0900 |
commit | 05565b4bda1657f0ca3c179a92ea496bc558bef3 (patch) | |
tree | 417e9d9a1c6ed22a9cf4684a7ceb5113ec5a00ea | |
parent | 127d454595327326045376415cbd510e0556d1b9 (diff) | |
download | tizen-release-05565b4bda1657f0ca3c179a92ea496bc558bef3.tar.gz tizen-release-05565b4bda1657f0ca3c179a92ea496bc558bef3.tar.bz2 tizen-release-05565b4bda1657f0ca3c179a92ea496bc558bef3.zip |
Remove Profile Build Dependency
- This is for Tizen 4.0.
(4.0 Configurability & Building Block prohibits the usage of
profile macro; the value of "profile" will become "undefined"
unconditionally.)
- Please create JIRA-TRE issue when SR-ing this:
- Add tizen-release-profile_common for common profile
- Add tizen-release-profile_mobile for mobile profile
- Add tizen-release-profile_wearable for wearable profile
- Add tizen-release-profile_tv for tv profile
- Add tizen-release-profile_ivi for ivi profile
Change-Id: I0fcc3c44fe8c069ba7b64c2ee9f43281a9e54c7e
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
-rw-r--r-- | packaging/tizen-release.spec | 139 |
1 files changed, 129 insertions, 10 deletions
diff --git a/packaging/tizen-release.spec b/packaging/tizen-release.spec index 50f025e..15f0b8c 100644 --- a/packaging/tizen-release.spec +++ b/packaging/tizen-release.spec @@ -17,6 +17,9 @@ Provides: system-release = %{version} Provides: tizen-release = %{version} Provides: product() Provides: product(Tizen) = %{version} +BuildRequires: sed +Requires: %{name}-compat = %{version}-%{release} +Recommends: %{name}-profile_common = %{version}-%{release} #HACK Provides: lsb = 4.1 @@ -24,6 +27,62 @@ Provides: lsb = 4.1 %description Tizen release files such as various /etc/ files that define the release. +%package profile_common +Summary: tizen-release configuration for common profile +Provides: %{name}-compat = %{version}-%{release} +Conflicts: %{name}-profile_mobile +Conflicts: %{name}-profile_wearable +Conflicts: %{name}-profile_tv +Conflicts: %{name}-profile_ivi +%description profile_common +Tizen release files specific for common profile. +You need to install %{name} after this. + +%package profile_mobile +Summary: tizen-release configuration for mobile profile +Provides: %{name}-compat = %{version}-%{release} +Conflicts: %{name}-profile_common +Conflicts: %{name}-profile_wearable +Conflicts: %{name}-profile_tv +Conflicts: %{name}-profile_ivi +%description profile_mobile +Tizen release files specific for mobile profile. +You need to install %{name} after this. + +%package profile_wearable +Summary: tizen-release configuration for wearable profile +Provides: %{name}-compat = %{version}-%{release} +Conflicts: %{name}-profile_mobile +Conflicts: %{name}-profile_common +Conflicts: %{name}-profile_tv +Conflicts: %{name}-profile_ivi +%description profile_wearable +Tizen release files specific for wearable profile. +You need to install %{name} after this. + +%package profile_tv +Summary: tizen-release configuration for tv profile +Provides: %{name}-compat = %{version}-%{release} +Conflicts: %{name}-profile_mobile +Conflicts: %{name}-profile_wearable +Conflicts: %{name}-profile_common +Conflicts: %{name}-profile_ivi +%description profile_tv +Tizen release files specific for tv profile. +You need to install %{name} after this. + +%package profile_ivi +Summary: tizen-release configuration for ivi profile +Provides: %{name}-compat = %{version}-%{release} +Conflicts: %{name}-profile_mobile +Conflicts: %{name}-profile_wearable +Conflicts: %{name}-profile_tv +Conflicts: %{name}-profile_common +%description profile_ivi +Tizen release files specific for ivi profile. +You need to install %{name} after this. + + %prep %define release_type_default eng @@ -71,7 +130,7 @@ CPE_NAME="cpe:/o:tizen:tizen:%{tizen_full_version}" EOF mkdir -p %{buildroot}%{_sysconfdir}/products.d -cat >%{buildroot}%{_sysconfdir}/products.d/tizen.prod << EOF +cat >%{buildroot}%{_sysconfdir}/products.d/tizen.prod.proto << EOF <?xml version="1.0" encoding="UTF-8"?> <product schemeversion="0"> <vendor>Tizen.org</vendor> @@ -116,7 +175,7 @@ cat >%{buildroot}%{_sysconfdir}/products.d/tizen.prod << EOF <urls> <url name="releasenotes">http://www.tizen.org</url> <url name="register">http://www.tizen.org/</url> - <url name="repository">https://download.tizen.org/snapshots/tizen/%{profile}/latest/repos/%{_repository}/packages/%{_tarch}/</url> + <url name="repository">https://download.tizen.org/snapshots/tizen/__PROFILEMACRO__/latest/repos/%{_repository}/packages/%{_tarch}/</url> </urls> <buildconfig> <producttheme>Tizen</producttheme> @@ -132,6 +191,11 @@ cat >%{buildroot}%{_sysconfdir}/products.d/tizen.prod << EOF EOF +pushd %{buildroot}%{_sysconfdir}/products.d +for P in mobile wearable tv ivi common; do sed "s|__PROFILEMACRO__|$P|" < tizen.prod.proto > tizen.prod.$P; done +rm tizen.prod.proto +popd + # this is a base product, create symlink ln -s tizen.prod %{buildroot}%{_sysconfdir}/products.d/baseproduct @@ -139,14 +203,14 @@ ln -s tizen.prod %{buildroot}%{_sysconfdir}/products.d/baseproduct # generate tizen-build.conf -cat > %{buildroot}%{_sysconfdir}/tizen-build.conf <<'EOF' +cat > %{buildroot}%{_sysconfdir}/tizen-build.conf.proto <<'EOF' TZ_BUILD_RELEASE_NAME="%{release_name}" TZ_BUILD_VERSION=%{tizen_version} TZ_BUILD_FULLVER=%{tizen_full_version} TZ_BUILD_RELEASE_TYPE=%{release_type} TZ_BUILD_VARIANT=%{build_variant} -TZ_BUILD_PROFILE=%{profile} +TZ_BUILD_PROFILE=__PROFILEMACRO__ TZ_BUILD_PROJECT=%{_project} TZ_BUILD_VENDOR=%{vendor} TZ_BUILD_REPO=%{_repository} @@ -158,10 +222,10 @@ TZ_BUILD_TIME=@BUILD_TIME@ TZ_BUILD_TS=@BUILD_TS@ TZ_BUILD_URL=http://download.tizen.org -TZ_BUILD_SNAPSHOT_URL=${TZ_BUILD_URL}/snapshots/tizen/%{profile}/ -TZ_BUILD_DAILY_URL=${TZ_BUILD_URL}/releases/daily/tizen/%{profile}/ -TZ_BUILD_WEEKLY_URL=${TZ_BUILD_URL}/releases/weekly/tizen/%{profile}/ -TZ_BUILD_MILESTONE_URL=${TZ_BUILD_URL}/releases/milestone/tizen/%{profile}/ +TZ_BUILD_SNAPSHOT_URL=${TZ_BUILD_URL}/snapshots/tizen/__PROFILEMACRO__/ +TZ_BUILD_DAILY_URL=${TZ_BUILD_URL}/releases/daily/tizen/__PROFILEMACRO__/ +TZ_BUILD_WEEKLY_URL=${TZ_BUILD_URL}/releases/weekly/tizen/__PROFILEMACRO__/ +TZ_BUILD_MILESTONE_URL=${TZ_BUILD_URL}/releases/milestone/tizen/__PROFILEMACRO__/ TZ_BUILD_WITH_MESA=%{?_with_mesa} TZ_BUILD_WITH_WAYLAND=%{?_with_wayland} @@ -171,10 +235,65 @@ TZ_BUILD_WITH_EMULATOR=%{?_with_emulator} EOF +pushd %{buildroot}%{_sysconfdir} +for P in mobile wearable tv ivi common; do sed "s|__PROFILEMACRO__|$P|" < tizen-build.conf.proto > tizen-build.conf.$P; done +rm tizen-build.conf.proto +popd + %files %config %attr(0644,root,root) %{_sysconfdir}/tizen-release %config %attr(0644,root,root) %{_sysconfdir}/os-release -%config %attr(0444,root,root) %{_sysconfdir}/tizen-build.conf %{_sysconfdir}/system-release -%{_sysconfdir}/products.d +%{_sysconfdir}/products.d/baseproduct + +%post profile_common +ln -sf tizen.prod.common %{_sysconfdir}/products.d/tizen.prod +ln -sf tizen-build.conf.common %{_sysconfdir}/tizen-build.conf +%preun profile_common +rm %{_sysconfdir}/products.d/tizen.prod +rm %{_sysconfdir}/tizen-build.conf +%files profile_common +%{_sysconfdir}/products.d/tizen.prod.common +%config %attr(0444,root,root) %{_sysconfdir}/tizen-build.conf.common + +%post profile_mobile +ln -sf tizen.prod.mobile %{_sysconfdir}/products.d/tizen.prod +ln -sf tizen-build.conf.mobile %{_sysconfdir}/tizen-build.conf +%preun profile_mobile +rm %{_sysconfdir}/products.d/tizen.prod +rm %{_sysconfdir}/tizen-build.conf +%files profile_mobile +%{_sysconfdir}/products.d/tizen.prod.mobile +%config %attr(0444,root,root) %{_sysconfdir}/tizen-build.conf.mobile + +%post profile_wearable +ln -sf tizen.prod.wearable %{_sysconfdir}/products.d/tizen.prod +ln -sf tizen-build.conf.wearable %{_sysconfdir}/tizen-build.conf +%preun profile_wearable +rm %{_sysconfdir}/products.d/tizen.prod +rm %{_sysconfdir}/tizen-build.conf +%files profile_wearable +%{_sysconfdir}/products.d/tizen.prod.wearable +%config %attr(0444,root,root) %{_sysconfdir}/tizen-build.conf.wearable + +%post profile_tv +ln -sf tizen.prod.tv %{_sysconfdir}/products.d/tizen.prod +ln -sf tizen-build.conf.tv %{_sysconfdir}/tizen-build.conf +%preun profile_tv +rm %{_sysconfdir}/products.d/tizen.prod +rm %{_sysconfdir}/tizen-build.conf +%files profile_tv +%{_sysconfdir}/products.d/tizen.prod.tv +%config %attr(0444,root,root) %{_sysconfdir}/tizen-build.conf.tv + +%post profile_ivi +ln -sf tizen.prod.ivi %{_sysconfdir}/products.d/tizen.prod +ln -sf tizen-build.conf.ivi %{_sysconfdir}/tizen-build.conf +%preun profile_ivi +rm %{_sysconfdir}/products.d/tizen.prod +rm %{_sysconfdir}/tizen-build.conf +%files profile_ivi +%{_sysconfdir}/products.d/tizen.prod.ivi +%config %attr(0444,root,root) %{_sysconfdir}/tizen-build.conf.ivi + |