2022-06-18 11:55:36 +02:00
|
|
|
# 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)
|
2022-06-18 11:55:36 +02:00
|
|
|
|
|
|
|
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-icons:
|
|
|
|
@for i in 16x16 22x22 32x32 48x48 64x64 128x128; do \
|
|
|
|
$(INSTALL_DIR) $(DESTDIR)$(iconsdir)/$$i/apps/; \
|
|
|
|
$(INSTALL_DATA) mambabase/mambabase-$$i.png $(DESTDIR)$(iconsdir)/$$i/apps/mambabase.png; \
|
|
|
|
done
|
|
|
|
|
|
|
|
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)
|
|
|
|
$(INSTALL_DATA) mambabase/openmamba.png $(DESTDIR)$(mambabasedatadir)
|
|
|
|
$(INSTALL_DATA) mambabase/mambabase.png $(DESTDIR)$(mambabasedatadir)
|
|
|
|
cp mambabase/*.ui $(DESTDIR)$(mambabasedatadir)
|
|
|
|
|
|
|
|
install: $(pck_infiles:.in=) \
|
|
|
|
install-mambabase \
|
|
|
|
install-locales \
|
|
|
|
install-icons
|
|
|
|
|
|
|
|
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 $(patsubst %.in,%,$(pck_infiles))
|
|
|
|
rm -f $(pck_catalogs:.po=.mo)
|
|
|
|
rm -f $(pck_catalogs1:.po=.mo)
|