Split kali-theme into multiple top-level directories

That way every "part" that needs to be provided is visible as a
top-level directory and we can document in which context each directory
is used.
This commit is contained in:
Raphaël Hertzog
2019-11-01 18:08:08 +00:00
parent b92728c0de
commit 78a5785aa6
53 changed files with 71 additions and 74 deletions
+21 -61
View File
@@ -1,69 +1,29 @@
GRUB_THEMES=kali-theme/grub
DEFAULT_BACKGROUND=desktop-background
VENDOR_LOGOS=kali-logos
SUBDIRS=Grub-Background/kali emblems kali-logos
PIXMAPS=$(wildcard pixmaps/*.png)
DESKTOPFILES=$(wildcard *.desktop)
build:
$(foreach SUBDIR,$(SUBDIRS),make -C $(SUBDIR) build &&) true
# We populate desktop-base subdirectory with stuff to be installed into
# kali-desktop-base in the file structure expected by desktop-base
rm -rf desktop-base
mkdir -p desktop-base/kali-theme/grub
cp Grub-Background/kali/*.png Grub-Background/kali/*.sh desktop-base/kali-theme/grub/
cp -a LockScreen/kali desktop-base/kali-theme/lockscreen
cp -a Wallpapers/kali desktop-base/kali-theme/wallpaper
cp -a LoginScreen/kali desktop-base/kali-theme/login
ln -s /usr/share/plymouth/themes/kali desktop-base/kali-theme/plymouth
.PHONY: all clean install install-local
all: build-grub build-emblems build-logos
clean: clean-grub clean-emblems clean-logos
clean:
$(foreach SUBDIR,$(SUBDIRS),make -C $(SUBDIR) clean &&) true
rm -rf desktop-base/*
.PHONY: build-grub clean-grub install-grub
build-grub clean-grub install-grub:
@target=`echo $@ | sed s/-grub//`; \
for grub_theme in $(GRUB_THEMES) ; do \
if [ -f $$grub_theme/Makefile ] ; then \
$(MAKE) $$target -C $$grub_theme || exit 1; \
fi \
done
.PHONY: build-emblems clean-emblems install-emblems
build-emblems clean-emblems install-emblems:
@target=`echo $@ | sed s/-emblems//`; \
$(MAKE) $$target -C emblems-debian || exit 1;
.PHONY: build-logos clean-logos install-logos
build-logos clean-logos install-logos:
@target=`echo $@ | sed s/-logos//`; \
for vendor_logos in $(VENDOR_LOGOS); do \
$(MAKE) $$target -C $$vendor_logos || exit 1; \
done
install: install-grub install-emblems install-logos install-local
install-local:
mkdir -p $(DESTDIR)/usr/share/gnome-background-properties
# Kali theme
### Plymouth theme
install -d $(DESTDIR)/usr/share/plymouth/themes/kali
$(INSTALL) $(wildcard kali-theme/plymouth/*) $(DESTDIR)/usr/share/plymouth/themes/kali
install -d $(DESTDIR)/usr/share/desktop-base/kali-theme
cd $(DESTDIR)/usr/share/desktop-base/kali-theme && ln -s /usr/share/plymouth/themes/kali plymouth
$(INSTALL) kali-theme/plymouthd.defaults $(DESTDIR)/usr/share/desktop-base/kali-theme
### Login background
install -d $(DESTDIR)/usr/share/desktop-base/kali-theme/login
$(INSTALL) $(wildcard kali-theme/login/*) $(DESTDIR)/usr/share/desktop-base/kali-theme/login
### Wallpapers
install -d $(DESTDIR)/usr/share/desktop-base/kali-theme/wallpaper/contents/images
$(INSTALL) kali-theme/wallpaper/metadata.desktop $(DESTDIR)/usr/share/desktop-base/kali-theme/wallpaper
$(INSTALL) kali-theme/wallpaper/gnome-background.xml $(DESTDIR)/usr/share/desktop-base/kali-theme/wallpaper
$(INSTALL) $(wildcard kali-theme/wallpaper/contents/images/*) $(DESTDIR)/usr/share/desktop-base/kali-theme/wallpaper/contents/images/
$(INSTALL) kali-theme/gnome-wp-list.xml $(DESTDIR)/usr/share/gnome-background-properties/debian-kali.xml
# Wallpaper symlink for KDE
install:
# We use debhelper to install most files, but some subdirectories
# install files by themselves
$(foreach SUBDIR,$(SUBDIRS),make -C $(SUBDIR) install &&) true
# And we need a few supplementary symlinks for good integration
# KDE looks into /usr/share/wallpapers
install -d $(DESTDIR)/usr/share/wallpapers
cd $(DESTDIR)/usr/share/wallpapers && ln -s /usr/share/desktop-base/kali-theme/wallpaper Kali
### Lockscreen
install -d $(DESTDIR)/usr/share/desktop-base/kali-theme/lockscreen/contents/images
$(INSTALL) kali-theme/lockscreen/metadata.desktop $(DESTDIR)/usr/share/desktop-base/kali-theme/lockscreen
$(INSTALL) kali-theme/lockscreen/gnome-background.xml $(DESTDIR)/usr/share/desktop-base/kali-theme/lockscreen
$(INSTALL) $(wildcard kali-theme/lockscreen/contents/images/*) $(DESTDIR)/usr/share/desktop-base/kali-theme/lockscreen/contents/images/
# Lock screen symlink for KDE
install -d $(DESTDIR)/usr/share/wallpapers
cd $(DESTDIR)/usr/share/wallpapers && ln -s /usr/share/desktop-base/kali-theme/lockscreen KaliLockScreen
include Makefile.inc