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