livecd-tools/Makefile

96 lines
2.8 KiB
Makefile
Raw Normal View History

2011-04-26 13:21:24 +02:00
# Makefile for livecd-tools
# Copyright (c) 2004-2015 by Silvan Calarco <silvan.calarco@mambasoft.it>
2011-04-26 13:21:24 +02:00
# 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
libdir = ${prefix}/lib
2011-04-26 13:21:24 +02:00
mandir = ${prefix}/usr/share/man
datadir = ${prefix}/share
kdedatadir = ${kdeprefix}/share
iconsdir = ${datadir}/icons/hicolor
initrddir = ${sysconfdir}/rc.d/init.d
sysconfigdir= ${sysconfdir}/sysconfig
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
2011-08-25 21:37:48 +02:00
# package related variables
distdir = $(NAME)-$(VERSION)
dist_archive = $(distdir).tar.bz2
2011-04-26 13:21:24 +02:00
.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;\
done
install-dirs:
@$(INSTALL_DIR) $(DESTDIR)$(WALLPAPERS_DIR)
@$(INSTALL_DIR) $(DESTDIR)$(sbindir)
@$(INSTALL_DIR) $(DESTDIR)$(sysconfigdir)
@$(INSTALL_DIR) $(DESTDIR)$(SYSTEM_MENU_DIR)
@$(INSTALL_DIR) $(DESTDIR)/home/liveuser/
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/sudoers.d/
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)/systemd/system/
@$(INSTALL_DIR) $(DESTDIR)$(libdir)/calamares/modules/
2011-04-26 13:21:24 +02:00
install-icons:
@for i in 16x16 22x22 32x32 48x48 64x64 128x128; do \
$(INSTALL_DIR) $(DESTDIR)$(iconsdir)/$$i/apps/; \
$(INSTALL_DATA) installer-$$i.png $(DESTDIR)$(iconsdir)/$$i/apps/installer.png; \
2011-04-26 13:21:24 +02:00
done
install: install-dirs install-locales install-icons
$(INSTALL_DATA) tools/autovt@.service $(DESTDIR)$(sysconfdir)/systemd/system/
$(INSTALL_PROGRAM) liveuser-sudoers $(DESTDIR)$(sysconfdir)/sudoers.d/liveuser
$(INSTALL_DATA) openmamba-installer.desktop $(DESTDIR)$(SYSTEM_MENU_DIR)
cp -a liveuser/.kde4 $(DESTDIR)/home/liveuser/
cp -a calamares/etc/calamares $(DESTDIR)$(sysconfdir)/
cp -a calamares/openmamba-postinstall $(DESTDIR)$(libdir)/calamares/modules/
2011-04-26 13:21:24 +02:00
clean:
dist: clean
2011-08-25 21:37:48 +02:00
@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"
2011-04-26 13:21:24 +02:00
dist-rpm: dist
@rpm_sourcedir=`rpm --eval=%{_sourcedir}`;\
2011-08-25 21:37:48 +02:00
mv -f $(dist_archive) $$rpm_sourcedir;\
echo "and saved as \`$$rpm_sourcedir/$(dist_archive)'"