2013-04-10 19:30:33 +02:00
|
|
|
# Makefile for desktop-base-openmamba package
|
2019-04-02 18:19:51 +02:00
|
|
|
# Copyright (C) 2004-2019 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
|
2013-04-10 19:30:33 +02:00
|
|
|
|
|
|
|
ARCH:=`uname -i`
|
|
|
|
|
|
|
|
ifeq ($(ARCH), arm)
|
|
|
|
SRPMSVERSIONSFILE = SRPMSVERSIONS.arm
|
2013-09-01 13:53:12 +02:00
|
|
|
pck_srpms = b43-firmware sun-java7
|
2013-04-10 19:30:33 +02:00
|
|
|
else
|
2018-06-16 01:40:31 +02:00
|
|
|
ifeq ($(ARCH), x86_64)
|
|
|
|
SRPMSVERSIONSFILE = SRPMSVERSIONS
|
|
|
|
pck_srpms = flashplugin msttcorefonts win32codecs skype b43-firmware virtualbox-extension-pack \
|
2019-06-11 21:26:11 +02:00
|
|
|
sun-java spotify chromium-pepper-flash chromium-widevine
|
2018-06-16 01:40:31 +02:00
|
|
|
else
|
2013-04-10 19:30:33 +02:00
|
|
|
SRPMSVERSIONSFILE = SRPMSVERSIONS
|
2014-09-19 21:18:05 +02:00
|
|
|
pck_srpms = flashplugin msttcorefonts win32codecs skype b43-firmware virtualbox-extension-pack \
|
2019-06-11 21:26:11 +02:00
|
|
|
sun-java spotify chromium-pepper-flash
|
2013-04-10 19:30:33 +02:00
|
|
|
endif
|
2018-06-16 01:40:31 +02:00
|
|
|
endif
|
2011-04-26 13:25:32 +02:00
|
|
|
PACKAGE = desktop-base-openmamba
|
|
|
|
DISTROID = openmamba
|
|
|
|
|
2012-01-09 13:43:07 +01:00
|
|
|
WITHKDE3TOOLS := 1
|
2011-12-12 01:59:14 +01:00
|
|
|
|
2011-04-26 13:25:32 +02:00
|
|
|
RPM_VENDOR = openmamba
|
|
|
|
RPM_DISTRIBUTION = openmamba
|
|
|
|
RPM_DISTROEXT = mamba
|
|
|
|
|
|
|
|
SYSCONFIGFILE = netsrpminstall
|
|
|
|
|
|
|
|
#SCREENSAVER = $(DISTROid).desktop
|
|
|
|
SCREENSAVER =
|
|
|
|
|
|
|
|
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
|
2014-12-19 18:55:39 +01:00
|
|
|
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
|
2016-05-19 00:29:30 +02:00
|
|
|
profiledir = ${sysconfdir}/profile.d
|
2011-04-26 13:25:32 +02:00
|
|
|
mambabasedatadir = ${datadir}/openmamba/mambabase
|
|
|
|
mambareportdatadir = ${datadir}/openmamba/mambareport
|
|
|
|
mambaimagesdir = ${datadir}/openmamba/images
|
|
|
|
xramdrdatadir = ${datadir}/openmamba/xramdr
|
|
|
|
iconsdir = ${datadir}/icons/hicolor
|
|
|
|
localesdir = ${datadir}/locale
|
2012-03-03 15:53:58 +01:00
|
|
|
pck_desktop = $(wildcard desktop/*.bz2)
|
2012-07-01 11:43:06 +02:00
|
|
|
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
|
2013-06-28 23:15:37 +02:00
|
|
|
systemdsystemdir = /lib/systemd/system
|
2016-03-08 12:08:39 +01:00
|
|
|
systemdsleepdir = /lib/systemd/system-sleep
|
2011-04-26 13:25:32 +02:00
|
|
|
|
|
|
|
distrorootdir = ${datadir}/$(DISTROid)
|
|
|
|
distrobindir = ${distrorootdir}/bin
|
|
|
|
distrosrpmsdir = ${distrorootdir}/SRPMS
|
2012-03-03 15:53:58 +01:00
|
|
|
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 \
|
2012-03-03 15:53:58 +01:00
|
|
|
SRPMS/*/*.in \
|
2014-12-19 18:55:39 +01:00
|
|
|
remote-support-mambasoft/*.in \
|
2012-03-03 15:53:58 +01:00
|
|
|
desktop/*.in)
|
2011-04-26 13:25:32 +02:00
|
|
|
pck_sysconfigfile := distroutils.sysconfig
|
|
|
|
|
|
|
|
distdir = $(PACKAGE)-$(VERSION)
|
|
|
|
dist_archive = $(distdir).tar.bz2
|
|
|
|
|
2012-03-03 15:53:58 +01:00
|
|
|
pck_desktop := $(wildcard desktop/*.tar.bz2)
|
2011-04-26 13:25:32 +02:00
|
|
|
pck_catalogs := $(wildcard mambabase/po/*.po)
|
2015-02-22 19:55:15 +01:00
|
|
|
pck_catalogs1 := $(wildcard openmamba-update/po/*.po)
|
2011-04-26 13:25:32 +02:00
|
|
|
|
|
|
|
.SUFFIXES:
|
|
|
|
.SUFFIXES: .in .po .mo
|
|
|
|
|
|
|
|
.in:; @echo "generating $@..."; \
|
2013-04-10 19:30:33 +02:00
|
|
|
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,@distroicon@,$(DISTROICON),g;\
|
2013-02-04 19:06:31 +01:00
|
|
|
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;\
|
2011-04-27 00:31:05 +02:00
|
|
|
s,@bindir@,$(bindir),g;\
|
2014-12-19 18:55:39 +01:00
|
|
|
s,@libexecdir@,$(libexecdir),g;\
|
2011-04-26 13:25:32 +02:00
|
|
|
s,@distrobindir@,$(distrobindir),g;\
|
2012-03-03 15:53:58 +01:00
|
|
|
s,@distrodesktopdir@,$(distrodesktopdir),g;\
|
2011-04-26 13:25:32 +02:00
|
|
|
s,@distrosrpmsdir@,$(distrosrpmsdir),g;\
|
2014-07-24 13:21:02 +02:00
|
|
|
s,@screensaver@,${SCREENSAVER},g" $< > $@
|
2011-04-26 13:25:32 +02:00
|
|
|
|
|
|
|
all: dist-update locales
|
|
|
|
|
|
|
|
dist-update: $(pck_infiles:.in=)
|
|
|
|
|
|
|
|
.po.mo:; msgfmt $< -o $@
|
|
|
|
|
2015-02-22 19:55:15 +01:00
|
|
|
locales: $(pck_catalogs:.po=.mo) $(pck_catalogs1:.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'...";\
|
2019-10-20 14:21:26 +02:00
|
|
|
dir="$(DESTDIR)$(datadir)/locale/$$lang/LC_MESSAGES";\
|
2011-04-26 13:25:32 +02:00
|
|
|
$(INSTALL_DIR) $$dir;\
|
|
|
|
$(INSTALL_DATA) $${f/.po/.mo} $$dir/mambabase.mo;\
|
|
|
|
done
|
|
|
|
@for f in $(pck_catalogs1); do\
|
2014-03-26 12:28:42 +01:00
|
|
|
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)
|
2016-03-08 12:08:39 +01:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(systemdsleepdir)
|
2011-04-26 13:25:32 +02:00
|
|
|
cp -r etc/polkit-1 $(DESTDIR)$(sysconfdir)/
|
2011-06-07 15:28:19 +02:00
|
|
|
cp -r etc/prelink.conf.d $(DESTDIR)$(sysconfdir)/
|
2013-05-02 15:53:43 +02:00
|
|
|
cp -r etc/profile.d $(DESTDIR)$(sysconfdir)/
|
|
|
|
cp -r etc/sudoers.d $(DESTDIR)$(sysconfdir)/
|
|
|
|
cp -r etc/sysconfig $(DESTDIR)$(sysconfdir)/
|
2016-03-08 12:08:39 +01:00
|
|
|
cp etc/system-sleep/* $(DESTDIR)$(systemdsleepdir)/
|
2013-05-02 15:53:43 +02:00
|
|
|
chmod 755 $(DESTDIR)$(sysconfdir)/profile.d/*.sh
|
2011-04-26 13:25:32 +02:00
|
|
|
$(INSTALL_SCRIPT) kde/scripts/showlog $(DESTDIR)$(distrobindir)
|
|
|
|
cp -r menu/icons/ $(DESTDIR)$(datadir)/icons/
|
|
|
|
|
|
|
|
install-distromenu: dist-update
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(xdg_directorydir)
|
|
|
|
$(INSTALL_DATA) menu/applications/distroutils.directory \
|
|
|
|
$(DESTDIR)$(xdg_directorydir)/$(DISTROID).directory
|
|
|
|
$(INSTALL_DATA) menu/applications/distroutils-netinstall.directory \
|
|
|
|
$(DESTDIR)$(xdg_directorydir)/$(DISTROID)-NetInstall.directory
|
|
|
|
$(INSTALL_DATA) menu/applications/distroutils-logs.directory \
|
|
|
|
$(DESTDIR)$(xdg_directorydir)/$(DISTROID)-Logs.directory
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(xdg_mergedmenudir)
|
|
|
|
$(INSTALL_DATA) menu/applications/distroutils.menu \
|
|
|
|
$(DESTDIR)$(xdg_mergedmenudir)/$(DISTROid).menu
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(xdg_appsdir)
|
|
|
|
for pck in $(pck_srpms); do\
|
|
|
|
$(INSTALL_DATA) menu/applications/netinstall/$$pck.desktop \
|
|
|
|
$(DESTDIR)$(xdg_appsdir)/$(DISTROid)-$$pck.desktop;\
|
|
|
|
done
|
|
|
|
cp menu/applications/logs/*.desktop $(DESTDIR)$(xdg_appsdir)
|
|
|
|
|
|
|
|
install-srpms:
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(distrosrpmsdir)
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(sysconfigdir)
|
2013-04-10 19:30:33 +02:00
|
|
|
@cat $(SRPMSVERSIONSFILE) > $(DESTDIR)$(sysconfigdir)/$(SYSCONFIGFILE)
|
2011-04-26 13:25:32 +02:00
|
|
|
for pck in $(pck_srpms); do\
|
2014-07-24 13:21:02 +02:00
|
|
|
cp -a SRPMS/$$pck $(DESTDIR)$(distrosrpmsdir); \
|
|
|
|
rm -f $(DESTDIR)$(distrosrpmsdir)/$$pck/distroutils.sysconfig*; \
|
|
|
|
rm -f $(DESTDIR)$(distrosrpmsdir)/$$pck/*.spec.in; \
|
2011-04-26 13:25:32 +02:00
|
|
|
cat SRPMS/$$pck/$(pck_sysconfigfile) >> \
|
|
|
|
$(DESTDIR)$(sysconfigdir)/$(SYSCONFIGFILE);\
|
|
|
|
done
|
|
|
|
|
|
|
|
install-icons:
|
2012-07-01 11:43:06 +02:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(systemlogodir)/; \
|
|
|
|
$(INSTALL_DATA) mambabase/mamba-64x64.png $(DESTDIR)$(systemlogodir)/system-logo-white.png
|
2011-04-26 13:25:32 +02:00
|
|
|
@for i in 16x16 22x22 32x32 48x48 64x64 128x128; do \
|
|
|
|
$(INSTALL_DIR) $(DESTDIR)$(iconsdir)/$$i/apps/; \
|
|
|
|
$(INSTALL_DATA) mambabase/mamba-$$i.png $(DESTDIR)$(iconsdir)/$$i/apps/mamba.png; \
|
2014-12-19 18:55:39 +01:00
|
|
|
$(INSTALL_DATA) remote-support-mambasoft/mambasoft-$$i.png $(DESTDIR)$(iconsdir)/$$i/apps/mambasoft.png; \
|
2011-12-12 01:59:14 +01:00
|
|
|
done
|
|
|
|
# $(INSTALL_DATA) xramdr/xramdr-$$i.png $(DESTDIR)$(iconsdir)/$$i/apps/xramdr.png \
|
2011-04-26 13:25:32 +02:00
|
|
|
|
|
|
|
install-mambabase:
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(mambabasedatadir)
|
2019-10-20 14:21:26 +02:00
|
|
|
$(INSTALL_SCRIPT) mambabase/mambabase $(DESTDIR)$(bindir)/mambabase
|
|
|
|
$(INSTALL_SCRIPT) mambabase/mambabase.py $(DESTDIR)$(mambabasedatadir)
|
|
|
|
$(INSTALL_SCRIPT) mambabase/mambabase-pkggroups-parser.sh $(DESTDIR)$(mambabasedatadir)
|
2011-04-26 13:25:32 +02:00
|
|
|
$(INSTALL_DATA) mambabase/mambabase.desktop $(DESTDIR)$(xdg_appsdir)
|
|
|
|
$(INSTALL_DATA) mambabase/mambabase-autostart.desktop $(DESTDIR)$(mambabasedatadir)
|
2019-10-20 14:21:26 +02:00
|
|
|
$(INSTALL_DATA) mambabase/openmamba.png $(DESTDIR)$(mambabasedatadir)
|
|
|
|
$(INSTALL_DATA) mambabase/mambabase.png $(DESTDIR)$(mambabasedatadir)
|
|
|
|
cp mambabase/*.ui $(DESTDIR)$(mambabasedatadir)
|
2011-04-26 13:25:32 +02:00
|
|
|
|
|
|
|
install-mambareport:
|
2011-12-12 01:59:14 +01:00
|
|
|
$(INSTALL_SCRIPT) mambareport/openmamba-makereport $(DESTDIR)$(bindir)
|
2012-01-09 13:43:07 +01:00
|
|
|
ifeq ($(WITHKDE3TOOLS),1)
|
2011-04-26 13:25:32 +02:00
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(mambareportdatadir)
|
|
|
|
$(INSTALL_SCRIPT) mambareport/mambareport.kmdr $(DESTDIR)$(mambareportdatadir)
|
|
|
|
$(INSTALL_DATA) mambareport/mambareport.desktop $(DESTDIR)$(xdg_appsdir)
|
2011-12-12 01:59:14 +01:00
|
|
|
endif
|
2011-04-26 13:25:32 +02:00
|
|
|
|
2014-12-19 18:55:39 +01:00
|
|
|
install-remote-support-mambasoft:
|
|
|
|
$(INSTALL_SCRIPT) remote-support-mambasoft/remote-support-mambasoft.sh $(DESTDIR)$(bindir)/remote-support-mambasoft
|
|
|
|
$(INSTALL_DATA) remote-support-mambasoft/remote-support-mambasoft.desktop $(DESTDIR)$(xdg_appsdir)
|
|
|
|
|
2011-04-26 13:25:32 +02:00
|
|
|
install-xramdr:
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(xramdrdatadir)
|
|
|
|
$(INSTALL_SCRIPT) xramdr/70521-xramdr.kmdr $(DESTDIR)$(xramdrdatadir)/xramdr.kmdr
|
|
|
|
$(INSTALL_DATA) xramdr/xramdr.desktop $(DESTDIR)$(xdg_appsdir)
|
|
|
|
|
2012-03-03 15:53:58 +01:00
|
|
|
install-desktop:
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(distrodesktopdir)
|
|
|
|
$(INSTALL_DATA) $(pck_desktop) $(DESTDIR)$(distrodesktopdir)
|
2016-05-19 00:29:30 +02:00
|
|
|
$(INSTALL_SCRIPT) desktop/desktop-firsttime.sh $(DESTDIR)$(profiledir)
|
2012-03-03 15:53:58 +01:00
|
|
|
|
2011-04-27 00:31:05 +02:00
|
|
|
install-openmamba-update:
|
|
|
|
@$(INSTALL_DIR) $(DESTDIR)$(bindir)
|
|
|
|
$(INSTALL_SCRIPT) openmamba-update/openmamba-update $(DESTDIR)$(bindir)
|
|
|
|
$(INSTALL_SCRIPT) openmamba-update/openmamba-netsrpms $(DESTDIR)$(bindir)
|
|
|
|
|
2011-04-26 13:25:32 +02:00
|
|
|
install: $(pck_infiles:.in=) \
|
|
|
|
install-kde-distro-addons \
|
|
|
|
install-distromenu \
|
|
|
|
install-srpms \
|
2012-03-03 15:53:58 +01:00
|
|
|
install-desktop \
|
2011-12-12 01:59:14 +01:00
|
|
|
install-openmamba-update \
|
2011-04-26 13:25:32 +02:00
|
|
|
install-mambabase \
|
|
|
|
install-mambareport \
|
2014-12-19 18:55:39 +01:00
|
|
|
install-remote-support-mambasoft \
|
2011-04-26 13:25:32 +02:00
|
|
|
install-locales \
|
2011-11-05 15:52:36 +01:00
|
|
|
install-icons
|
2011-04-26 13:25:32 +02:00
|
|
|
|
|
|
|
dist: clean
|
2011-06-07 15:35:19 +02:00
|
|
|
@git log > ChangeLog.git
|
2011-04-27 00:31:05 +02:00
|
|
|
@mkdir /tmp/$(distdir)
|
|
|
|
@cp -a * /tmp/$(distdir)/
|
2011-04-26 13:25:32 +02:00
|
|
|
@rm -f $(dist_archive);\
|
2011-04-27 00:31:05 +02:00
|
|
|
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)
|
|
|
|
rm -f $(pck_catalogs1:.po=.mo)
|