2011-04-26 13:25:32 +02:00
|
|
|
# Makefile for openmamba-desktop-base
|
|
|
|
# Copyright (C) 2004-2009 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
|
|
# Copyright (C) 2005-2007 by Davide Madrisan <davide.madrisan@gmail.com>
|
|
|
|
|
|
|
|
include VERSION
|
|
|
|
include SRPMSVERSIONS
|
|
|
|
|
|
|
|
PACKAGE = desktop-base-openmamba
|
|
|
|
|
|
|
|
DISTROID = openmamba
|
|
|
|
|
|
|
|
RPM_VENDOR = openmamba
|
|
|
|
RPM_DISTRIBUTION = openmamba
|
|
|
|
RPM_DISTROEXT = mamba
|
|
|
|
|
|
|
|
SYSCONFIGFILE = netsrpminstall
|
|
|
|
|
|
|
|
WALLPAPER = openmamba-wallpaper
|
|
|
|
WALLPAPERS = openmamba_green.jpg,openmamba_gray.png,openmamba_transparent.png
|
|
|
|
DEFAULT_WALLPAPER = openmamba_green.jpg
|
|
|
|
COMPIZ_WALLPAPERS = openmamba_skydome.png,openmamba_top.png,openmamba_bottom.png
|
|
|
|
|
|
|
|
#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
|
|
|
|
mambabasedatadir = ${datadir}/openmamba/mambabase
|
|
|
|
mambareportdatadir = ${datadir}/openmamba/mambareport
|
|
|
|
mambawelcomedatadir = ${datadir}/openmamba/mambawelcome
|
|
|
|
mambaimagesdir = ${datadir}/openmamba/images
|
|
|
|
xramdrdatadir = ${datadir}/openmamba/xramdr
|
|
|
|
bootrecoverdatadir = ${datadir}/openmamba/bootrecover
|
|
|
|
usbinstalldatadir = ${datadir}/openmamba/usbinstall
|
|
|
|
iconsdir = ${datadir}/icons/hicolor
|
|
|
|
kdeprefixdir = $(shell kde-config --prefix)
|
|
|
|
kde4prefixdir = $(shell kde4-config --prefix)
|
|
|
|
kdedatadir = $(kdeprefixdir)/share
|
|
|
|
kde4bindir = $(kde4prefixdir)/bin
|
|
|
|
kdeautostartdir = ${kdedatadir}/autostart
|
|
|
|
kdeconfigdir = ${kdedatadir}/config
|
|
|
|
kdewallpapersdir = ${kdedatadir}/wallpapers
|
|
|
|
localesdir = ${datadir}/locale
|
|
|
|
kdelocalesdir = ${kdedatadir}/locale
|
|
|
|
aptconfdir = ${sysconfdir}/apt/apt.conf.d
|
|
|
|
aptscriptsdir = ${datadir}/apt/scripts
|
|
|
|
|
|
|
|
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_kdedesktop = $(wildcard kde/desktop/*)
|
|
|
|
#pck_srpms = flashplugin jre msttcorefonts win32codecs
|
|
|
|
pck_srpms = flashplugin msttcorefonts win32codecs skype b43-firmware
|
|
|
|
|
|
|
|
pck_infiles := $(wildcard kde/config/*.in \
|
|
|
|
kde/scripts/*.in \
|
|
|
|
kde/wallpapers/*.in \
|
|
|
|
menu/*.in menu/applications/*.in menu/applications/*/*.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)
|
|
|
|
pck_catalogs3 := $(wildcard usbinstall/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;\
|
2011-04-27 00:31:05 +02:00
|
|
|
s,@bindir@,$(bindir),g;\
|
2011-04-26 13:25:32 +02:00
|
|
|
s,@distrobindir@,$(distrobindir),g;\
|
|
|
|
s,@distrokdedir@,$(distrokdedir),g;\
|
|
|
|
s,@distrosrpmsdir@,$(distrosrpmsdir),g;\
|
|
|
|
s,@wallpaper@,$(DEFAULT_WALLPAPER),g;\
|
|
|
|
s,@screensaver@,${SCREENSAVER},g;\
|
|
|
|
s,@flashpluginver@,${FLASHPLUGIN_VERSION},g;\
|
|
|
|
s,@win32codecsver@,${WIN32CODECS_VERSION},g;\
|
|
|
|
s,@skypever@,${SKYPE_VERSION},g" $< > $@
|
|
|
|
|
|
|
|
all: dist-update locales
|
|
|
|
|
|
|
|
dist-update: $(pck_infiles:.in=)
|
|
|
|
|
|
|
|
.po.mo:; msgfmt $< -o $@
|
|
|
|
|
|
|
|
locales: $(pck_catalogs:.po=.mo) $(pck_catalogs1:.po=.mo) $(pck_catalogs2:.po=.mo) $(pck_catalogs3:.po=.mo)
|
|
|
|
|
|
|
|
install-locales: locales
|
|
|
|
@for f in $(pck_catalogs); do\
|
|
|
|
lang=`echo $$f | sed 's,.*/\(.*\)\.po,\1,'`;\
|
|
|
|
echo "installing i18n file for language \`$$lang'...";\
|
|
|
|
dir="$(DESTDIR)$(kdelocalesdir)/$$lang/LC_MESSAGES";\
|
|
|
|
$(INSTALL_DIR) $$dir;\
|
|
|
|
$(INSTALL_DATA) $${f/.po/.mo} $$dir/mambabase.mo;\
|
|
|
|
done
|
|
|
|
@for f in $(pck_catalogs1); do\
|
|
|
|
lang=`echo $$f | sed 's,.*/\(.*\)\.po,\1,'`;\
|
|
|
|
echo "installing i18n file for language \`$$lang'...";\
|
|
|
|
dir="$(DESTDIR)$(kdelocalesdir)/$$lang/LC_MESSAGES";\
|
|
|
|
$(INSTALL_DIR) $$dir;\
|
|
|
|
$(INSTALL_DATA) $${f/.po/.mo} $$dir/mambawelcome.mo;\
|
|
|
|
done
|
|
|
|
@for f in $(pck_catalogs2); do\
|
|
|
|
lang=`echo $$f | sed 's,.*/\(.*\)\.po,\1,'`;\
|
|
|
|
echo "installing i18n file for language \`$$lang'...";\
|
|
|
|
dir="$(DESTDIR)$(kdelocalesdir)/$$lang/LC_MESSAGES";\
|
|
|
|
$(INSTALL_DIR) $$dir;\
|
|
|
|
$(INSTALL_DATA) $${f/.po/.mo} $$dir/bootrecover.mo;\
|
|
|
|
done
|
|
|
|
@for f in $(pck_catalogs3); do\
|
|
|
|
lang=`echo $$f | sed 's,.*/\(.*\)\.po,\1,'`;\
|
|
|
|
echo "installing i18n file for language \`$$lang'...";\
|
|
|
|
dir="$(DESTDIR)$(localesdir)/$$lang/LC_MESSAGES";\
|
|
|
|
$(INSTALL_DIR) $$dir;\
|
|
|
|
$(INSTALL_DATA) $${f/.po/.mo} $$dir/usbinstall.mo;\
|
|
|
|
done
|
|
|
|
|
|
|
|
install-kde-distro-addons: dist-update
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(bindir)
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(datadir)
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(sbindir)
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(distrobindir)
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(kde4bindir)
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(kdedatadir)
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(kdeautostartdir)
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(kdeconfigdir)
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(kdewallpapersdir)
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(mambaimagesdir)
|
|
|
|
cp -r etc/polkit-1 $(DESTDIR)$(sysconfdir)/
|
2011-06-07 15:28:19 +02:00
|
|
|
cp -r etc/prelink.conf.d $(DESTDIR)$(sysconfdir)/
|
2011-04-26 13:25:32 +02:00
|
|
|
$(INSTALL_SCRIPT) kde/scripts/showlog $(DESTDIR)$(distrobindir)
|
|
|
|
cp -r menu/icons/ $(DESTDIR)$(datadir)/icons/
|
|
|
|
cp -r kde/apps $(DESTDIR)$(kdedatadir)
|
|
|
|
$(INSTALL_DATA) kde/autostart/kmix.desktop $(DESTDIR)$(kdeautostartdir)/kmix.desktop
|
|
|
|
$(INSTALL_DATA) kde/config/*rc $(DESTDIR)$(kdeconfigdir)/
|
|
|
|
$(INSTALL_DATA) kde/config/kcmfonts $(DESTDIR)$(kdeconfigdir)/kcmfonts
|
|
|
|
$(INSTALL_DATA) kde/config/kdeglobals $(DESTDIR)$(kdeconfigdir)/kdeglobals
|
|
|
|
$(INSTALL_DATA) kde/wallpapers/$(WALLPAPER).desktop $(DESTDIR)$(kdewallpapersdir)
|
|
|
|
$(INSTALL_DATA) kde/wallpapers/{$(WALLPAPERS)} $(DESTDIR)$(kdewallpapersdir)
|
|
|
|
$(INSTALL_DATA) kde/wallpapers/{$(COMPIZ_WALLPAPERS)} $(DESTDIR)$(mambaimagesdir)
|
2011-06-02 15:05:00 +02:00
|
|
|
# $(INSTALL_SCRIPT) kde/bin/konsole-nofork $(DESTDIR)$(kde4bindir)
|
2011-04-26 13:25:32 +02:00
|
|
|
|
|
|
|
install-distromenu: dist-update
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(xdg_directorydir)
|
|
|
|
$(INSTALL_DATA) menu/applications/distroutils.directory \
|
|
|
|
$(DESTDIR)$(xdg_directorydir)/$(DISTROID).directory
|
|
|
|
$(INSTALL_DATA) menu/applications/distroutils-netinstall.directory \
|
|
|
|
$(DESTDIR)$(xdg_directorydir)/$(DISTROID)-NetInstall.directory
|
|
|
|
$(INSTALL_DATA) menu/applications/distroutils-logs.directory \
|
|
|
|
$(DESTDIR)$(xdg_directorydir)/$(DISTROID)-Logs.directory
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(xdg_mergedmenudir)
|
|
|
|
$(INSTALL_DATA) menu/applications/distroutils.menu \
|
|
|
|
$(DESTDIR)$(xdg_mergedmenudir)/$(DISTROid).menu
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(xdg_appsdir)
|
|
|
|
for pck in $(pck_srpms); do\
|
|
|
|
$(INSTALL_DATA) menu/applications/netinstall/$$pck.desktop \
|
|
|
|
$(DESTDIR)$(xdg_appsdir)/$(DISTROid)-$$pck.desktop;\
|
|
|
|
done
|
|
|
|
cp menu/applications/logs/*.desktop $(DESTDIR)$(xdg_appsdir)
|
|
|
|
|
|
|
|
install-srpms:
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(distrosrpmsdir)
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(sysconfigdir)
|
|
|
|
@cat SRPMSVERSIONS > $(DESTDIR)$(sysconfigdir)/$(SYSCONFIGFILE)
|
|
|
|
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/; \
|
|
|
|
$(INSTALL_DATA) mambabase/mamba-$$i.png $(DESTDIR)$(iconsdir)/$$i/apps/mamba.png; \
|
|
|
|
$(INSTALL_DATA) mambawelcome/mambawelcome-$$i.png $(DESTDIR)$(iconsdir)/$$i/apps/mambawelcome.png; \
|
|
|
|
# $(INSTALL_DATA) xramdr/xramdr-$$i.png $(DESTDIR)$(iconsdir)/$$i/apps/xramdr.png; \
|
|
|
|
$(INSTALL_DATA) bootrecover/bootrecover-$$i.png $(DESTDIR)$(iconsdir)/$$i/apps/bootrecover.png; \
|
|
|
|
done
|
|
|
|
|
|
|
|
install-mambabase:
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(mambabasedatadir)
|
|
|
|
$(INSTALL_SCRIPT) mambabase/mambabase.kmdr $(DESTDIR)$(mambabasedatadir)
|
|
|
|
$(INSTALL_DATA) mambabase/mambabase.db $(DESTDIR)$(mambabasedatadir)
|
|
|
|
$(INSTALL_SCRIPT) mambabase/mambabase.sh $(DESTDIR)$(mambabasedatadir)
|
|
|
|
$(INSTALL_DATA) mambabase/mambabase.desktop $(DESTDIR)$(xdg_appsdir)
|
|
|
|
$(INSTALL_DATA) mambabase/mambabase-autostart.desktop $(DESTDIR)$(mambabasedatadir)
|
|
|
|
|
|
|
|
install-mambareport:
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(mambareportdatadir)
|
|
|
|
$(INSTALL_SCRIPT) mambareport/mambareport.kmdr $(DESTDIR)$(mambareportdatadir)
|
|
|
|
$(INSTALL_SCRIPT) mambareport/openmamba-makereport $(DESTDIR)$(bindir)
|
|
|
|
$(INSTALL_DATA) mambareport/mambareport.desktop $(DESTDIR)$(xdg_appsdir)
|
|
|
|
|
|
|
|
install-mambawelcome:
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(mambawelcomedatadir)
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/rc.d/{init.d,rc5.d}
|
|
|
|
$(INSTALL_SCRIPT) mambawelcome/mambawelcome.kmdr $(DESTDIR)$(mambawelcomedatadir)
|
|
|
|
$(INSTALL_SCRIPT) mambawelcome/mambawelcome.sh $(DESTDIR)$(mambawelcomedatadir)
|
|
|
|
$(INSTALL_SCRIPT) mambawelcome/mambawelcome-init $(DESTDIR)$(sysconfdir)/rc.d/init.d/mambawelcome
|
|
|
|
$(INSTALL_DATA) gpl.html $(DESTDIR)$(mambawelcomedatadir)/gpl.html
|
|
|
|
$(INSTALL_DATA) gpl-it.html $(DESTDIR)$(mambawelcomedatadir)/gpl-it.html
|
|
|
|
$(INSTALL_DATA) gpl-es.html $(DESTDIR)$(mambawelcomedatadir)/gpl-es.html
|
|
|
|
ln -s ../init.d/mambawelcome $(DESTDIR)$(sysconfdir)/rc.d/rc5.d/S99mambawelcome
|
|
|
|
|
|
|
|
install-xramdr:
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(xramdrdatadir)
|
|
|
|
$(INSTALL_SCRIPT) xramdr/70521-xramdr.kmdr $(DESTDIR)$(xramdrdatadir)/xramdr.kmdr
|
|
|
|
$(INSTALL_DATA) xramdr/xramdr.desktop $(DESTDIR)$(xdg_appsdir)
|
|
|
|
|
|
|
|
install-bootrecover:
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(bootrecoverdatadir)
|
|
|
|
$(INSTALL_SCRIPT) bootrecover/bootrecover.kmdr $(DESTDIR)$(bootrecoverdatadir)
|
|
|
|
$(INSTALL_SCRIPT) bootrecover/bootrecover.sh $(DESTDIR)$(bootrecoverdatadir)
|
|
|
|
$(INSTALL_DATA) bootrecover/openmamba-bootrecover.desktop $(DESTDIR)$(xdg_appsdir)
|
|
|
|
|
|
|
|
install-apt-extras:
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(aptconfdir) $(DESTDIR)$(aptscriptsdir)
|
|
|
|
$(INSTALL_DATA) apt/post-install.conf $(DESTDIR)$(aptconfdir)
|
|
|
|
$(INSTALL_SCRIPT) apt/post-install.lua $(DESTDIR)$(aptscriptsdir)
|
|
|
|
$(INSTALL_SCRIPT) apt/post-install.sh $(DESTDIR)$(aptscriptsdir)
|
|
|
|
|
|
|
|
install-usbinstall:
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(usbinstalldatadir)
|
|
|
|
$(INSTALL_SCRIPT) usbinstall/usbinstall.sh $(DESTDIR)$(usbinstalldatadir)
|
|
|
|
$(INSTALL_DATA) usbinstall/usbinstall.desktop $(DESTDIR)$(xdg_appsdir)
|
|
|
|
|
2011-04-27 00:31:05 +02:00
|
|
|
install-openmamba-update:
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(bindir)
|
|
|
|
$(INSTALL_SCRIPT) openmamba-update/openmamba-update $(DESTDIR)$(bindir)
|
|
|
|
$(INSTALL_SCRIPT) openmamba-update/openmamba-netsrpms $(DESTDIR)$(bindir)
|
|
|
|
|
2011-04-26 13:25:32 +02:00
|
|
|
install: $(pck_infiles:.in=) \
|
|
|
|
install-kde-distro-addons \
|
|
|
|
install-distromenu \
|
|
|
|
install-srpms \
|
|
|
|
install-mambabase \
|
|
|
|
install-mambawelcome \
|
|
|
|
install-mambareport \
|
|
|
|
install-usbinstall \
|
2011-04-27 00:31:05 +02:00
|
|
|
install-openmamba-update \
|
2011-04-26 13:25:32 +02:00
|
|
|
install-bootrecover \
|
|
|
|
install-locales \
|
|
|
|
install-icons \
|
|
|
|
install-apt-extras
|
|
|
|
|
|
|
|
dist: clean
|
2011-06-07 15:35:19 +02:00
|
|
|
@git log > ChangeLog.git
|
2011-04-27 00:31:05 +02:00
|
|
|
@mkdir /tmp/$(distdir)
|
|
|
|
@cp -a * /tmp/$(distdir)/
|
2011-04-26 13:25:32 +02:00
|
|
|
@rm -f $(dist_archive);\
|
2011-04-27 00:31:05 +02:00
|
|
|
tar cf - -C /tmp $(distdir) | bzip2 -9 -c > $(dist_archive)
|
|
|
|
@rm -rf /tmp/$(distdir)
|
2011-04-26 13:25:32 +02:00
|
|
|
@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 -f $(pck_catalogs:.po=.mo)
|
|
|
|
rm -f $(pck_catalogs1:.po=.mo)
|
|
|
|
rm -f $(pck_catalogs2:.po=.mo)
|
|
|
|
rm -f $(pck_catalogs3:.po=.mo)
|
|
|
|
|