75 lines
2.0 KiB
Makefile
75 lines
2.0 KiB
Makefile
# Makefile for livecd-tools
|
|
# Copyright (c) 2011 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
# Released under the terms of the GNU GPLv3 license
|
|
|
|
NAME=mambatray
|
|
|
|
include VERSION
|
|
|
|
# System locations
|
|
prefix = /usr
|
|
exec_prefix = ${prefix}
|
|
sysconfdir = /etc
|
|
sbindir = /sbin
|
|
bindir = ${exec_prefix}/bin
|
|
mandir = ${prefix}/usr/share/man
|
|
datadir = ${prefix}/share
|
|
iconsdir = ${datadir}/icons/hicolor
|
|
initrddir = ${sysconfdir}/rc.d/init.d
|
|
sysconfigdir= ${sysconfdir}/sysconfig
|
|
localesdir = ${datadir}/locale
|
|
xdgautostartdir = ${sysconfdir}/xdg/autostart
|
|
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}
|
|
|
|
pck_catalogs := $(wildcard 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/mambatray.mo;\
|
|
done
|
|
|
|
install-dirs:
|
|
@$(INSTALL_DIR) $(DESTDIR)$(bindir)
|
|
@$(INSTALL_DIR) $(DESTDIR)$(xdgautostartdir)
|
|
|
|
install-icons:
|
|
@for i in 16 22 32 64 128; do \
|
|
$(INSTALL_DIR) $(DESTDIR)$(iconsdir)/$${i}x$${i}/apps/; \
|
|
$(INSTALL_DATA) icons/hi$$i-app-mambatray.png $(DESTDIR)$(iconsdir)/$${i}x$${i}/apps/mambatray.png; \
|
|
done
|
|
|
|
install: install-dirs install-locales install-icons
|
|
$(INSTALL_PROGRAM) src/mambatray $(DESTDIR)$(bindir)/mambatray
|
|
$(INSTALL_DATA) mambatray.desktop $(DESTDIR)$(xdgautostartdir)/mambatray.desktop
|
|
|
|
clean:
|
|
|
|
dist: clean
|
|
@git log > NEWS
|
|
@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."
|