2011-04-13 18:57:45 +04:00
STATUS = @STATUS@
2019-04-30 11:53:43 +03:00
BRAND = @BRAND@
2011-04-13 18:57:45 +04:00
THEME = @THEME@
NAME = @NAME@
VERSION = @VERSION@
2019-05-02 14:45:42 +03:00
PRODUCT_NAME = @PRODUCT_NAME@
CODENAME = @CODENAME@
2019-06-03 17:26:19 +03:00
ARCH = $( shell arch)
2009-07-06 00:59:02 +04:00
2017-10-17 15:05:14 +03:00
.PHONY : graphics browser -qt ahttpd boot -images boot -splash boot indexhtml install browser -qt /design /bg .png
2019-04-29 13:52:08 +03:00
2019-04-29 12:23:02 +03:00
# graphics
2013-09-27 16:59:38 +04:00
2019-04-29 12:23:02 +03:00
# generate derivative graphics
graphics :
# make default wallpaper
cp -al images/background4x3.png images/wallpaper.png
2019-04-29 12:38:03 +03:00
cp -al images/background16x9.png backgrounds/default-wide.png
cp -al images/product-logo.png backgrounds/product-logo.png
cp -al images/wallpaper.png backgrounds/default.png
cp -al images/wallpaper.png backgrounds/xdm.png
2019-04-29 12:23:02 +03:00
# make wallpapers for gfxboot and grub2
# convert images/background4x3.png -resize 800x600 images/small.png
# display status
# convert images/small.png images/product-logo.png -geometry +30+30 -composite images/grub.png
# cp -al images/grub.png images/boot.png
# use predefined image 800x600 with logo
2019-05-24 11:14:25 +03:00
if [ -n " $( STATUS) " ] ; then \
mv images/boot.png images/.boot.png; \
convert images/.boot.png -undercolor '#c62530' -fill white -font /usr/share/fonts/ttf/dejavu/DejaVuSansCondensed-Bold.ttf -style Normal -weight Normal -pointsize 30 -gravity northwest -draw 'text 0,55 " $(STATUS) "' images/boot.png; \
rm -f images/.boot.png; \
2019-06-04 13:31:13 +03:00
for i in ` ls -1 images/with-logo/*.png` ; do \
2019-05-24 11:14:25 +03:00
mv images/with-logo/$$ i images/with-logo/.$$ i; \
convert images/with-logo/.$$ i -undercolor '#c62530' -fill white -font /usr/share/fonts/ttf/dejavu/DejaVuSansCondensed-Bold.ttf -style Normal -weight Normal -pointsize 30 -gravity northwest -draw 'text 0,55 " $(STATUS) "' images/with-logo/$$ i; \
rm -f images/with-logo/.$$ i; \
done ; \
fi
cp -al images/boot.png images/grub.png; \
2019-04-29 12:23:02 +03:00
# product logo for ahttpd
2019-04-29 12:29:14 +03:00
cp -al images/product-logo.png ahttpd/images/product-logo.png
2019-04-29 12:23:02 +03:00
# product logo for indexhtml
2019-04-29 12:29:14 +03:00
cp -al images/product-logo.png indexhtml/images/product-logo.png
2019-04-29 12:23:02 +03:00
# browser-qt
2019-04-29 12:29:14 +03:00
browser-qt/design/bg.png : images /installer .png
2019-05-17 13:18:50 +03:00
if [ -n " $( STATUS) " ] ; then \
convert $< -undercolor '#c62530' -fill white -font /usr/share/fonts/ttf/dejavu/DejaVuSansCondensed-Bold.ttf -style Normal -weight Normal -pointsize 30 -gravity northwest -draw 'text 0,0 " $(STATUS) "' $@ ; \
else \
cp -a $< $@ ; \
fi
2019-04-29 12:23:02 +03:00
2019-04-29 12:29:14 +03:00
browser-qt : browser -qt /design /bg .png
2019-04-29 12:23:02 +03:00
install -d $( datadir) /alterator-browser-qt/design
2019-05-17 13:16:03 +03:00
rcc-qt5 -binary browser-qt/theme.qrc -o $( datadir) /alterator-browser-qt/design/$( THEME) .rcc
2019-04-29 12:29:14 +03:00
#cp -f browser-qt/design/design-live.qss browser-qt/design/design.qss
2019-05-17 13:16:03 +03:00
rcc-qt5 -binary browser-qt/theme.qrc -o $( datadir) /alterator-browser-qt/design/$( THEME) -live.rcc
2019-04-29 12:23:02 +03:00
install -d $( sysconfdir) /alternatives/packages.d
printf '/etc/alterator/design-browser-qt\t/usr/share/alterator-browser-qt/design/$(THEME).rcc\t50\n' >$( sysconfdir) /alternatives/packages.d/$( THEME) .rcc
# ahttpd
ahttpd :
2019-04-29 12:29:14 +03:00
for i in ahttpd/images/*.svg; do \
2019-04-29 12:23:02 +03:00
image = $$ { i%.svg} ; \
convert -background none $$ image.svg $$ image.png ; \
done
install -d $( datadir) /alterator/design/styles
2019-04-29 12:29:14 +03:00
cp -a ahttpd/images $( datadir) /alterator/design
cp -a ahttpd/styles/*.css $( datadir) /alterator/design/styles
2019-04-29 12:23:02 +03:00
2019-06-03 17:26:19 +03:00
i f e q ( , $( filter -out i 586 i 686 x 86_ 64,$ ( ARCH ) ) )
2019-04-29 12:23:02 +03:00
# bootloader and bootsplash
boot-images :
cp -a /usr/src/design-bootloader-source ./
2019-04-29 12:29:14 +03:00
cp -a bootloader/config design-bootloader-source/
cp -a bootloader/gfxboot.cfg design-bootloader-source/data-install/
cp -a bootloader/gfxboot.cfg design-bootloader-source/data-boot/
2019-04-29 12:23:02 +03:00
convert -colorspace YCbCr -sampling-factor 2x2 images/boot.png JPEG:images/boot.jpg
2019-05-17 13:18:50 +03:00
if [ -n " $( STATUS) " ] ; then \
2019-05-17 15:20:10 +03:00
convert images/boot.jpg -resize "800x600!" -undercolor '#c62530' -fill white -font /usr/share/fonts/ttf/dejavu/DejaVuSansCondensed-Bold.ttf -style Normal -weight Normal -pointsize 30 -gravity northwest -draw 'text 0,55 " $(STATUS) "' design-bootloader-source/data-boot/back.jpg; \
2019-05-17 13:18:50 +03:00
else \
cp -al images/boot.jpg design-bootloader-source/data-boot/back.jpg; \
fi
cp -al design-bootloader-source/data-boot/back.jpg design-bootloader-source/data-install/back.jpg; \
2019-04-29 12:23:02 +03:00
mv design-bootloader-source/data-install/back{ ,.1} .jpg
convert -quality 97 -fill '#acdaf2' -draw 'rectangle 0,0,2,2' design-bootloader-source/data-install/back{ .1,} .jpg
rm -f design-bootloader-source/data-install/back.*.jpg
#bootsplash
boot-splash : boot -images
mkdir -p $( datadir) /plymouth/themes/$( THEME)
cp -al images/grub.jpg $( datadir) /plymouth/themes/$( THEME) /grub.jpg
# Put logo to background*x*.png
cp -al images/with-logo/background*x*.png $( datadir) /plymouth/themes/$( THEME) /
2019-04-29 12:29:14 +03:00
cp -a bootsplash/* $( datadir) /plymouth/themes/$( THEME)
2019-04-29 12:23:02 +03:00
mv $( datadir) /plymouth/themes/$( THEME) /theme.plymouth $( datadir) /plymouth/themes/$( THEME) /$( THEME) .plymouth
rm -f $( datadir) /plymouth/themes/$( THEME) /*.in
#bootloader
boot : boot -images
DEFAULT_LANG = '--lang-to-subst--' PATH = $( PATH) :/usr/sbin make -C design-bootloader-source
install -d -m 755 $( sysconfdir) /../boot/splash/$( THEME)
install -d -m 755 $( datadir) /gfxboot/$( THEME)
install -m 644 design-bootloader-source/message $( sysconfdir) /../boot/splash/$( THEME)
install -m 644 design-bootloader-source/bootlogo $( datadir) /gfxboot/$( THEME)
2019-04-29 12:29:14 +03:00
#install -m644 bootloader/bootlogo $(datadir)/gfxboot/$(THEME)
2019-04-29 12:23:02 +03:00
#grub2
2019-05-24 16:21:37 +03:00
convert -size 16x16 -define png:color-type= 2 -depth 8 xc:'#001056' grub2/selected_blob_c.png
2019-04-29 12:23:02 +03:00
install -d -m 755 $( sysconfdir) /../boot/grub/themes/$( THEME)
2019-04-29 12:29:14 +03:00
cp -a grub2/* $( sysconfdir) /../boot/grub/themes/$( THEME) /
2019-04-29 12:23:02 +03:00
install -m 644 images/boot.png $( sysconfdir) /../boot/grub/themes/$( THEME) /boot.png
install -m 644 images/boot.jpg $( sysconfdir) /../boot/grub/themes/$( THEME) /grub.jpg
2019-06-03 17:26:19 +03:00
e l s e
boot : ; @:
boot-splash : ; @:
boot-images : ; @:
e n d i f
2019-04-29 12:23:02 +03:00
INDEXHTML_DIR = $( datadir) /doc/indexhtml
2019-05-24 18:54:23 +03:00
indexhtml :
2019-04-29 12:29:14 +03:00
for i in indexhtml/*.html indexhtml/*.css; do \
2019-04-29 12:23:02 +03:00
install -Dpm644 $$ i $( INDEXHTML_DIR) /` basename $$ i` ; \
done
install -Dpm644 /dev/null $( INDEXHTML_DIR) /index.html
2019-04-29 12:29:14 +03:00
cp -a indexhtml/images $( INDEXHTML_DIR)
2019-04-29 12:23:02 +03:00
for i in alt-docs documentation; do \
ln -s /usr/share/doc/$$ i $( INDEXHTML_DIR) /$$ i; \
done
2019-04-29 12:29:14 +03:00
install -Dpm644 indexhtml/indexhtml.desktop $( datadir) /applications/indexhtml.desktop
2019-04-29 12:23:02 +03:00
all : graphics
2019-04-30 11:53:43 +03:00
2017-10-17 15:05:14 +03:00
install : browser -qt ahttpd boot -images boot -splash @X 86@ indexhtml
2019-04-30 11:53:43 +03:00
# install product icon
2019-06-04 20:06:34 +03:00
# for size in 16 22 24 32 48 64 128; do \
# install -Dm 0644 icons/alt-$(THEME)-$$size.png $(datadir)/icons/hicolor/$${size}x$${size}/apps/alt-$(THEME).png; \
# done
# install -Dm 0644 icons/alt-$(THEME)-desktop.png $(datadir)/icons/hicolor/48x48/apps/alt-$(THEME)-desktop.png
2019-04-30 11:53:43 +03:00
install -d $( datadir) /design/{ $( THEME) ,backgrounds}
install -d $( datadir) /icons/hicolor/32x32/apps
cp -a backgrounds icons faces $( datadir) /design/$( THEME)
ln -s ../../../wallpapers $( datadir) /design/$( THEME) /backgrounds/more
install -d $( sysconfdir) /alternatives/packages.d
echo " /usr/share/design-current /usr/share/design/ $( THEME) 000012000000 " >> $( sysconfdir) /alternatives/packages.d/branding-$( BRAND) -$( THEME) -graphics
echo " /usr/share/design/current /usr/share/design/ $( THEME) 000012000000 " >> $( sysconfdir) /alternatives/packages.d/branding-$( BRAND) -$( THEME) -graphics
#release
mkdir -p $( sysconfdir) /buildreqs/packages/ignore.d/
install -pD -m644 /dev/null $( sysconfdir) /buildreqs/packages/ignore.d/$( BRAND) -$( THEME) -release
2017-03-10 16:42:06 +03:00
install -d $( datadir) /branding-data-current
install -pD -m644 systemd/os-release $( datadir) /branding-data-current/release/os-release
echo " $( PRODUCT_NAME) ( $( CODENAME) ) " >$( datadir) /branding-data-current/release/altlinux-release
2019-04-30 11:53:43 +03:00
for n in fedora redhat system; do \
ln -s altlinux-release $( sysconfdir) /$$ n-release; \
2017-03-10 16:42:06 +03:00
ln -s altlinux-release $( datadir) /branding-data-current/release/$$ n-release; \
done
for r in $( datadir) /branding-data-current/release/*-release; do \
f = " $$ {r##*/} " ; \
touch $( sysconfdir) /" $$ f " ; \
2019-04-30 11:53:43 +03:00
done
#notes
cd notes; \
install -d $( datadir) /alt-notes; \
2017-03-10 16:42:06 +03:00
cp -a livecd-*.html $( datadir) /alt-notes; \
cp -a release-notes.*.html $( datadir) /alt-notes; \
2019-04-30 11:53:43 +03:00
for relnotes in release-notes.*.html; do \
suffix = " $$ {relnotes#release-notes.} " ; \
ln -s $$ relnotes $( datadir) /alt-notes/livecd-finish.$$ suffix; \
done ; \
2017-03-10 16:42:06 +03:00
install -d $( datadir) /branding-data-current/alt-notes; \
cp -a license.*.html $( datadir) /branding-data-current/alt-notes; \
2019-04-30 11:53:43 +03:00
cd ..
2017-03-10 16:42:06 +03:00
for r in $( datadir) /branding-data-current/alt-notes/license.*.html; do \
f = " $$ {r##*/} " ; \
touch $( datadir) /alt-notes/" $$ f " ; \
done
2019-04-30 11:53:43 +03:00
#mate-settings
cd mate-settings; \
install -Dm644 50_mate-background.gschema.override $( datadir) /glib-2.0/schemas/50_mate-background.gschema.override; \
install -Dm644 60_mate-theme.gschema.override $( datadir) /glib-2.0/schemas/60_mate-theme.gschema.override; \
install -Dm644 Trolltech.conf $( sysconfdir) /skel/.config/Trolltech.conf; \
cd ..
install -d $( sysconfdir) /skel
install -Dm 644 gnome-settings/gtkrc-2 $( sysconfdir) /skel/.gtkrc-2.0
install -Dm 644 gnome-settings/gtk3-settings.ini $( sysconfdir) /skel/.config/gtk-3.0/settings.ini
#slideshow
mkdir -p $( datadir) /install2/slideshow
mkdir -p $( sysconfdir) /alterator
cp -a slideshow/* $( datadir) /install2/slideshow/
install slideshow/slideshow.conf $( sysconfdir) /alterator/
# Set English slideshow as default
#ln -s slides-en $(datadir)/install2/slideshow/slides
#indexhtml
install -d $( datadir) /doc/indexhtml
cp -a indexhtml/{ *.html,images} $( datadir) /doc/indexhtml
2019-05-23 13:06:03 +03:00
install -Dm755 indexhtml/indexhtml-desktop.desktop $( datadir) /kf5/kio_desktop/DesktopLinks/indexhtml.desktop
install -Dm755 indexhtml/indexhtml-desktop.desktop $( datadir) /Desktop/indexhtml.desktop