remote-support-mambasoft/Makefile

95 lines
2.5 KiB
Makefile
Raw Normal View History

# Makefile for remore-support-mambasoft
# Copyright (C) 2022 by Silvan Calarco <silvan.calarco@mambasoft.it>
include VERSION
ARCH:=`uname -i`
PACKAGE = remote-support-mambasoft
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
initrddir = ${sysconfdir}/rc.d/init.d
mandir = ${prefix}/usr/share/man
sysconfigdir= ${sysconfdir}/sysconfig
profiledir = ${sysconfdir}/profile.d
iconsdir = ${datadir}/icons/hicolor
localesdir = ${datadir}/locale
pck_desktop = $(wildcard desktop/*.bz2)
systemlogodir = ${datadir}/pixmaps
xdg_appsdir = ${datadir}/applications
xdg_directorydir = ${datadir}/desktop-directories
xdg_menudir = ${sysconfdir}/xdg/menus
xdg_mergedmenudir = $(xdg_menudir)/applications-merged
distrorootdir = ${datadir}/$(DISTROid)
distrobindir = ${distrorootdir}/bin
distrosrpmsdir = ${distrorootdir}/SRPMS
distrodesktopdir = ${distrorootdir}/desktop
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}
pck_infiles := $(wildcard *.in)
distdir = $(PACKAGE)-$(VERSION)
dist_archive = $(distdir).tar.bz2
.SUFFIXES:
.SUFFIXES: .in .po .mo
.in:; @echo "generating $@..."; \
sed "s,@libexecdir@,$(libexecdir),g" $< > $@
all: dist-update
dist-update: $(pck_infiles:.in=)
install-icons:
@for i in 16x16 22x22 32x32 48x48 64x64 128x128; do \
$(INSTALL_DIR) $(DESTDIR)$(iconsdir)/$$i/apps; \
$(INSTALL_DATA) mambasoft-$$i.png $(DESTDIR)$(iconsdir)/$$i/apps/mambasoft.png; \
done
install-remote-support-mambasoft:
$(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_DIR) $(DESTDIR)$(xdg_appsdir)
$(INSTALL_SCRIPT) remote-support-mambasoft.sh $(DESTDIR)$(bindir)/remote-support-mambasoft
$(INSTALL_DATA) remote-support-mambasoft.desktop $(DESTDIR)$(xdg_appsdir)
install: $(pck_infiles:.in=) \
install-remote-support-mambasoft \
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))