diff --git a/blorand-plymouth-theme/blorand.plymouth b/blorand-plymouth-theme/blorand.plymouth new file mode 100644 index 0000000..b1e6f58 --- /dev/null +++ b/blorand-plymouth-theme/blorand.plymouth @@ -0,0 +1,8 @@ +[Plymouth Theme] +Name=blorand +Description=Blorand Desktop Splash +ModuleName=script + +[script] +ImageDir=/usr/share/plymouth/themes/blorand +ScriptFile=/usr/share/plymouth/themes/blorand/blorand.script diff --git a/blorand.png b/blorand-plymouth-theme/blorand.png similarity index 100% rename from blorand.png rename to blorand-plymouth-theme/blorand.png diff --git a/blorand-plymouth-theme/blorand.script b/blorand-plymouth-theme/blorand.script new file mode 100644 index 0000000..076733a --- /dev/null +++ b/blorand-plymouth-theme/blorand.script @@ -0,0 +1,50 @@ +screen_width = Window.GetWidth(); +screen_height = Window.GetHeight(); + +theme_image = Image("blorand.png"); +image_width = theme_image.GetWidth(); +image_height = theme_image.GetHeight(); + +scale_x = image_width / screen_width; +scale_y = image_height / screen_height; + +flag = 1; + +if (scale_x > 1 || scale_y > 1) +{ + if (scale_x > scale_y) + { + resized_image = theme_image.Scale (screen_width, image_height / scale_x); + image_x = 0; + image_y = (screen_height - ((image_height * screen_width) / image_width)) / 2; + } + else + { + resized_image = theme_image.Scale (image_width / scale_y, screen_height); + image_x = (screen_width - ((image_width * screen_height) / image_height)) / 2; + image_y = 0; + } +} +else +{ + resized_image = theme_image.Scale (image_width, image_height); + image_x = (screen_width - image_width) / 2; + image_y = (screen_height - image_height) / 2; +} + +if (Plymouth.GetMode() != "shutdown") +{ + sprite = Sprite (resized_image); + sprite.SetPosition (image_x, image_y, -100); +} + +message_sprite = Sprite(); +message_sprite.SetPosition(screen_width * 0.1, screen_height * 0.9, 10000); + +fun message_callback (text) { + my_image = Image.Text(text, 1, 1, 1); + message_sprite.SetImage(my_image); + sprite.SetImage (resized_image); +} + +Plymouth.SetUpdateStatusFunction(message_callback); diff --git a/debian/copyright b/blorand-plymouth-theme/debian/.debhelper/generated/blorand-plymouth-theme/installed-by-dh_installdocs similarity index 100% rename from debian/copyright rename to blorand-plymouth-theme/debian/.debhelper/generated/blorand-plymouth-theme/installed-by-dh_installdocs diff --git a/blorand-plymouth-theme/debian/changelog b/blorand-plymouth-theme/debian/changelog new file mode 100644 index 0000000..36a9764 --- /dev/null +++ b/blorand-plymouth-theme/debian/changelog @@ -0,0 +1,5 @@ +blorand-plymouth-theme (1.0-1) stable; urgency=medium + + * Initial release. (Closes: #XXXXXX) + + -- Benoit LORAND Mon, 09 Sep 2019 21:19:05 +0200 diff --git a/debian/compat b/blorand-plymouth-theme/debian/compat similarity index 100% rename from debian/compat rename to blorand-plymouth-theme/debian/compat diff --git a/blorand-plymouth-theme/debian/control b/blorand-plymouth-theme/debian/control new file mode 100644 index 0000000..7ec6c83 --- /dev/null +++ b/blorand-plymouth-theme/debian/control @@ -0,0 +1,18 @@ +Source: blorand-plymouth-theme +Maintainer: Benoit LORAND +Section: misc +Priority: optional +Standards-Version: 3.9.2 +Build-Depends: debhelper (>= 9) + +Package: blorand-plymouth-theme +Architecture: all +Depends: ${shlibs:Depends}, + ${misc:Depends}, + plymouth, + plymouth-themes +Section: Personnalisation_BLORAND +Conflicts: provectio-plymouth-theme +Replaces: provectio-plymouth-theme +Priority: optional +Description: Thème de démarrage de Blorand diff --git a/blorand-plymouth-theme/debian/postinst b/blorand-plymouth-theme/debian/postinst new file mode 100755 index 0000000..893f4d4 --- /dev/null +++ b/blorand-plymouth-theme/debian/postinst @@ -0,0 +1,47 @@ +#! /bin/bash + +set -e + +case "$1" in +configure) + PLYMOUTHCONF="/etc/plymouth/plymouthd.conf" + if [ -e $PLYMOUTHCONF ] ; then + if ( ! grep '^\[Daemon\]' $PLYMOUTHCONF > /dev/null 2>&1 ) ; then + echo '[Daemon]' >> $PLYMOUTHCONF + fi + if ( grep '^Theme=' $PLYMOUTHCONF > /dev/null 2>&1 ) ; then + sed -i 's/^Theme=.*$/Theme=blorand/g' $PLYMOUTHCONF + else + echo 'Theme=blorand' >> $PLYMOUTHCONF + fi + else + echo -e "[Daemon]\nTheme=blorand" > $PLYMOUTHCONF + fi + update-rc.d plymouth defaults + update-rc.d plymouth-log defaults + + if [ -e /etc/default/grub ] ; then + if ( ! awk -F'=' '$1 ~ /^GRUB_CMDLINE_LINUX_DEFAULT/ { print $2 }' /etc/default/grub | grep splash > /dev/null 2>&1) ; then + sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT="\([^"]*\).*$/GRUB_CMDLINE_LINUX_DEFAULT="\1 splash"/g' /etc/default/grub + [ -x /usr/sbin/update-grub2 ] && /usr/sbin/update-grub2 + fi + fi + update-initramfs -u + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + + + +exit 0 diff --git a/blorand-plymouth-theme/debian/rules b/blorand-plymouth-theme/debian/rules new file mode 100755 index 0000000..f4f0fe9 --- /dev/null +++ b/blorand-plymouth-theme/debian/rules @@ -0,0 +1,9 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_auto_install: + install -D -m 0644 blorand.plymouth $$(pwd)/debian/blorand-plymouth-theme/usr/share/plymouth/themes/blorand/blorand.plymouth + install -D -m 0644 blorand.png $$(pwd)/debian/blorand-plymouth-theme/usr/share/plymouth/themes/blorand/blorand.png + install -D -m 0644 blorand.script $$(pwd)/debian/blorand-plymouth-theme/usr/share/plymouth/themes/blorand/blorand.script + diff --git a/debian/source/format b/blorand-plymouth-theme/debian/source/format similarity index 100% rename from debian/source/format rename to blorand-plymouth-theme/debian/source/format diff --git a/blorand.gpg b/blorand.gpg deleted file mode 100644 index f0a94fa..0000000 Binary files a/blorand.gpg and /dev/null differ diff --git a/blorand.list b/blorand.list deleted file mode 100644 index 20aaae3..0000000 --- a/blorand.list +++ /dev/null @@ -1 +0,0 @@ -deb [signed-by=/etc/apt/keyrings/blorand.gpg] http://repo.blorand.org/apt/debian stable main diff --git a/BLORAND-CA_Root.crt b/blorand/BLORAND-CA_Root.crt similarity index 100% rename from BLORAND-CA_Root.crt rename to blorand/BLORAND-CA_Root.crt diff --git a/blorand/blorand.gpg b/blorand/blorand.gpg new file mode 100644 index 0000000..6b5ee7c Binary files /dev/null and b/blorand/blorand.gpg differ diff --git a/blorand/blorand.list b/blorand/blorand.list new file mode 100644 index 0000000..2ba1b11 --- /dev/null +++ b/blorand/blorand.list @@ -0,0 +1 @@ +deb [signed-by=/etc/apt/keyrings/blorand.gpg] https://git.blorand.org/api/packages/benoit/debian stable main diff --git a/blorand/blorand.png b/blorand/blorand.png new file mode 100644 index 0000000..2248f70 Binary files /dev/null and b/blorand/blorand.png differ diff --git a/blorand.profile b/blorand/blorand.profile similarity index 100% rename from blorand.profile rename to blorand/blorand.profile diff --git a/debian/changelog b/blorand/debian/changelog similarity index 100% rename from debian/changelog rename to blorand/debian/changelog diff --git a/blorand/debian/compat b/blorand/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/blorand/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/blorand/debian/control similarity index 100% rename from debian/control rename to blorand/debian/control diff --git a/blorand/debian/copyright b/blorand/debian/copyright new file mode 100644 index 0000000..e69de29 diff --git a/debian/postinst b/blorand/debian/postinst similarity index 100% rename from debian/postinst rename to blorand/debian/postinst diff --git a/debian/rules b/blorand/debian/rules similarity index 100% rename from debian/rules rename to blorand/debian/rules diff --git a/blorand/debian/source/format b/blorand/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/blorand/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/vimrc.blorand b/blorand/vimrc.blorand similarity index 100% rename from vimrc.blorand rename to blorand/vimrc.blorand