mambatray/Makefile

76 lines
1.9 KiB
Makefile
Raw Normal View History

# Makefile for mambatray
# Copyright (c) 2011-2022 by Silvan Calarco <silvan.calarco@mambasoft.it>
2011-04-26 21:25:03 +02:00
# Released under the terms of the GNU GPLv3 license
2011-04-28 11:23:19 +02:00
PACKAGE=mambatray
distdir = $(PACKAGE)-$(VERSION)
dist_archive = $(distdir).tar.bz2
2011-04-26 21:25:03 +02:00
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
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: install-dirs install-locales
$(INSTALL_PROGRAM) mambatray.py $(DESTDIR)$(bindir)/mambatray
2011-04-26 21:25:03 +02:00
$(INSTALL_DATA) mambatray.desktop $(DESTDIR)$(xdgautostartdir)/mambatray.desktop
clean:
2011-04-28 11:23:19 +02:00
rm -f $(pck_catalogs:.po=.mo)
rm -f $(dist_archive)
2011-04-26 21:25:03 +02:00
dist: clean
2011-04-28 11:23:19 +02:00
@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 21:25:03 +02:00
dist-rpm: dist
@rpm_sourcedir=`rpm --eval=%{_sourcedir}`;\
2011-04-28 11:23:19 +02:00
mv -f $(PACKAGE)-$(VERSION).tar.bz2 $$rpm_sourcedir;\
echo "File $$rpm_sourcedir/$(PACKAGE)-$(VERSION).tar.bz2 created."