]> git.pld-linux.org Git - packages/xcb-proto.git/blob - xcb-proto.spec
shift python files to python-xcbgen, pacakge python3 variant; rel 2
[packages/xcb-proto.git] / xcb-proto.spec
1 #
2 # Conditional build:
3 %bcond_without  python3 # CPython 3.x module
4
5 Summary:        XML-XCB protocol description files
6 Summary(pl.UTF-8):      Pliki opisu protokołu XML-XCB
7 Name:           xcb-proto
8 Version:        1.14
9 Release:        2
10 License:        MIT
11 Group:          Development/Libraries
12 #Source0:       https://xcb.freedesktop.org/dist/%{name}-%{version}.tar.bz2
13 Source0:        https://xorg.freedesktop.org/releases/individual/proto/%{name}-%{version}.tar.xz
14 # Source0-md5:  4a053ca2456007a343024a0452dbf13b
15 URL:            https://xcb.freedesktop.org/
16 BuildRequires:  libxml2-progs
17 BuildRequires:  python >= 1:2.5
18 %{?with_python3:BuildRequires:  python3}
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.219
21 BuildRequires:  tar >= 1:1.22
22 BuildRequires:  xz
23 Requires:       python >= 1:2.5
24 Requires:       python-xcbgen = %{version}-%{release}
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 xcb-proto provides the XML-XCB protocol descriptions that libxcb uses
29 to generate the majority of its code and API. They are provided
30 separately from libxcb to allow reuse by other projects, such as
31 additional language bindings, protocol dissectors, or documentation
32 generators.
33
34 %description -l pl.UTF-8
35 xcb-proto zawiera opisy protokołu XML-XCB używane przez libxcb do
36 generowania większości swojego kodu i API. Są dostarczane osobno, aby
37 umożliwić wykorzystanie przez inne projekty, takie jak dodatkowe
38 dowiązania dla innych języków, analizatory protokołu czy generatory
39 dokumentacji.
40
41 %package -n python-xcbgen
42 Summary:        Python 2 xcbgen module
43 Summary(pl.UTF-8):      Moduł xcbgen dla Pythona 2
44 Group:          Libraries/Python
45
46 %description -n python-xcbgen
47 Python 2 xcbgen module.
48
49 %description -n python-xcbgen -l pl.UTF-8
50 Moduł xcbgen dla Pythona 2.
51
52 %package -n python3-xcbgen
53 Summary:        Python 3 xcbgen module
54 Summary(pl.UTF-8):      Moduł xcbgen dla Pythona 3
55 Group:          Libraries/Python
56
57 %description -n python3-xcbgen
58 Python 3 xcbgen module.
59
60 %description -n python3-xcbgen -l pl.UTF-8
61 Moduł xcbgen dla Pythona 3.
62
63 %prep
64 %setup -q
65 %if %{with python3}
66 mkdir build3
67 %endif
68 mkdir build2
69
70 %build
71 %if %{with python3}
72 cd build3
73 PYTHON=%{__python3} \
74 ../%configure
75 %{__make}
76 cd ..
77 %endif
78
79 cd build2
80 PYTHON=%{__python} \
81 ../%configure
82 %{__make}
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %if %{with python3}
88 cd build3
89 %{__make} install \
90         DESTDIR=$RPM_BUILD_ROOT
91 cd ..
92 %endif
93
94 cd build2
95 %{__make} install \
96         DESTDIR=$RPM_BUILD_ROOT
97
98 %py_comp $RPM_BUILD_ROOT
99 %py_ocomp $RPM_BUILD_ROOT
100 %py_postclean
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %files
106 %defattr(644,root,root,755)
107 %doc COPYING NEWS README.md TODO doc/xml-xcb.txt
108 %{_datadir}/xcb
109 %{_pkgconfigdir}/xcb-proto.pc
110
111 %files -n python-xcbgen
112 %defattr(644,root,root,755)
113 %{py_sitescriptdir}/xcbgen
114
115 %if %{with python3}
116 %files -n python3-xcbgen
117 %defattr(644,root,root,755)
118 %{py3_sitedir}/xcbgen
119 %endif
This page took 0.049632 seconds and 3 git commands to generate.