mambawelcome/Makefile

122 lines
3.6 KiB
Makefile
Raw Permalink Normal View History

# Makefile for mambawelcome
# Copyright (C) 2012 by Silvan Calarco <silvan.calarco@mambasoft.it>
include VERSION
PACKAGE = mambawelcome
DISTROID = openmamba
RPM_VENDOR = openmamba
RPM_DISTRIBUTION = openmamba
RPM_DISTROEXT = mamba
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
mambawelcomedatadir = ${datadir}/openmamba/mambawelcome
iconsdir = ${datadir}/icons/hicolor
kdeprefixdir = $(shell kde-config --prefix)
kdedatadir = $(kdeprefixdir)/share
kdeautostartdir = ${kdedatadir}/autostart
kdeconfigdir = ${kdedatadir}/config
kdewallpapersdir = ${kdedatadir}/wallpapers
localesdir = ${datadir}/locale
kdelocalesdir = ${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
distrodesktopdir = ${distrorootdir}/desktop
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}
distdir = $(PACKAGE)-$(VERSION)
dist_archive = $(distdir).tar.bz2
pck_catalogs := $(wildcard po/*.po)
.po.mo:; msgfmt $< -o $@
locales: $(pck_catalogs:.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/mambawelcome.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)
cp -r menu/icons/ $(DESTDIR)$(datadir)/icons/
install-icons:
@for i in 16x16 22x22 32x32 48x48 64x64 128x128; do \
$(INSTALL_DATA) mambawelcome-$$i.png $(DESTDIR)$(iconsdir)/$$i/apps/mambawelcome.png; \
done
install-mambawelcome:
@$(INSTALL_DIR) $(DESTDIR)$(mambawelcomedatadir)
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/rc.d/{init.d,rc5.d}
@$(INSTALL_DIR) $(DESTDIR)$(kdeconfigdir)
# $(INSTALL_SCRIPT) mambawelcome/mambawelcome.kmdr $(DESTDIR)$(mambawelcomedatadir)
$(INSTALL_SCRIPT) mambawelcome.sh $(DESTDIR)$(mambawelcomedatadir)
$(INSTALL_SCRIPT) 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: $(pck_infiles:.in=) \
install-kde-distro-addons \
install-mambawelcome \
install-locales \
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 $(pck_catalogs:.po=.mo)