mambabase/Makefile

97 lines
2.7 KiB
Makefile
Raw Permalink Normal View History

# Makefile for mambabase package
# Copyright (C) 2004-2022 by Silvan Calarco <silvan.calarco@mambasoft.it>
include VERSION
ARCH:=`uname -i`
PACKAGE = mambabase
DESTDIR =
prefix = /usr
exec_prefix = ${prefix}
sysconfdir = /etc
sbindir = ${exec_prefix}/sbin
bindir = ${exec_prefix}/bin
datadir = ${prefix}/share
ifeq ($(ARCH), x86_64)
libexecdir = ${prefix}/libexec64
else
libexecdir = ${prefix}/libexec
endif
mandir = ${prefix}/usr/share/man
sysconfigdir= ${sysconfdir}/sysconfig
profiledir = ${sysconfdir}/profile.d
mambabasedatadir = ${datadir}/mambabase
iconsdir = ${datadir}/icons/hicolor
localesdir = ${datadir}/locale
xdg_appsdir = ${datadir}/applications
xdg_directorydir = ${datadir}/desktop-directories
xdg_menudir = ${sysconfdir}/xdg/menus
xdg_mergedmenudir = $(xdg_menudir)/applications-merged
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 mambabase/po/*.po)
.SUFFIXES:
.SUFFIXES: .po .mo
all: locales
.po.mo:; msgfmt $< -o $@
2022-06-19 11:21:41 +02:00
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)$(datadir)/locale/$$lang/LC_MESSAGES";\
$(INSTALL_DIR) $$dir;\
$(INSTALL_DATA) $${f/.po/.mo} $$dir/mambabase.mo;\
done
@lrelease-qt5 mambabase/mambabase_it.ts -qm $(DESTDIR)$(datadir)/locale/it/LC_MESSAGES/mambabase.qm
install-mambabase:
@$(INSTALL_DIR) $(DESTDIR)$(bindir)
@$(INSTALL_DIR) $(DESTDIR)$(mambabasedatadir)
@$(INSTALL_DIR) $(DESTDIR)$(xdg_appsdir)
$(INSTALL_SCRIPT) mambabase/mambabase $(DESTDIR)$(bindir)/mambabase
$(INSTALL_SCRIPT) mambabase/mambabase.py $(DESTDIR)$(mambabasedatadir)
$(INSTALL_SCRIPT) mambabase/mambabase-pkggroups-parser.sh $(DESTDIR)$(mambabasedatadir)
$(INSTALL_SCRIPT) mambabase/nvidia-autoselect-driver $(DESTDIR)$(mambabasedatadir)
$(INSTALL_DATA) mambabase/mambabase.desktop $(DESTDIR)$(xdg_appsdir)
$(INSTALL_DATA) mambabase/mambabase-autostart.desktop $(DESTDIR)$(mambabasedatadir)
cp mambabase/*.ui $(DESTDIR)$(mambabasedatadir)
install: $(pck_infiles:.in=) \
install-mambabase \
install-locales
dist: clean
@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)