Hello community,
here is the log from the commit of package branding-basedonopensuse for
openSUSE:Factory
checked in at Mon Sep 26 10:29:47 CEST 2011.
--------
New Changes file:
--- /dev/null 2010-08-26 16:28:41.000000000 +0200
+++
/mounts/work_src_done/STABLE/branding-basedonopensuse/branding-basedonopensuse.changes
2011-09-10 15:49:38.000000000 +0200
@@ -0,0 +1,5 @@
+-------------------------------------------------------------------
+Sat Sep 10 13:49:04 UTC 2011 - [email protected]
+
+- initial package
+
calling whatdependson for head-i586
New:
----
background-verbose.png
bootsplash.php
branding-basedonopensuse.changes
branding-basedonopensuse.spec
extract.pl
gfxboot-back.jpg
gfxboot-phead.jpg
gfxboot-welcome.jpg
gimp-splash.png
ksplashx-logo.png
ksplashx-preview.png
logo.svg
logov.svg
post.bootsplash
post.gfxboot
update-list.sh
wallpaper-1600.jpg
wallpaper-1920.jpg
xfce4-splash-openSUSE.png
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ branding-basedonopensuse.spec ++++++
++++ 649 lines (skipped)
++++++ bootsplash.php ++++++
#!/usr/bin/php
<?php
//depends on graphicsmagic and rsvg
$distro = "openSUSE 12.1";
$themename = "basedonopensuse";
$themepath = "./bootsplash/$themename";
$imagepath = "/etc/bootsplash/themes/$themename/images";
//resolution, jpeg export quality pairs
$resolutions = array("640x480"=>"95", "800x600"=>"95", "1024x600"=>"94",
"1024x768"=>"94", "1152x768"=>"94", "1152x864"=>"93",
"1280x768"=>"93", "1366x768"=>"93", "1280x800"=>"93",
"1280x854"=>"93",
"1280x960"=>"92", "1280x1024"=>"92", "1400x1050"=>"91",
"1440x900"=>"91", "1600x1024"=>"90", "1600x1200"=>"89",
"1600x900"=>"90", "1920x1080"=>"90",
"1680x1050"=>"89", "1920x1200"=>"80", "3200x1200"=>"70");
/*
$resolutions = array("800x600"=>"95");
*/
//create dirs
if (!is_dir($themepath)) {
//print "removing old theme $themename\n\n";
//exec("rm -rf ./theme/$themename");
mkdir ("./bootsplash");
mkdir ("$themepath");
mkdir ("$themepath/config");
mkdir ("$themepath/images");
}
//create logos
if (!is_dir('./temp')) {
mkdir ("./temp");
}
$cmd = "inkscape -w 180 -e ./temp/logo.png logo.svg"; //silent logo
exec($cmd);
$cmd = "inkscape -w 90 -e ./temp/logov.png logo.svg"; //verbose logo
exec($cmd);
$cmd = "gm convert -comment \"id logo deltabg stop\" ./temp/logo.png
./temp/logo.png ./temp/logo.mng";
exec($cmd);
$cmd = "gm convert -colorspace gray -comment \"id logov deltabg stop\"
./temp/logov.png ./temp/logov.png ./temp/logov.mng";
exec($cmd);
#exec("/usr/local/bin/convert ./building-blocks/logo.png
$themepath/images/logo.mng");
copy("./temp/logo.mng", "$themepath/images/logo.mng");
copy("./temp/logov.mng", "$themepath/images/logov.mng");
while (list($res,$q) = each($resolutions)) {
//scale backgrounds
print "creating $res resolution images\n";
$in = "./background.png";
$inverb = "./background-verbose.png";
$silent = "$themepath/images/silent-$res.jpg";
$verbose = "$themepath/images/bootsplash-$res.jpg";
$cmd = "gm convert $in -geometry $res\! -quality $q -interlace None
-colorspace YCbCr ";
$cmd .= " -sampling-factor 2x2 $silent";
exec($cmd);
$cmd = "gm convert $inverb -geometry $res\! -quality $q -interlace None
-colorspace YCbCr ";
$cmd .= " -sampling-factor 2x2 $verbose";
#$cmd = "gm convert $in -colorspace gray -geometry $res\! -quality $q
-interlace None ";
#$cmd .= "-colorspace YCbCr -sampling-factor 2x2 $verbose";
exec($cmd);
//generate config files
print "Generating config file for $res\n";
$fp = fopen("$themepath/config/bootsplash-$res.cfg", "w");
fwrite($fp, "# This is a bootsplash configuration file for\n");
fwrite($fp, "# $distro, resolution $res.\n");
fwrite($fp, "#\n");
fwrite($fp, "# See www.bootsplash.org for more information.\n");
fwrite($fp, "# created by SUSE Image Builder\n");
fwrite($fp, "#\n");
fwrite($fp, "version=3\n"); //config file version
fwrite($fp, "state=1\n"); //picture is diplayed
fwrite($fp, "progress_enable=0\n"); //no progress
fwrite($fp, "overpaintok=1\n"); //no clue what this is
fwrite($fp, "\n\n");
//colors
fwrite($fp, "fgcolor=7\n");
fwrite($fp, "bgcolor=0\n\n");
//text window frame
ereg("([0-9]+)x([0-9]+)", $res, $dimensions);
$x = $dimensions[1];
$y = $dimensions[2];
$tx = 20;
$ty = 60;
$tw = $x - $tx - 10;
$th = $y - $ty;
fwrite($fp, "tx=$tx\n");
fwrite($fp, "ty=$ty\n");
fwrite($fp, "tw=$tw\n");
fwrite($fp, "th=$th\n");
//background
fwrite($fp, "\n\njpeg=$imagepath/bootsplash-$res.jpg\n");
fwrite($fp, "silentjpeg=$imagepath/silent-$res.jpg\n");
fwrite($fp, "\n\n");
$lx = round($x/2);
$ly = round($y/2)-20;
fwrite($fp, "mnganim logo $imagepath/logo.mng initframe logo silent
center $lx $ly\n");
//overlay title (verbose)
$vlx = 2;
$vly = 2;
fwrite($fp, "mnganim logov $imagepath/logov.mng initframe logov origin
0 $vlx $vly\n");
//animation triggers
fwrite($fp, "trigger \"isdown\" quit\n");
fwrite($fp, "trigger \"rlreached 5\" toverbose\n");
fwrite($fp, "trigger \"rlchange 0\" tosilent\n");
fwrite($fp, "trigger \"rlchange 6\" tosilent\n");
$verticalpcnt = 0.8;
$width = 160; //width of the progress bar
$voffset = 80; //vertical offset from the title (defined by
verticalpcnt above)
$x1 = $lx - round($width/2) - 4;
$x2 = $x1 + $width;
//$y1 = round($verticalpcnt*$y);
$y1 = round($ly+$voffset);
$y2 = $y1+1; //let's try a 2 pixel line
fwrite($fp, "\n\n");
fwrite($fp, "progress_enable=1\n"); //enable progress
fwrite($fp, "box silent noover $x1 $y1 $x2 $y2 #ffffff10\n");
//progress background
$wl = "box silent inter " . $x1 . " " . ($y1 - 1) . " " . $x1 . " " .
($y1 + 1) . " #ffffff80\n";
fwrite($fp, $wl); //starting point ...
$wl = "box silent " . $x1 . " " . ($y1 - 1) . " " . $x2 . " " . ($y2 +
1) . " #ffffff80\n";
fwrite($fp, $wl); //..iterated to this
fclose($fp);
}
?>
++++++ extract.pl ++++++
#!/usr/bin/perl
# Copyright (c) 2007, 2008, SUSE Linux Products GmbH
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
use POSIX; # Needed for setlocale()
my $inpkg = 0;
my $packagename = $ARGV[1];
my $tag = $ARGV[2];
my $descr = '';
my %sources;
my $name;
open(SOURCES, $ARGV[0]);
while ( <SOURCES> ) {
chomp;
if (m/^=Pkg:/ && $inpkg) {
last;
}
if (m/^\+$tag/) { $intag = 1; next; }
$intag = 0 if (m/^\-$tag/);
if (m/^=Pkg:.*$packagename.* /) {
$inpkg = 1;
}
print "$_\n" if ($inpkg && $intag);
}
close(SOURCES);
++++++ post.bootsplash ++++++
%{fillup_only -ns bootsplash branding-basedonopensuse }
perl -pi -e 's/^(THEME=).*/$1"basedonopensuse"/' /etc/sysconfig/bootsplash
if test -s /etc/sysconfig/bootloader ; then
/sbin/mkinitrd
fi
++++++ post.gfxboot ++++++
gfxboot --update-theme basedonopensuse
++++++ update-list.sh ++++++
#!/bin/sh
set -e
packs=$(mktemp)
curl -s
http://download.opensuse.org/factory/repo/oss/suse/setup/descr/packages.gz |
gzip -c -d > $packs
list=$(grep ^=Pkg:.*branding-openSUSE $packs | cut '-d ' -f2 | sort -u | grep
-v '^branding-openSUSE$')
export LC_ALL=C
sed -n -e '1,/^#BRQ-START/p' branding-basedonopensuse.spec >
branding-basedonopensuse.spec.new
for i in $list; do
echo "BuildRequires: $i" >> branding-basedonopensuse.spec.new
done
sed -n -e '/^#BRQ-END/,/^#PSTART/p' branding-basedonopensuse.spec >>
branding-basedonopensuse.spec.new
for i in $list; do
echo "packages=\"\$packages $i\"" >> branding-basedonopensuse.spec.new
done
sed -n -e '/^#PEND/,$p' branding-basedonopensuse.spec >>
branding-basedonopensuse.spec.new
sed -n -e '1,/# TIL HERE/p' branding-basedonopensuse.spec.new >
branding-basedonopensuse.spec.new2
mv branding-basedonopensuse.spec.new2 branding-basedonopensuse.spec.new
( for i in $list; do
base=${i/-branding-openSUSE/}
echo "%package -n $base-branding-basedonopensuse"
echo "Summary: Provides $base branding"
echo "Provides: $base-branding"
echo "Conflicts: otherproviders($base-branding)"
perl -w extract.pl $packs $i Sup | sed -e 's,^,Supplements:,;
s,branding-openSUSE,branding-basedonopensuse,'
echo ""
echo "%description -n $base-branding-basedonopensuse"
echo "Debranded copy of openSUSE branding for $base"
echo ""
echo "%files -f files.$base-branding-openSUSE -n
$base-branding-basedonopensuse"
echo ""
if test -f post.$base; then
echo "%post -n $base-branding-basedonopensuse"
cat post.$base
fi
done ) >> branding-basedonopensuse.spec.new
/usr/lib/obs/service/format_spec_file.files/prepare_spec
branding-basedonopensuse.spec.new > branding-basedonopensuse.spec.form
mv branding-basedonopensuse.spec.form branding-basedonopensuse.spec.new
diff -u branding-basedonopensuse.spec branding-basedonopensuse.spec.new || true
mv branding-basedonopensuse.spec.new branding-basedonopensuse.spec
rm $packs
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]