# TODO
-# - revisit subpackages
-# - fix: Requires: /bin/bash
# - integrate with geninitrd
-# - pldize recent update
+# - pldize recent update (r1.18)
+# - verify if systemd services have to be installed for targets,
+# and remove the symlinks if not
+#
+# Conditional build:
+%bcond_without drm_intel # disable building with libdrm_intel support
+%bcond_without drm_radeon # disable building with libdrm_radeon support
+%bcond_with drm_nouveau # enable building with libdrm_nouveau support
+%bcond_without kms # disable building with libkms support
+
Summary: Graphical Boot Animation and Logger
Summary(pl.UTF-8): Graficzna animacja i logowanie startu systemu
Name: plymouth
-Version: 0.8.4
-Release: 1
+Version: 0.8.8
+Release: 2
License: GPL v2+
Group: Base
Source0: http://www.freedesktop.org/software/plymouth/releases/%{name}-%{version}.tar.bz2
-# Source0-md5: 6f370cd69bd6d0c67657d243a99dc260
+# Source0-md5: 38f5e613e5ab17806b950cee2d0d0d4e
Source1: %{name}-logo.png
# Source1-md5: 6b38a868585adfd3a96a4ad16973c1f8
Source2: %{name}.tmpfiles
Source4: boot-duration
Source5: %{name}-set-default-plugin
Source6: %{name}-update-initrd
-Patch0: check_for_consoles.patch
+Source7: systemd-ask-password-plymouth.path
+Source8: systemd-ask-password-plymouth.service
+Patch0: text-colors.patch
+Patch1: path-udevadm.patch
URL: http://www.freedesktop.org/wiki/Software/Plymouth
-#BuildRequires: autoconf >= 2.50
-#BuildRequires: automake
BuildRequires: cairo-devel
BuildRequires: gtk+2-devel >= 2:2.12.0
+%if %{with drm_intel} || %{with drm_radeon} || %{with drm_nouveau} || %{with kms}
BuildRequires: libdrm-devel
-BuildRequires: libpng-devel >= 1.2.16
-#BuildRequires: libtool >= 2:2.0
+%endif
+BuildRequires: libpng-devel >= 2:1.2.16
BuildRequires: pango-devel >= 1:1.21.0
BuildRequires: pkgconfig
Requires: %{name}-graphics-libs = %{version}-%{release}
Requires(post): %{name}-scripts = %{version}-%{release}
+Requires: /etc/os-release
+Requires: systemd-units
Obsoletes: plymouth-gdm-hooks
Obsoletes: plymouth-utils
+Obsoletes: systemd-plymouth
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define plymouthdaemon_execdir /sbin
Requires: %{name}(system-theme) = %{version}-%{release}
Provides: %{name}-system-plugin = %{version}-%{release}
Obsoletes: plymouth-system-plugin < %{version}-%{release}
-Obsoletes: rhgb < 1:10.0.0
%description system-theme
This metapackage tracks the current distribution default theme.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
# Change the default theme
sed -i -e 's/fade-in/charge/g' src/plymouthd.defaults
%build
%configure \
+ %{__enable_disable drm_intel libdrm_intel} \
+ %{__enable_disable drm_radeon libdrm_radeon} \
+ %{__enable_disable drm_nouveau libdrm_nouveau} \
+ %{__enable_disable kms libkms} \
--disable-silent-rules \
--disable-static \
--disable-tests \
- --enable-gdm-transition \
+ --disable-gdm-transition \
--enable-systemd-integration \
--enable-tracing \
- --with-background-start-color-stop=0x003194 \
- --with-background-end-color-stop=0x000063 \
- --with-background-color=0x0063c6 \
+ --without-rhgb-compat-link \
+ --with-background-start-color-stop=0x009431 \
+ --with-background-end-color-stop=0x006300 \
+ --with-background-color=0x00c663 \
--with-logo=%{_pixmapsdir}/plymouth-logo.png \
+ --with-release-file=/etc/os-release \
--with-system-root-install
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_pixmapsdir},%{systemdtmpfilesdir}}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_pixmapsdir},%{systemdtmpfilesdir}}
+
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_pixmapsdir}/plymouth-logo.png
cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
+cp -p %{SOURCE7} $RPM_BUILD_ROOT%{systemdunitdir}/systemd-ask-password-plymouth.path
+cp -p %{SOURCE8} $RPM_BUILD_ROOT%{systemdunitdir}/systemd-ask-password-plymouth.service
+
+# install plymouth services for targets
+# http://cgit.freedesktop.org/systemd/systemd/commit/?id=26cbf29c52a36b6ad9d1ccc16d8f7adccefeddca
+install -d $RPM_BUILD_ROOT%{systemdunitdir}/{halt,kexec,poweroff,reboot,sysinit,multi-user}.target.wants
+ln -sf ../plymouth-start.service $RPM_BUILD_ROOT%{systemdunitdir}/sysinit.target.wants/plymouth-start.service
+ln -sf ../plymouth-read-write.service $RPM_BUILD_ROOT%{systemdunitdir}/sysinit.target.wants/plymouth-read-write.service
+ln -sf ../plymouth-quit.service $RPM_BUILD_ROOT%{systemdunitdir}/multi-user.target.wants/plymouth-quit.service
+ln -sf ../plymouth-quit-wait.service $RPM_BUILD_ROOT%{systemdunitdir}/multi-user.target.wants/plymouth-quit-wait.service
+ln -sf ../plymouth-reboot.service $RPM_BUILD_ROOT%{systemdunitdir}/reboot.target.wants/plymouth-reboot.service
+ln -sf ../plymouth-kexec.service $RPM_BUILD_ROOT%{systemdunitdir}/kexec.target.wants/plymouth-kexec.service
+ln -sf ../plymouth-poweroff.service $RPM_BUILD_ROOT%{systemdunitdir}/poweroff.target.wants/plymouth-poweroff.service
+ln -sf ../plymouth-halt.service $RPM_BUILD_ROOT%{systemdunitdir}/halt.target.wants/plymouth-halt.service
+
%clean
rm -rf $RPM_BUILD_ROOT
+%post
+%systemd_reload
+
%postun
if [ $1 -eq 0 ]; then
rm -f %{_libdir}/plymouth/default.so
fi
+%systemd_reload
%post core-libs -p /sbin/ldconfig
%postun core-libs -p /sbin/ldconfig
%defattr(644,root,root,755)
%doc AUTHORS README TODO
%attr(755,root,root) %{_bindir}/plymouth
-%attr(755,root,root) %{_bindir}/rhgb-client
%dir %{_sysconfdir}/plymouth
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/plymouth/plymouthd.conf
%{_mandir}/man8/plymouth.8*
%{_localstatedir}/run/plymouth
%{_localstatedir}/spool/plymouth
+%{systemdunitdir}/plymouth-halt.service
+%{systemdunitdir}/plymouth-kexec.service
+%{systemdunitdir}/plymouth-poweroff.service
+%{systemdunitdir}/plymouth-quit-wait.service
+%{systemdunitdir}/plymouth-quit.service
+%{systemdunitdir}/plymouth-read-write.service
+%{systemdunitdir}/plymouth-reboot.service
+%{systemdunitdir}/plymouth-start.service
+%{systemdunitdir}/plymouth-switch-root.service
+%{systemdunitdir}/systemd-ask-password-plymouth.path
+%{systemdunitdir}/systemd-ask-password-plymouth.service
+%{systemdunitdir}/halt.target.wants/plymouth-halt.service
+%{systemdunitdir}/initrd-switch-root.target.wants/plymouth-switch-root.service
+%{systemdunitdir}/kexec.target.wants/plymouth-kexec.service
+%{systemdunitdir}/multi-user.target.wants/plymouth-quit.service
+%{systemdunitdir}/multi-user.target.wants/plymouth-quit-wait.service
+%{systemdunitdir}/poweroff.target.wants/plymouth-poweroff.service
+%{systemdunitdir}/reboot.target.wants/plymouth-reboot.service
+%{systemdunitdir}/sysinit.target.wants/plymouth-read-write.service
+%{systemdunitdir}/sysinit.target.wants/plymouth-start.service
+
%files core-libs
%defattr(644,root,root,755)
%attr(755,root,root) %{plymouth_libdir}/libply.so.*.*.*