Files
xinit/xinit.spec
Stefan Dirsch 15f27176ad - Update to version 1.4.4
This release fixes regresssions introduced by the shell script modernization
  in the 1.4.3 release, primarily seen on systems without the "mcookie" helper
  program to make xauth cookies, and thus using openssl or /dev/urandom to
  make cookies instead.  Thanks to Peter Tribble of the Tribblix illumos distro
  for reporting the issue and testing the fixes.
- adjusted xinit-suse.patch, xinit-tolerant-hostname-changes.patch

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xinit?expand=0&rev=75
2025-03-09 22:51:29 +00:00

132 lines
3.8 KiB
RPMSpec

#
# spec file for package xinit
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if 0%{?suse_version} >= 1550
%define UsrEtcMove 1
%endif
Name: xinit
Version: 1.4.4
Release: 0
Summary: X Window System initializer
License: MIT
Group: System/X11/Utilities
URL: https://xorg.freedesktop.org/
Source0: https://xorg.freedesktop.org/releases/individual/app/%{name}-%{version}.tar.xz
Source1: xinit.tar.bz2
Source2: keygen.c
Source3: keygen.1
Patch0: xinit.diff
Patch1: xinit-client-session.patch
Patch2: xinit-suse.patch
Patch3: xinit-tolerant-hostname-changes.patch
Patch5: xinit-tarball.patch
# needed for patch0
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xorg-macros) >= 1.8
BuildRequires: pkgconfig(xproto) >= 7.0.17
Requires: setxkbmap
Requires: xauth
Requires: xmodmap
Requires: xrdb
Requires: xsetroot
# This was part of the xorg-x11 package up to version 7.6
Conflicts: xorg-x11 <= 7.6
%if 0%{?suse_version} > 1320
Requires: xterm-bin
%else
Requires: xterm
%endif
%description
The xinit program is used to start the X Window System server and a
first client program on systems that are not using a display manager
such as xdm or in environments that use multiple window systems.
When this first client exits, xinit will kill the X server and then
terminate.
%prep
%setup -q
%if 0%{?UsrEtcMove}
sed -i 's+%{_sysconfdir}/X11+%{_libexecdir}+' %{PATCH0}
%endif
%patch -P 0
%patch -P 1 -p1
### patches are applied later in %install section
#patch -P 2 -p1
#patch -P 3 -p1
#patch -P 5 -p0
# needed for patch0
autoreconf -fi
%build
%if 0%{?UsrEtcMove}
%configure --with-xinitdir=%{_libexecdir}/xinit
%else
%configure
%endif
%make_build
gcc %{optflags} -o keygen %{SOURCE2}
%install
patch -p1 < %{PATCH2}
patch -p1 < %{PATCH3}
%make_install
install -m 0644 %{SOURCE3} %{buildroot}%{_mandir}/man1
install -m 0711 keygen %{buildroot}%{_bindir}/keygen
cd %{buildroot}
tar -xf %{SOURCE1}
%if 0%{?UsrEtcMove}
patch -p0 < %{PATCH5}
mkdir -p %{buildroot}%{_libexecdir}/xinit
mv etc/X11/xinit/{xinitrc,xserverrc} %{buildroot}%{_libexecdir}/xinit
mkdir -p usr%{_sysconfdir}/X11/xinit/xinitrc.d
mv etc/X11/Xresources usr%{_sysconfdir}/X11
mv etc/X11/xinit/xinitrc.common usr%{_sysconfdir}/X11/xinit
# Compatibility symlink for user xinitrc files
ln -s %{_prefix}%{_sysconfdir}/X11/xinit/xinitrc.common etc/X11/xinit/xinitrc.common
rmdir etc/X11/xinit/xinitrc.d
%endif
%files
%license COPYING
%doc ChangeLog README.md
%if 0%{?UsrEtcMove}
%dir %{_distconfdir}/X11
%{_distconfdir}/X11/xinit/
%{_distconfdir}/X11/Xresources
%dir %{_libexecdir}/xinit
%attr(0755,root,root) %{_libexecdir}/xinit/xinitrc
%attr(0755,root,root) %{_libexecdir}/xinit/xserverrc
%dir %{_sysconfdir}/X11/xinit/
%config %{_sysconfdir}/X11/xinit/xinitrc.common
%else
%config %{_sysconfdir}/X11/xinit/
%config %{_sysconfdir}/X11/Xresources
%endif
%{_bindir}/keygen
%{_bindir}/startx
%{_bindir}/xinit
%{_mandir}/man1/keygen.1%{?ext_man}
%{_mandir}/man1/startx.1%{?ext_man}
%{_mandir}/man1/xinit.1%{?ext_man}
%changelog