livecd-tools/Makefile
2011-04-26 13:21:24 +02:00

90 lines
2.8 KiB
Makefile

# Makefile for livecd-tools
# Copyright (c) 2004-2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Released under the terms of the GNU GPLv3 license
NAME=livecd-tools
include VERSION
# System locations
prefix = /usr
kdeprefix = /opt/kde3
exec_prefix = ${prefix}
sysconfdir = /etc
sbindir = /sbin
bindir = ${exec_prefix}/bin
mandir = ${prefix}/usr/share/man
datadir = ${prefix}/share
kdedatadir = ${kdeprefix}/share
iconsdir = ${datadir}/icons/hicolor
initrddir = ${sysconfdir}/rc.d/init.d
sysconfigdir= ${sysconfdir}/sysconfig
installerdatadir = ${datadir}/openmamba/installer
localesdir = ${kdedatadir}/locale
srcdir = .
DESTDIR =
INSTALL = /usr/bin/install
INSTALL_PROGRAM = ${INSTALL} -m 755
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_DIR = ${INSTALL} -d -m 755
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
KDEMENU_DIR = ${kdedatadir}/applnk
SYSTEM_MENU_DIR = ${datadir}/applications
WALLPAPERS_DIR = ${kdedatadir}/wallpapers
STATIC_DIR = /static
pck_catalogs := $(wildcard installer/po/*.po)
.SUFFIXES:
.SUFFIXES: .po .mo
.po.mo:; msgfmt $< -o $@
all: locales
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)$(localesdir)/$$lang/LC_MESSAGES";\
$(INSTALL_DIR) $$dir;\
$(INSTALL_DATA) $${f/.po/.mo} $$dir/installer.mo;\
done
install-dirs:
@$(INSTALL_DIR) $(DESTDIR)$(WALLPAPERS_DIR)
@$(INSTALL_DIR) $(DESTDIR)$(sbindir)
@$(INSTALL_DIR) $(DESTDIR)$(sysconfigdir)
@$(INSTALL_DIR) $(DESTDIR)$(installerdatadir)
@$(INSTALL_DIR) $(DESTDIR)$(SYSTEM_MENU_DIR)
install-icons:
@for i in 16x16 22x22 32x32 48x48 64x64 128x128; do \
$(INSTALL_DIR) $(DESTDIR)$(iconsdir)/$$i/apps/; \
$(INSTALL_DATA) installer/installer-$$i.png $(DESTDIR)$(iconsdir)/$$i/apps/installer.png; \
done
install: install-dirs install-locales install-icons
$(INSTALL_PROGRAM) tools/eject_cd.sh $(DESTDIR)$(sbindir)
$(INSTALL_PROGRAM) tools/login.live $(DESTDIR)$(sbindir)
$(INSTALL_DATA) installer/config.sample $(DESTDIR)$(sysconfigdir)/installer
$(INSTALL_DATA) gpl.html $(DESTDIR)$(installerdatadir)/gpl.html
$(INSTALL_DATA) gpl-it.html $(DESTDIR)$(installerdatadir)/gpl-it.html
$(INSTALL_DATA) gpl-es.html $(DESTDIR)$(installerdatadir)/gpl-es.html
$(INSTALL_PROGRAM) installer/installer.kmdr $(DESTDIR)$(installerdatadir)
$(INSTALL_PROGRAM) installer/*.sh $(DESTDIR)$(installerdatadir)
$(INSTALL_DATA) installer/openmamba-installer.desktop $(DESTDIR)$(SYSTEM_MENU_DIR)
clean:
dist: clean
@tar cf - -C .. $(NAME)-$(VERSION) --exclude=$(NAME)-$(VERSION).tar.bz2 | bzip2 -9 -c > $(NAME)-$(VERSION).tar.bz2
rm -f $(pck_catalogs:.po=.mo)
dist-rpm: dist
@rpm_sourcedir=`rpm --eval=%{_sourcedir}`;\
mv -f $(NAME)-$(VERSION).tar.bz2 $$rpm_sourcedir;\
echo "File $$rpm_sourcedir/$(NAME)-$(VERSION).tar.bz2 created."