desktop-base-openmamba/Makefile

157 lines
4.7 KiB
Makefile
Raw Normal View History

# Makefile for desktop-base-openmamba package
2022-06-16 16:45:46 +02:00
# Copyright (C) 2004-2022 by Silvan Calarco <silvan.calarco@mambasoft.it>
2011-04-26 13:25:32 +02:00
# Copyright (C) 2005-2007 by Davide Madrisan <davide.madrisan@gmail.com>
include VERSION
ARCH:=`uname -i`
2011-04-26 13:25:32 +02:00
PACKAGE = desktop-base-openmamba
DISTROID = openmamba
RPM_VENDOR = openmamba
RPM_DISTRIBUTION = openmamba
RPM_DISTROEXT = mamba
DISTROid = $(shell echo $(DISTROID) | tr A-Z a-z)
DISTROICON = $(DISTROid)
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
2011-04-26 13:25:32 +02:00
initrddir = ${sysconfdir}/rc.d/init.d
mandir = ${prefix}/usr/share/man
sysconfigdir= ${sysconfdir}/sysconfig
profiledir = ${sysconfdir}/profile.d
2011-04-26 13:25:32 +02:00
mambaimagesdir = ${datadir}/openmamba/images
iconsdir = ${datadir}/icons/hicolor
localesdir = ${datadir}/locale
pck_desktop = $(wildcard desktop/*.bz2)
systemlogodir = ${datadir}/pixmaps
2011-04-26 13:25:32 +02:00
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
2011-04-26 13:25:32 +02:00
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 kde/config/*.in \
kde/scripts/*.in \
menu/*.in menu/applications/*.in menu/applications/*/*.in \
SRPMS/*/*.in \
desktop/*.in)
2011-04-26 13:25:32 +02:00
pck_sysconfigfile := distroutils.sysconfig
distdir = $(PACKAGE)-$(VERSION)
dist_archive = $(distdir).tar.bz2
pck_desktop := $(wildcard desktop/*.tar.bz2)
pck_catalogs := $(wildcard openmamba-update/po/*.po)
2011-04-26 13:25:32 +02:00
.SUFFIXES:
.SUFFIXES: .in .po .mo
.in:; @echo "generating $@..."; \
if [ "$(ARCH)" != "x86_64" -a "$(ARCH)" != "arm" ]; then ARCH=i386; else ARCH=$(ARCH); fi; \
2011-04-26 13:25:32 +02:00
sed "s,@distroID@,$(DISTROID),g;\
s,@distroid@,$(DISTROid),g;\
s,@arch@,$$ARCH,g;\
2011-04-26 13:25:32 +02:00
s,@distribution@,$(RPM_DISTRIBUTION),g;\
s,@distroext@,$(RPM_DISTROEXT),g;\
s,@vendor@,$(RPM_VENDOR),g;\
s,@sysconfigfile@,$(SYSCONFIGFILE),g;\
s,@datadir@,${datadir},g;\
s,@bindir@,$(bindir),g;\
s,@libexecdir@,$(libexecdir),g;\
2011-04-26 13:25:32 +02:00
s,@distrobindir@,$(distrobindir),g;\
s,@distrodesktopdir@,$(distrodesktopdir),g;\
s,@distrosrpmsdir@,$(distrosrpmsdir),g" $< > $@
2011-04-26 13:25:32 +02:00
all: dist-update locales
dist-update: $(pck_infiles:.in=)
.po.mo:; msgfmt $< -o $@
locales: $(pck_catalogs:.po=.mo)
2011-04-26 13:25:32 +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/openmamba-update.mo;\
done
2011-04-26 13:25:32 +02:00
install-kde-distro-addons: dist-update
@$(INSTALL_DIR) $(DESTDIR)$(sysconfdir)
@$(INSTALL_DIR) $(DESTDIR)$(bindir)
@$(INSTALL_DIR) $(DESTDIR)$(datadir)
@$(INSTALL_DIR) $(DESTDIR)$(sbindir)
@$(INSTALL_DIR) $(DESTDIR)$(distrobindir)
@$(INSTALL_DIR) $(DESTDIR)$(mambaimagesdir)
cp -r etc/polkit-1 $(DESTDIR)$(sysconfdir)/
2011-06-07 15:28:19 +02:00
cp -r etc/prelink.conf.d $(DESTDIR)$(sysconfdir)/
cp -r etc/profile.d $(DESTDIR)$(sysconfdir)/
cp -r etc/sudoers.d $(DESTDIR)$(sysconfdir)/
cp -r etc/sysconfig $(DESTDIR)$(sysconfdir)/
2011-04-26 13:25:32 +02:00
install-openmamba-makereport:
$(INSTALL_SCRIPT) openmamba-makereport/openmamba-makereport $(DESTDIR)$(bindir)
2011-04-26 13:25:32 +02:00
install-desktop:
@$(INSTALL_DIR) $(DESTDIR)$(distrodesktopdir)
$(INSTALL_DATA) $(pck_desktop) $(DESTDIR)$(distrodesktopdir)
$(INSTALL_SCRIPT) desktop/desktop-firsttime.sh $(DESTDIR)$(profiledir)
install-openmamba-update:
@$(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_SCRIPT) openmamba-update/openmamba-update $(DESTDIR)$(bindir)
2011-04-26 13:25:32 +02:00
install: $(pck_infiles:.in=) \
install-kde-distro-addons \
install-desktop \
install-openmamba-update \
2022-06-19 10:58:21 +02:00
install-openmamba-makereport \
install-locales
2011-04-26 13:25:32 +02:00
dist: clean
@mkdir /tmp/$(distdir)
@cp -a * /tmp/$(distdir)/
2011-04-26 13:25:32 +02:00
@rm -f $(dist_archive);\
tar cf - -C /tmp $(distdir) | bzip2 -9 -c > $(dist_archive)
@rm -rf /tmp/$(distdir)
2011-04-26 13:25:32 +02:00
@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)