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