Browse Source

bootstrap and wallpapers templating

master
Alf Gaida 5 years ago
parent
commit
6b5d125ce6
3 changed files with 76 additions and 43 deletions
  1. 55
    10
      templates/bootstrap.sh
  2. 6
    13
      templates/debian/wallpapers-control
  3. 15
    20
      templates/wallpapers/Makefile

+ 55
- 10
templates/bootstrap.sh View File

@@ -3,6 +3,7 @@ set -e

if [ -f ./debian/rules ]; then
echo "Running debuild clean and delete the old debian/rules now. "
echo "Please run bootstrap again!"
debuild clean
rm -f debian/rules
exit 1
@@ -23,18 +24,17 @@ else
fi

# clean up obsolete stuff
rm -f ./debian/*.install \
./debian/*.links \
./debian/*.postinst \
./debian/*.postrm
rm -f ./debian/*.install ./debian/install \
./debian/*.links ./debian/ĺinks \
./debian/*.postinst ./debian/postinst \
./debian/*.postrm ./debian/postrm \
./debian/*.prerm ./debian/prerm \
./debian/*.preinst ./debian/preinst


[ -d ./debian ] || exit 1



if [ ! -e ./debian/changelog ]; then
sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
-e "s/\@CODENAME\@/${DESCRIPTION}/g" \
@@ -71,21 +71,66 @@ sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
> ./debian/source/options



if [ "${FLAVOUR}" = 'grub-theme' ]; then
rm -rf template
cp -a templates/grub-theme/* .
sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
-e "s/\@CODENAME\@/${DESCRIPTION}/g" \
-e "s/\@VERSION\@/${VERSION}/g" \
-e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
-e "s/\@DISPLAY\@/${DISPLAY}/g" \
templates/debian/grub-theme.install \
> ./debian/install
fi


if [ "${FLAVOUR}" = 'wallpapers' ]; then
# svg copy
rm -f ./svg/*.svg
for i in templates/wallpapers/svg/*.svg; do
BASENAME=$(basename $i)
sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
-e "s/\@CODENAME\@/${DESCRIPTION}/g" \
-e "s/\@VERSION\@/${VERSION}/g" \
-e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
-e "s/\@DISPLAY\@/${DISPLAY}/g" \
$i \
> ./svg/${BASENAME}
done

sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
-e "s/\@CODENAME\@/${DESCRIPTION}/g" \
-e "s/\@VERSION\@/${VERSION}/g" \
-e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
-e "s/\@DISPLAY\@/${DISPLAY}/g" \
templates/debian/wallpapers.install \
> ./debian/install
sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
-e "s/\@CODENAME\@/${DESCRIPTION}/g" \
-e "s/\@VERSION\@/${VERSION}/g" \
-e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
-e "s/\@DISPLAY\@/${DISPLAY}/g" \
templates/debian/wallpapers.links \
> ./debian/links

cp templates/wallpapers/Makefile .
sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
-e "s/\@CODENAME\@/${DESCRIPTION}/g" \
-e "s/\@VERSION\@/${VERSION}/g" \
-e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
-e "s/\@DISPLAY\@/${DISPLAY}/g" \
templates/wallpapers/metadata.desktop \
> ./metadata.desktop
fi




exit 0


# write debian/*.install from templates
for k in kde kdm ksplash lightdm lxde lxqt wallpaper xfce xsplash; do
for k in kde kdm ksplash lightdm lxde lxqt xfce xsplash; do
if [ -r ../templates/debian/siduction-art-${k}-CODENAME_SAFE.install ]; then
sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
../templates/debian/siduction-art-${k}-CODENAME_SAFE.install \
@@ -97,7 +142,7 @@ done


# write debian/*.postinst from templates
for k in kde kdm ksplash lightdm lxde lxqt wallpaper xfce xsplash; do
for k in kde kdm ksplash lightdm lxde lxqt xfce xsplash; do
if [ -r ../templates/debian/siduction-art-${k}-CODENAME_SAFE.postinst ]; then
sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
../templates/debian/siduction-art-${k}-CODENAME_SAFE.postinst \

+ 6
- 13
templates/debian/wallpapers-control View File

@@ -1,13 +1,10 @@
Source: siduction-art-@CODENAME_SAFE@
Source: @CODENAME_SAFE@-wallpapers
Section: graphics
Priority: extra
Maintainer: Alf Gaida <agaida@siduction.org>
Build-Depends: debhelper (>= 9),
inkscape,
imagemagick,
perl,
perlmagick,
libxml-parser-perl,
graphicsmagick-imagemagick-compat,
fonts-droid,
Standards-Version: 3.9.6
Vcs-Git: git://git.siduction.org/packages/siduction-repository/siduction-art-foo.git
@@ -15,17 +12,13 @@ Vcs-Browser: http://git.siduction.org/packages/siduction-repository/siduction-ar



Package: siduction-art-wallpaper-@CODENAME_SAFE@
Package: @CODENAME_SAFE@-wallpapers
Architecture: all
Provides:
siduction-art-wallpaper-theme
Depends:
${misc:Depends}
Description: siduction wallpaper for the @VERSION@ release
release specific wallpapers, compatible with the GNOME, NOX, LXDE,
RQT, XFCE.
.
Wallpapers for: siduction @VERSION@ (@CODENAME@)
Description: Wallpapers for @CODENAME@
Release specific wallpapers, compatible with the Cinnamon, Fluxbox, GNOME, KDE, NOX,
LXDE, LXQt, Mate, XFCE.
.
This package does not override existing theme configurations and needs to be
selected manually.

+ 15
- 20
templates/wallpapers/Makefile View File

@@ -1,37 +1,32 @@
#!/usr/bin/make -f

include ../../VERSION
include VERSION
THEME= $(NAME)
SIZES= 640x480 800x600 1024x600 1024x768 1152x864 1280x720 1280x800 1280x1024 \
1366x768 1440x900 1440x1050 1600x1200 1680x1050 1920x1080 1920x1200

all: background $(SIZES) 400x250
mkdir -p $(THEME)
cp metadata.desktop $(THEME)/
all: $(SIZES) 400x250
mkdir -p build/${NAME}
cp metadata.desktop build/${NAME}

background:
ln -sf ../svg/background.jpg

400x250:
mkdir -p $(THEME)/contents/
$(RM) $(THEME)/contents/screenshot.png
mkdir -p build/${NAME}/contents/
$(RM) build/${NAME}/contents/screenshot.png
inkscape --without-gui --export-width=$(firstword $(subst x, ,$@ )) \
--export-height=$(lastword $(subst x, ,$@ )) \
--export-png="$(THEME)/contents/screenshot.png" 1920x1200.svg
convert -quality 90 "$(THEME)/contents/screenshot.png" "$(THEME)/contents/screenshot.jpg"
rm "$(THEME)/contents/screenshot.png"
--export-png="build/${NAME}/contents/screenshot.png" svg/1920x1200.svg
convert -quality 90 "build/${NAME}/contents/screenshot.png" "build/${NAME}/contents/screenshot.jpg"
$(RM) "build/${NAME}/contents/screenshot.png"

$(SIZES):
ln -sf ../svg/wall-$@.svg $@.svg
mkdir -p $(THEME)/contents/images/
$(RM) $(THEME)/contents/images/$@.png
mkdir -p build/${NAME}/contents/images/
$(RM) build/${NAME}/contents/images/$@.png
inkscape --without-gui --export-width=$(firstword $(subst x, ,$@ )) \
--export-height=$(lastword $(subst x, ,$@ )) \
--export-png="$(THEME)/contents/images/$@.png" $@.svg
convert -quality 90 "$(THEME)/contents/images/$@.png" "$(THEME)/contents/images/$@.jpg"
rm "$(THEME)/contents/images/$@.png"
--export-png="build/${NAME}/contents/images/$@.png" svg/$@.svg
convert -quality 90 "build/${NAME}/contents/images/$@.png" "build/${NAME}/contents/images/$@.jpg"
$(RM) "build/${NAME}/contents/images/$@.png"

clean:
$(RM) -r $(THEME)/
$(RM) *.svg
$(RM) background.jpg
$(RM) -r build/