# Makefile for openmamba-desktop-kde4 # Copyright (C) 2004-2012 by Silvan Calarco # Copyright (C) 2005-2007 by Davide Madrisan include VERSION PACKAGE = desktop-base-kde4 DISTROID = openmamba RPM_VENDOR = openmamba RPM_DISTRIBUTION = openmamba RPM_DISTROEXT = mamba SYSCONFIGFILE = netsrpminstall WALLPAPERS = openmamba_Bamboo,openmamba_Circles DEFAULT_WALLPAPER = openmamba_Circles #SCREENSAVER = $(DISTROid).desktop SCREENSAVER = DISTROid = $(shell echo $(DISTROID) | tr A-Z a-z) DISTROICON = $(DISTROid) DESTDIR = prefix = /usr exec_prefix = ${prefix} sysconfdir = /etc sbindir = ${exec_prefix}/sbin bindir = ${exec_prefix}/bin datadir = ${prefix}/share initrddir = ${sysconfdir}/rc.d/init.d mandir = ${prefix}/usr/share/man sysconfigdir= ${sysconfdir}/sysconfig xprofiledir = ${sysconfdir}/xprofile.d mambabasedatadir = ${datadir}/openmamba/mambabase mambawelcomedatadir = ${datadir}/openmamba/mambawelcome bootrecoverdatadir = ${datadir}/openmamba/bootrecover iconsdir = ${datadir}/icons/hicolor kdeprefixdir = $(shell kde4-config --prefix) kdedatadir = $(kdeprefixdir)/share kdebindir = $(kdeprefixdir)/bin kdeautostartdir = ${kdedatadir}/autostart kdeconfigdir = ${kdedatadir}/config kdewallpapersdir = ${kdedatadir}/wallpapers kdeappsdir = ${kdedatadir}/apps kdeplasmadesktopupdatesdir = ${kdeappsdir}/plasma-desktop/updates localesdir = ${kdedatadir}/locale xdg_appsdir = ${datadir}/applications xdg_directorydir = ${datadir}/desktop-directories xdg_menudir = ${sysconfdir}/xdg/menus xdg_mergedmenudir = $(xdg_menudir)/applications-merged distrorootdir = ${datadir}/$(DISTROid) distrobindir = ${distrorootdir}/bin distrosrpmsdir = ${distrorootdir}/SRPMS distrokdedir = ${distrorootdir}/kde srcdir = . INSTALL = /usr/bin/install INSTALL_PROGRAM = ${INSTALL} -m 755 INSTALL_DATA = ${INSTALL} -m 644 INSTALL_DIR = ${INSTALL} -d -m 755 INSTALL_SCRIPT = ${INSTALL_PROGRAM} #pck_srpms = flashplugin jre msttcorefonts win32codecs pck_srpms = flashplugin msttcorefonts win32codecs skype pck_infiles := $(wildcard kde/config/*.in \ kde/scripts/*.in \ kde/wallpapers/*.in \ SRPMS/*/*.in) pck_sysconfigfile := distroutils.sysconfig distdir = $(PACKAGE)-$(VERSION) dist_archive = $(distdir).tar.bz2 pck_catalogs := $(wildcard mambabase/po/*.po) pck_catalogs1 := $(wildcard mambawelcome/po/*.po) pck_catalogs2 := $(wildcard bootrecover/po/*.po) .SUFFIXES: .SUFFIXES: .in .po .mo .in:; @echo "generating $@..."; \ sed "s,@distroID@,$(DISTROID),g;\ s,@distroid@,$(DISTROid),g;\ s,@distroicon@,$(DISTROICON),g;\ s,@distribution@,$(RPM_DISTRIBUTION),g;\ s,@distroext@,$(RPM_DISTROEXT),g;\ s,@vendor@,$(RPM_VENDOR),g;\ s,@sysconfigfile@,$(SYSCONFIGFILE),g;\ s,@datadir@,${datadir},g;\ s,@distrobindir@,$(distrobindir),g;\ s,@distrokdedir@,$(distrokdedir),g;\ s,@distrosrpmsdir@,$(distrosrpmsdir),g;\ s,@wallpaper@,$(DEFAULT_WALLPAPER),g;\ s,@screensaver@,${SCREENSAVER},g;" $< > $@ all: dist-update locales wallpapers dist-update: $(pck_infiles:.in=) .po.mo:; msgfmt $< -o $@ locales: $(pck_catalogs:.po=.mo) $(pck_catalogs1:.po=.mo) $(pck_catalogs2:.po=.mo) wallpapers: @for w in openmamba_Circles; do \ mkdir -p kde/wallpapers/$${w}/contents/images; \ convert src/wallpapers/$${w}.svg +repage -gravity SouthEast -resize 400 -crop 400x250+0+0 +repage kde/wallpapers/$${w}/contents/screenshot.png; \ for s in 1024x768 1280x1024 1280x800 1440x900 1600x1200 1920x1200; do \ convert src/wallpapers/$${w}.svg +repage -gravity SouthEast -resize $${s/x*} -crop $${s}+0+0 +repage kde/wallpapers/$${w}/contents/images/$${s}.png; \ done; done install-kde-distro-addons: dist-update @$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/pam.d @$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/sudoers.d/ @$(INSTALL_DIR) $(DESTDIR)$(bindir) @$(INSTALL_DIR) $(DESTDIR)$(datadir) @$(INSTALL_DIR) $(DESTDIR)$(sbindir) @$(INSTALL_DIR) $(DESTDIR)$(distrobindir) @$(INSTALL_DIR) $(DESTDIR)$(distrokdedir) @$(INSTALL_DIR) $(DESTDIR)$(kdedatadir) @$(INSTALL_DIR) $(DESTDIR)$(kdeautostartdir) @$(INSTALL_DIR) $(DESTDIR)$(kdebindir) @$(INSTALL_DIR) $(DESTDIR)$(kdeconfigdir) @$(INSTALL_DIR) $(DESTDIR)$(kdewallpapersdir) @$(INSTALL_DIR) $(DESTDIR)$(kdeplasmadesktopupdatesdir) @$(INSTALL_DIR) $(DESTDIR)$(xprofiledir) $(INSTALL_DATA) etc/pam.d/kde $(DESTDIR)$(sysconfdir)/pam.d/ $(INSTALL_DATA) etc/pam.d/kde-np $(DESTDIR)$(sysconfdir)/pam.d/ $(INSTALL_DATA) etc/sudoers.d/kde4 $(DESTDIR)$(sysconfdir)/sudoers.d/kde4 cp -r kde/apps $(DESTDIR)$(kdedatadir) $(INSTALL_DATA) kde/autostart/mambatray.desktop $(DESTDIR)$(kdeautostartdir)/mambatray.desktop $(INSTALL_DATA) kde/config/compizrc $(DESTDIR)$(kdeconfigdir)/compizrc $(INSTALL_DATA) kde/config/kcmfonts $(DESTDIR)$(kdeconfigdir)/kcmfonts $(INSTALL_DATA) kde/config/kcminputrc $(DESTDIR)$(kdeconfigdir)/kcminputrc $(INSTALL_DATA) kde/config/kcmthememanagerrc $(DESTDIR)$(kdeconfigdir)/kcmthememanagerrc $(INSTALL_DATA) kde/config/kdeglobals $(DESTDIR)$(kdeconfigdir)/kdeglobals $(INSTALL_DATA) kde/config/kdesktoprc $(DESTDIR)$(kdeconfigdir)/kdesktoprc $(INSTALL_DATA) kde/config/kdesurc $(DESTDIR)$(kdeconfigdir)/kdesurc $(INSTALL_DATA) kde/config/kglobalshortcutsrc $(DESTDIR)$(kdeconfigdir)/kglobalshortcutsrc $(INSTALL_DATA) kde/config/kickoffrc $(DESTDIR)$(kdeconfigdir)/kickoffrc $(INSTALL_DATA) kde/config/kmilodrc $(DESTDIR)$(kdeconfigdir)/kmilodrc $(INSTALL_DATA) kde/config/kmixrc $(DESTDIR)$(kdeconfigdir)/kmixrc $(INSTALL_DATA) kde/config/konsolerc $(DESTDIR)$(kdeconfigdir)/konsolerc $(INSTALL_DATA) kde/config/kwalletrc $(DESTDIR)$(kdeconfigdir)/kwalletrc $(INSTALL_DATA) kde/config/kwinrc $(DESTDIR)$(kdeconfigdir)/kwinrc $(INSTALL_DATA) kde/config/nepomukserverrc $(DESTDIR)$(kdeconfigdir)/nepomukserverrc $(INSTALL_DATA) kde/config/oxygenrc $(DESTDIR)$(kdeconfigdir)/oxygenrc $(INSTALL_DATA) kde/config/plasma-desktop-appletsrc $(DESTDIR)$(kdeconfigdir)/plasma-desktop-appletsrc $(INSTALL_DATA) kde/config/plasma-desktoprc $(DESTDIR)$(kdeconfigdir)/plasma-desktoprc $(INSTALL_DATA) kde/config/powerdevilrc $(DESTDIR)$(kdeconfigdir)/powerdevilrc cp -a kde/wallpapers/{$(WALLPAPERS)} $(DESTDIR)$(kdewallpapersdir) cp -a kde/desktoptheme $(DESTDIR)$(kdeappsdir)/ $(INSTALL_SCRIPT) bin/kickoffcfg $(DESTDIR)$(kdebindir)/kickoffcfg install-srpms: @$(INSTALL_DIR) $(DESTDIR)$(distrosrpmsdir) @$(INSTALL_DIR) $(DESTDIR)$(sysconfigdir) :> $(DESTDIR)$(sysconfigdir)/$(SYSCONFIGFILE) @$(INSTALL_DIR) $(DESTDIR)$(sysconfigdir) for pck in $(pck_srpms); do\ rpmbuild -bs SRPMS/$$pck/$${pck}.spec \ --define="_sourcedir `pwd`/SRPMS/$$pck" \ --define="_srcrpmdir $(DESTDIR)$(distrosrpmsdir)" || exit 1;\ cat SRPMS/$$pck/$(pck_sysconfigfile) >> \ $(DESTDIR)$(sysconfigdir)/$(SYSCONFIGFILE);\ done install-icons: @for i in 16x16 22x22 32x32 48x48 64x64 128x128; do \ $(INSTALL_DIR) $(DESTDIR)$(iconsdir)/$$i/apps/; \ done install: $(pck_infiles:.in=) \ install-kde-distro-addons \ install-icons dist: clean @git log > ChangeLog.git @mkdir /tmp/$(distdir) @cp -a * /tmp/$(distdir)/ @rm -f $(dist_archive);\ tar cf - -C /tmp $(distdir) | bzip2 -9 -c > $(dist_archive) @rm -rf /tmp/$(distdir) @echo "file \`$(dist_archive)' created" dist-rpm: dist @rpm_sourcedir=`rpm --eval=%{_sourcedir}`;\ mv -f $(dist_archive) $$rpm_sourcedir;\ echo "and saved as \`$$rpm_sourcedir/$(dist_archive)'" clean: rm -f $(dist_archive) rm -f $(patsubst %.in,%,$(pck_infiles)) rm -rf kde/wallpapers/openmamba_Circles/contents