]>
Commit | Line | Data |
---|---|---|
c0a97864 ER |
1 | # |
2 | # Conditional build: | |
d01b1cd9 | 3 | %bcond_with tests # build without tests |
8eebf2c2 | 4 | %bcond_with python3 # build with python 3.x |
c0a97864 | 5 | |
f33fa229 AM |
6 | %define gitrev e87d37d6 |
7 | %define rel 1 | |
c0a97864 | 8 | Summary: Generate Your Projects |
ba2c7f2a | 9 | Summary(pl.UTF-8): GYP (Generate Your Projects) - narzędzie do generowania systemów budowania |
c0a97864 | 10 | Name: gyp |
e1338491 ER |
11 | # grep version= setup.py |
12 | Version: 0.1 | |
f33fa229 | 13 | Release: 1.%{rel}.%{gitrev} |
c0a97864 ER |
14 | License: New BSD |
15 | Group: Development/Building | |
b5cae1dc | 16 | # use get-source.sh |
f33fa229 AM |
17 | Source0: %{name}-%{version}-git%{gitrev}.tar.xz |
18 | # Source0-md5: 9b6f6c10bb8def91e26c17f0be1f7f90 | |
19 | Patch0: gyp-rpmoptflags.patch | |
20 | Patch1: gyp-ninja-build.patch | |
21 | Patch2: gyp-python3.patch | |
22 | Patch3: gyp-python38.patch | |
23 | Patch4: gyp-fix-cmake.patch | |
24 | Patch5: gyp-python39.patch | |
f78d47c3 | 25 | URL: https://gyp.gsrc.io/ |
c5734287 MK |
26 | %{!?with_python3:BuildRequires: python-devel} |
27 | %{?with_python3:BuildRequires: python3-devel} | |
c0a97864 ER |
28 | BuildRequires: rpm-pythonprov |
29 | BuildRequires: rpmbuild(macros) >= 1.219 | |
c5734287 MK |
30 | %{!?with_python3:Requires: python-%{name} = %{version}-%{release}} |
31 | %{?with_python3:Requires: python3-%{name} = %{version}-%{release}} | |
c0a97864 ER |
32 | BuildArch: noarch |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
36 | GYP is a tool to generates native Visual Studio, Xcode and SCons | |
37 | and/or make build files from a platform-independent input format. It's | |
38 | syntax is a universal cross-platform build representation that still | |
39 | allows sufficient per-platform flexibility to accommodate | |
40 | irreconcilable differences. | |
41 | ||
ba2c7f2a JB |
42 | %description -l pl.UTF-8 |
43 | GYP to narzędzie generujące natywne pliki budowania dla Visual Studio, | |
44 | Xcode, SCons i/lub make'a z formatu wejściowego niezależnego od | |
45 | platformy. Składnia jest uniwersalną, wieloplatformową reprezentacją | |
46 | reguł, która nadal pozwala na wystarczającą elastyczność dla | |
47 | poszczególnych platform, aby obsłużyć różnice między nimi. | |
48 | ||
593a2a50 | 49 | %package -n python-%{name} |
ba2c7f2a JB |
50 | Summary: Python modules for GYP |
51 | Summary(pl.UTF-8): Moduły Pythona module dla GYP | |
593a2a50 ER |
52 | Group: Development/Languages/Python |
53 | ||
54 | %description -n python-%{name} | |
55 | GYP is a tool to generates native Visual Studio, Xcode and SCons | |
56 | and/or make build files from a platform-independent input format. It's | |
57 | syntax is a universal cross-platform build representation that still | |
58 | allows sufficient per-platform flexibility to accommodate | |
ba2c7f2a JB |
59 | poszczególnych platform, aby obsłużyć różnice między nimi. |
60 | ||
61 | This package contains Python modules. | |
62 | ||
63 | %description -n python-%{name} -l pl.UTF-8 | |
64 | GYP to narzędzie generujące natywne pliki budowania dla Visual Studio, | |
65 | Xcode, SCons i/lub make'a z formatu wejściowego niezależnego od | |
66 | platformy. Składnia jest uniwersalną, wieloplatformową reprezentacją | |
67 | reguł, która nadal pozwala na wystarczającą elastyczność dla | |
68 | poszczególnych platform, aby obsłużyć różnice między nimi. | |
69 | ||
70 | Ten pakiet zawiera moduły Pythona. | |
593a2a50 | 71 | |
c5734287 MK |
72 | %package -n python3-%{name} |
73 | Summary: Python modules for GYP | |
74 | Summary(pl.UTF-8): Moduły Pythona module dla GYP | |
75 | Group: Development/Languages/Python | |
76 | ||
77 | %description -n python3-%{name} | |
78 | GYP is a tool to generates native Visual Studio, Xcode and SCons | |
79 | and/or make build files from a platform-independent input format. It's | |
80 | syntax is a universal cross-platform build representation that still | |
81 | allows sufficient per-platform flexibility to accommodate | |
82 | poszczególnych platform, aby obsłużyć różnice między nimi. | |
83 | ||
84 | This package contains Python modules. | |
85 | ||
86 | %description -n python3-%{name} -l pl.UTF-8 | |
87 | GYP to narzędzie generujące natywne pliki budowania dla Visual Studio, | |
88 | Xcode, SCons i/lub make'a z formatu wejściowego niezależnego od | |
89 | platformy. Składnia jest uniwersalną, wieloplatformową reprezentacją | |
90 | reguł, która nadal pozwala na wystarczającą elastyczność dla | |
91 | poszczególnych platform, aby obsłużyć różnice między nimi. | |
92 | ||
93 | Ten pakiet zawiera moduły Pythona. | |
94 | ||
c0a97864 | 95 | %prep |
f33fa229 AM |
96 | %setup -q -c |
97 | %patch0 -p1 | |
98 | %patch1 -p1 | |
99 | %patch2 -p1 | |
100 | %patch3 -p1 | |
101 | %patch4 -p1 | |
102 | %patch5 -p1 | |
c0a97864 ER |
103 | |
104 | %build | |
c5734287 MK |
105 | %if %{with python3} |
106 | %py3_build | |
107 | %else | |
54b7c2c7 | 108 | %py_build |
c5734287 | 109 | %endif |
c0a97864 | 110 | |
d01b1cd9 ER |
111 | %{?with_tests:%{__python} gyptest.py -a} |
112 | ||
c0a97864 ER |
113 | %install |
114 | rm -rf $RPM_BUILD_ROOT | |
54b7c2c7 | 115 | |
c5734287 MK |
116 | %if %{with python3} |
117 | %py3_install | |
118 | %else | |
54b7c2c7 | 119 | %py_install |
c0a97864 | 120 | %py_postclean |
c5734287 | 121 | %endif |
c0a97864 ER |
122 | |
123 | %clean | |
124 | rm -rf $RPM_BUILD_ROOT | |
125 | ||
126 | %files | |
127 | %defattr(644,root,root,755) | |
d01b1cd9 | 128 | %doc AUTHORS LICENSE |
c0a97864 | 129 | %attr(755,root,root) %{_bindir}/gyp |
593a2a50 | 130 | |
c5734287 | 131 | %if !%{with python3} |
593a2a50 | 132 | %files -n python-%{name} |
7f23d1d9 | 133 | %defattr(644,root,root,755) |
c0a97864 ER |
134 | %dir %{py_sitescriptdir}/gyp |
135 | %dir %{py_sitescriptdir}/gyp/generator | |
136 | %{py_sitescriptdir}/gyp/*.py[co] | |
137 | %{py_sitescriptdir}/gyp/generator/*.py[co] | |
c0a97864 | 138 | %if "%{py_ver}" > "2.4" |
ba2c7f2a | 139 | %{py_sitescriptdir}/gyp-%{version}-py*.egg-info |
c0a97864 | 140 | %endif |
c5734287 | 141 | %endif |
368464aa MK |
142 | |
143 | %if %{with python3} | |
144 | %files -n python3-%{name} | |
145 | %defattr(644,root,root,755) | |
146 | %dir %{py3_sitescriptdir}/gyp | |
147 | %dir %{py3_sitescriptdir}/gyp/generator | |
148 | %{py3_sitescriptdir}/gyp/*.py | |
149 | %{py3_sitescriptdir}/gyp/__pycache__ | |
150 | %{py3_sitescriptdir}/gyp/generator/*.py | |
151 | %{py3_sitescriptdir}/gyp/generator/__pycache__ | |
152 | %{py3_sitescriptdir}/gyp-%{version}-py*.egg-info | |
153 | %endif |