Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=4c4c631db5b699ad4b3321df75bacfe318b963d4

commit 4c4c631db5b699ad4b3321df75bacfe318b963d4
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Wed Dec 15 17:32:10 2010 +0100

splashy-0.3.13-13-i686

- enable systemd units in the install scriptlet so that it's possible to
disable the splash if it's not wanted

diff --git a/source/xapps/splashy/FrugalBuild b/source/xapps/splashy/FrugalBuild
index 740d8cb..dfc15a2 100644
--- a/source/xapps/splashy/FrugalBuild
+++ b/source/xapps/splashy/FrugalBuild
@@ -6,7 +6,7 @@ pkgver=0.3.13
themever=1.4
# see http://alioth.debian.org/project/showfiles.php?group_id=30657
rel_id=2691
-pkgrel=12
+pkgrel=13
pkgdesc="A complete user-space boot splash system"
url="http://alioth.debian.org/projects/splashy/";
depends=('glib2' 'directfb-input-keyboard>=1.2.0-1' 'libgcc' 'file')
@@ -58,17 +58,11 @@ build()
Fexe /lib/systemd/systemd-splashy
Fmkdir 
/lib/systemd/system/{halt,kexec,poweroff,multi-user,reboot,sysinit}.target.wants
Ffile /lib/systemd/system/splashy-halt.service
-       Fln ../splashy-halt.service /lib/systemd/system/halt.target.wants/
Ffile /lib/systemd/system/splashy-kexec.service
-       Fln ../splashy-kexec.service /lib/systemd/system/kexec.target.wants/
Ffile /lib/systemd/system/splashy-poweroff.service
-       Fln ../splashy-poweroff.service 
/lib/systemd/system/poweroff.target.wants/
Ffile /lib/systemd/system/splashy-quit.service
-       Fln ../splashy-quit.service /lib/systemd/system/multi-user.target.wants/
Ffile /lib/systemd/system/splashy-reboot.service
-       Fln ../splashy-reboot.service /lib/systemd/system/reboot.target.wants/
Ffile /lib/systemd/system/splashy-start.service
-       Fln ../splashy-start.service /lib/systemd/system/sysinit.target.wants/
# don't run old sysv init script with different name when using systemd
Fln splashy-start.service /lib/systemd/system/splash.service
Fln splashy-quit.service /lib/systemd/system/zz-splash.service
diff --git a/source/xapps/splashy/splashy.install 
b/source/xapps/splashy/splashy.install
index c7fa4fc..4a08b2a 100644
--- a/source/xapps/splashy/splashy.install
+++ b/source/xapps/splashy/splashy.install
@@ -1,13 +1,42 @@
+enable_units()
+{
+       ln -s ../splashy-halt.service /lib/systemd/system/halt.target.wants/
+       ln -s ../splashy-kexec.service /lib/systemd/system/kexec.target.wants/
+       ln -s ../splashy-poweroff.service 
/lib/systemd/system/poweroff.target.wants/
+       ln -s ../splashy-quit.service 
/lib/systemd/system/multi-user.target.wants/
+       ln -s ../splashy-reboot.service /lib/systemd/system/reboot.target.wants/
+       ln -s ../splashy-start.service /lib/systemd/system/sysinit.target.wants/
+}
+
+disable_units()
+{
+       rm /lib/systemd/system/halt.target.wants/splashy-halt.service
+       rm /lib/systemd/system/kexec.target.wants/splashy-kexec.service
+       rm /lib/systemd/system/poweroff.target.wants/splashy-poweroff.service
+       rm /lib/systemd/system/multi-user.target.wants/splashy-quit.service
+       rm /lib/systemd/system/reboot.target.wants/splashy-reboot.service
+       rm /lib/systemd/system/sysinit.target.wants/splashy-start.service
+}
+
post_install()
{
cd /etc/rc.d/rcS.d
ln -sf ../rc.splash S03rc.splash
/usr/sbin/chkconfig --add rc.splash
/usr/sbin/chkconfig --add rc.zz-splash
+       enable_units
+}
+
+post_upgrade()
+{
+       if [ -e /etc/rc.d/rcS.d/S03rc.splash ]; then
+               enable_units
+       fi
}

pre_remove()
{
+       disable_units
/usr/sbin/chkconfig --del rc.zz-splash
/usr/sbin/chkconfig --del rc.splash
rm /etc/rc.d/rcS.d/S03rc.splash
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to