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