From f5a6f748f19c1d63ad2f16d1a2a27561090d9632 Mon Sep 17 00:00:00 2001 From: Mikko Ylinen Date: Tue, 17 Sep 2013 15:12:58 +0300 Subject: [PATCH] Add packaging and systemd files Change-Id: I3d79781e18db40e54f8d3e1f091c6b67f5500d0e Signed-off-by: Mikko Ylinen --- data/psplash-quit.service | 10 ++++++++++ data/psplash.conf | 2 ++ data/psplash.service | 12 ++++++++++++ packaging/psplash.spec | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 data/psplash-quit.service create mode 100644 data/psplash.conf create mode 100644 data/psplash.service create mode 100644 packaging/psplash.spec diff --git a/data/psplash-quit.service b/data/psplash-quit.service new file mode 100644 index 0000000..07fa2b9 --- /dev/null +++ b/data/psplash-quit.service @@ -0,0 +1,10 @@ +[Unit] +Description=Quit psplash splash screen writer + +[Service] +Type=oneshot +Environment=TMPDIR=/run/psplash/ +ExecStart=/usr/bin/psplash-write QUIT + +[Install] +WantedBy=weston.target diff --git a/data/psplash.conf b/data/psplash.conf new file mode 100644 index 0000000..09ec0f9 --- /dev/null +++ b/data/psplash.conf @@ -0,0 +1,2 @@ +d /run/psplash 0755 root root - +p /run/psplash/psplash_fifo 0777 root root - diff --git a/data/psplash.service b/data/psplash.service new file mode 100644 index 0000000..2e3eb48 --- /dev/null +++ b/data/psplash.service @@ -0,0 +1,12 @@ +[Unit] +Description=psplash splash screen writer +DefaultDependencies=0 +Requires=systemd-tmpfiles-setup.service +After=systemd-tmpfiles-setup.service + +[Service] +Environment=TMPDIR=/run/psplash +ExecStart=/usr/bin/psplash -n + +[Install] +WantedBy=sysinit.target diff --git a/packaging/psplash.spec b/packaging/psplash.spec new file mode 100644 index 0000000..036dcfc --- /dev/null +++ b/packaging/psplash.spec @@ -0,0 +1,46 @@ +Name: psplash +Version: 0.1 +Release: 0 +Summary: Very simple boot splash screen +Group: Base/Startup +License: GPL-2.0+ +URL: http://git.yoctoproject.org/cgit/cgit.cgi/psplash +Source: %{name}-%{version}.tar.bz2 + +%description +Very simple boot splash screen + +%prep +%setup -q -n %{name}-%{version} + +%build +./autogen.sh --prefix=/usr +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + +mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/ +cp data/psplash.conf $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/ + +mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system/sysinit.target.wants +install -m 0644 data/psplash.service $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system +ln -s ../psplash.service $RPM_BUILD_ROOT%{_prefix}/lib/systemd/system/sysinit.target.wants/psplash.service + +mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/systemd/user/weston.target.wants +install -m 0644 data/psplash-quit.service $RPM_BUILD_ROOT%{_prefix}/lib/systemd/user +ln -s ../psplash-quit.service $RPM_BUILD_ROOT%{_prefix}/lib/systemd/user/weston.target.wants/psplash-quit.service + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%{_bindir}/psplash* +%{_prefix}/lib/systemd/system/psplash.service +%{_prefix}/lib/systemd/system/sysinit.target.wants/psplash.service +%{_prefix}/lib/systemd/user/psplash-quit.service +%{_prefix}/lib/systemd/user/weston.target.wants/psplash-quit.service +%{_prefix}/lib/tmpfiles.d/psplash.conf +%doc -- 2.7.4