Add packaging files for build 85/256185/1 accepted/tizen_6.5_base accepted/tizen_7.0_base accepted/tizen_7.0_base_hotfix accepted/tizen_8.0_base accepted/tizen_base accepted/tizen_base_dev tizen_6.5_base tizen_7.0_base tizen_7.0_base_hotfix tizen_8.0_base tizen_base accepted/tizen/6.5/base/20211028.055705 accepted/tizen/7.0/base/20221116.025843 accepted/tizen/7.0/base/hotfix/20221116.055251 accepted/tizen/8.0/base/20231005.044724 accepted/tizen/base/20210331.052318 accepted/tizen/base/20221115.103720 accepted/tizen/base/dev/20230602.080804 submit/tizen_6.5_base/20211028.134101 submit/tizen_base/20210331.021148 submit/tizen_base/20210331.043445 submit/tizen_base/20210331.044939 tizen_6.5.m2_release tizen_7.0_m2_release tizen_8.0_m2_release
authorJinWang An <jinwang.an@samsung.com>
Tue, 30 Mar 2021 12:54:48 +0000 (21:54 +0900)
committerJinWang An <jinwang.an@samsung.com>
Tue, 30 Mar 2021 12:54:48 +0000 (21:54 +0900)
Change-Id: I4b02711c345b0f6ad18101d7c3e9be86bbae6675
Signed-off-by: JinWang An <jinwang.an@samsung.com>
packaging/gn.manifest [new file with mode: 0644]
packaging/gn.spec [new file with mode: 0644]

diff --git a/packaging/gn.manifest b/packaging/gn.manifest
new file mode 100644 (file)
index 0000000..81ace0c
--- /dev/null
@@ -0,0 +1,6 @@
+<manifest>
+       <request>
+               <domain name="_"/>
+       </request>
+</manifest>
+
diff --git a/packaging/gn.spec b/packaging/gn.spec
new file mode 100644 (file)
index 0000000..d30134f
--- /dev/null
@@ -0,0 +1,73 @@
+#
+# spec file for package gn
+#
+# Copyright (c) 2020 SUSE LLC
+#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
+#
+
+Name:           gn
+Version:        20210313
+Release:        0
+Summary:        A meta-build system that generates build files for Ninja
+License:        BSD-3-Clause
+URL:            https://gn.googlesource.com/
+#Source:         https://dev.gentoo.org/~floppym/dist/%{name}-%{version}.tar.xz
+Source0:    %{name}-%{version}.tar.gz
+Source1001:     gn.manifest
+BuildRequires:  gcc-c++
+BuildRequires:  ninja
+BuildRequires:  python3-base
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+%description
+GN is a meta-build system that generates build files for Ninja.
+
+%prep
+%setup -q
+
+%build
+cp %{SOURCE1001} .
+export CC=gcc
+export CXX=g++
+export AR=ar
+export CXXFLAGS="%{optflags}"
+
+# bootstrap
+python3 build/gen.py \
+  --no-strip \
+  --no-last-commit-position \
+  --no-static-libstdc++
+PV=%{version}
+cat >out/last_commit_position.h <<-EOF
+       #ifndef OUT_LAST_COMMIT_POSITION_H_
+       #define OUT_LAST_COMMIT_POSITION_H_
+       #define LAST_COMMIT_POSITION_NUM ${PV##0.}
+       #define LAST_COMMIT_POSITION "${PV}"
+       #endif  // OUT_LAST_COMMIT_POSITION_H_
+EOF
+
+ninja -C out %{?_smp_mflags} gn
+
+%check
+ninja -C out %{?_smp_mflags} gn_unittests
+./out/gn_unittests
+
+%install
+install -Dm 0755 out/%{name} %{buildroot}%{_bindir}/%{name}
+
+%files
+%license LICENSE
+%{_bindir}/%{name}
+
+%changelog