%define githash e87d37d6 Summary: Generate Your Projects Name: gyp Version: 0.1 Release: 4.git%{githash}%{?_dist_release} Group: Development/Tools Vendor: Project Vine Distribution: Vine Linux Packager: iwaim License: BSD URL: https://gyp.gsrc.io # 1. git clone https://chromium.googlesource.com/external/gyp # 2. cd gyp # 3. version=$(grep version= setup.py|cut -d\' -f2) # 4. revision=$(git log --oneline|head -1|cut -d' ' -f1) # 5. cd .. # 6. tar -a --exclude-vcs -cf gyp-$version-git$revision.tar.xz gyp Source0: %{name}-%{version}-git%{githash}.tar.xz Patch0: gyp-rpmoptflags.patch Patch1: gyp-ninja-build.patch Patch2: gyp-python3.patch Patch3: gyp-python38.patch Patch4: gyp-fix-cmake.patch Patch5: gyp-python39.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-rpm-macros BuildRequires: python3-setuptools BuildRequires: ninja Requires: python3 Requires: python3-setuptools %description GYP is a tool to generates native Visual Studio, Xcode and SCons and/or make build files from a platform-independent input format. Its syntax is a universal cross-platform build representation that still allows sufficient per-platform flexibility to accommodate irreconcilable differences. %prep %setup -q -n %{name} %autopatch -p1 for i in $(find pylib -name '*.py'); do sed -e '\,#![ \t]*/.*python,{d}' $i > $i.new && touch -r $i $i.new && mv $i.new $i done %build %py3_build %install %{__rm} -rf %{buildroot} %py3_install %check %{__python3} gyptest.py test/hello/gyptest-all.py %clean %{__rm} -rf %{buildroot} %files %defattr(-,root,root,-) %license LICENSE %doc AUTHORS %{_bindir}/gyp %{python3_sitelib}/* %changelog * Tue May 05 2020 Tomohiro "Tomo-p" KATO 0.1-4.gite87d37d6 - updated to git HEAD. - import Patch1-5 from rawhide. - switch to python3. * Fri Mar 22 2013 Daisuke SUZUKI 1.0.46-1 - update to svn r1569 * Sun Feb 19 2012 Yoji TOYODA 0.1-2.svn827 - rebuild with python-2.7.2 * Fri Jun 4 2010 IWAI, Masaharu 0.1-1.svn827 - Initial build.