File xproto.spec of Package xproto
%define realname xproto
%define realver 7.0.31
%define srcext tar.bz2
# turn off the generation of debuginfo rpm (RH9) ??
%global debug_package %{nil}
# Common info
Name: %{realname}
Version: %{realver}
Release: wiz%{?extraver:0.}1%{?dist}
License: MIT
Group: Development/Languages/C and C++
URL: http://cgit.freedesktop.org/xorg/proto/x11proto
Summary: X Window System Core Protocol
# Build-time parameters
BuildRequires: pkgconfig
BuildRequires: pkgconfig(xorg-macros) >= 1.12
BuildRoot: %{_tmppath}/%{name}-root
Source: https://www.x.org/releases/individual/proto/%{realname}-%{realver}%{?extraver}.%{srcext}
%description
This package provides the headers and specification documents defining
the X Window System Core Protocol, Version 11.
It also includes a number of headers that aren't purely protocol related,
but are depended upon by many other X Window System packages to provide
common definitions and porting layer.
%package devel
Group: Development/Languages/C and C++
Summary: X Window System Core Protocol
Provides: %{realname} = %{version}
%description devel
This package provides the headers and specification documents defining
the X Window System Core Protocol, Version 11.
It also includes a number of headers that aren't purely protocol related,
but are depended upon by many other X Window System packages to provide
common definitions and porting layer.
# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{realver}%{?extraver}
%build
%configure \
--disable-static \
CFLAGS="%{optflags} %{?gcc_lto}" \
CXXFLAGS="%{optflags} %{?gcc_lto}" \
LDFLAGS="-Wl,--as-needed -Wl,--strip-all %{?gcc_lto}"
%{__make} %{?_smp_mflags}
%install
%{__make} install DESTDIR=%{buildroot}
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}%{_datadir}/doc
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
# Development stuff
%files devel
%defattr(-,root,root)
%doc AUTHORS COPYING README
%{_libdir}/pkgconfig/%{name}.pc
%dir %{_includedir}/X11
%{_includedir}/X11/*.h
%changelog