2001-10-07 04:22:41 +00:00
|
|
|
#
|
|
|
|
# GNUmakefile.postamble
|
|
|
|
#
|
|
|
|
# Copyright (C) 2001 Free Software Foundation, Inc.
|
|
|
|
#
|
|
|
|
# Written: Adam Fedor <fedor@gnu.org>
|
|
|
|
# Date: Oct 2001
|
|
|
|
#
|
|
|
|
# This file is part of the GNUstep Base Library.
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
2007-10-29 21:16:17 +00:00
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
2001-10-07 04:22:41 +00:00
|
|
|
# License as published by the Free Software Foundation; either
|
2008-06-10 04:01:49 +00:00
|
|
|
# version 2 of the License, or (at your option) any later version.
|
2001-10-07 04:22:41 +00:00
|
|
|
#
|
|
|
|
# This library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2007-10-29 21:16:17 +00:00
|
|
|
# Lesser General Public License for more details.
|
2001-10-07 04:22:41 +00:00
|
|
|
#
|
2007-10-29 21:16:17 +00:00
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
2001-10-07 04:22:41 +00:00
|
|
|
# License along with this library; see the file COPYING.LIB.
|
2007-10-29 21:16:17 +00:00
|
|
|
# If not, see <http://www.gnu.org/licenses/> or write to the
|
|
|
|
# Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
|
|
|
# Boston, MA 02110-1301, USA.
|
2001-03-16 23:26:37 +00:00
|
|
|
|
2007-03-09 23:33:58 +00:00
|
|
|
# TODO: extend resource-set.make so that this can be done easily with
|
|
|
|
# it.
|
|
|
|
|
|
|
|
include ../Version
|
Don't misuse libgnustep-gui_INTERFACE_VERSION to define Resource Install paths
$(GNUSTEP_INSTANCE)_INTERFACE_VERSION is used in gnustep-make to define
the version of the shared object.
As a packager, there might be various reasons to
override the $(GNUSTEP_INSTANCE)_INTERFACE_VERSION
in order to control the library version.
So I do for gnustep-gui on OpenBSD packages. The problem here is, that
the libgnustep-gui_INTERFACE_VERSION is additionally used to specify the path
where resources like Panels, Localizations etc. get installed, however,
in Source/NSApplication.m, the use of
GNUSTEP_GUI_MAJOR_VERSION.GNUSTEP_GUI_MINOR_VERSION
As long as the libgnustep-gui_INTERFACE_VERSION is not overridden with
some other value, everything is fine. However, as in my case, Applications
aren't able to find the Panels/Translations provided by -gui anymore.
Decided to just remove the definition of libgnustep-gui_INTERFACE_VERSION
in these three Makefiles, as it was only used once, and used the
GNUSTEP_GUI_MAJOR_VERSION.GNUSTEP_GUI_MINOR_VERSION directly.
Alternatively, libgnustep-gui_INTERFACE_VERSION in these Makefiles
could could have been renamed to avoid this conflict.
2022-08-19 15:54:41 +02:00
|
|
|
POSTAMBLE_INSTALL_DIR = $(GNUSTEP_LIBRARY)/Libraries/gnustep-gui/Versions/$(GNUSTEP_GUI_MAJOR_VERSION).$(GNUSTEP_GUI_MINOR_VERSION)/Resources
|
2007-03-09 23:33:58 +00:00
|
|
|
|
2001-10-07 04:22:41 +00:00
|
|
|
# Things to do after installing
|
|
|
|
after-install::
|
|
|
|
ifneq ($(strip $(LOCALIZED_RESOURCE_FILES)),)
|
2006-11-15 16:59:32 +00:00
|
|
|
$(ECHO_NOTHING)echo "Copying localized resources into system..."; \
|
2001-10-07 04:22:41 +00:00
|
|
|
for l in $(LANGUAGES); do \
|
2007-03-09 23:33:58 +00:00
|
|
|
if [ ! -d $(POSTAMBLE_INSTALL_DIR)/$$l.lproj ]; then \
|
|
|
|
$(MKDIRS) $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \
|
2001-10-07 04:22:41 +00:00
|
|
|
fi; \
|
|
|
|
for f in $(LOCALIZED_RESOURCE_FILES); do \
|
|
|
|
if [ -f $$l.lproj/$$f ]; then \
|
2007-03-09 23:33:58 +00:00
|
|
|
cp -r $$l.lproj/$$f $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \
|
2001-10-07 04:22:41 +00:00
|
|
|
fi; \
|
|
|
|
done; \
|
2006-11-15 16:59:32 +00:00
|
|
|
done$(END_ECHO)
|
2001-10-07 04:22:41 +00:00
|
|
|
endif
|
2003-07-20 03:43:54 +00:00
|
|
|
ifneq ($(strip $(LOCALIZED_RESOURCE_COMPONENTS)),)
|
2006-11-15 16:59:32 +00:00
|
|
|
$(ECHO_NOTHING)echo "Copying localized components into system..."; \
|
2003-07-20 03:43:54 +00:00
|
|
|
for l in $(LANGUAGES); do \
|
2007-03-09 23:33:58 +00:00
|
|
|
if [ ! -d $(POSTAMBLE_INSTALL_DIR)/$$l.lproj ]; then \
|
|
|
|
$(MKDIRS) $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \
|
2003-07-20 03:43:54 +00:00
|
|
|
fi; \
|
|
|
|
for f in $(LOCALIZED_RESOURCE_COMPONENTS); do \
|
|
|
|
if [ -d $$l.lproj/$$f ]; then \
|
2007-03-09 23:33:58 +00:00
|
|
|
cp -r $$l.lproj/$$f $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \
|
|
|
|
rm -rf $(POSTAMBLE_INSTALL_DIR)/$$l.lproj/$$f/.svn; \
|
2003-07-20 03:43:54 +00:00
|
|
|
fi; \
|
|
|
|
done; \
|
2006-11-15 16:59:32 +00:00
|
|
|
done$(END_ECHO)
|
2003-07-20 03:43:54 +00:00
|
|
|
endif
|
2001-10-07 04:22:41 +00:00
|
|
|
|
|
|
|
# Things to do after uninstalling
|
|
|
|
after-uninstall::
|
2007-03-17 16:27:03 +00:00
|
|
|
ifneq ($(strip $(LOCALIZED_RESOURCE_FILES)$(LOCALIZED_RESOURCE_COMPONENTS)),)
|
2006-11-15 16:59:32 +00:00
|
|
|
$(ECHO_NOTHING)for l in $(LANGUAGES); do \
|
|
|
|
if [ -d $$l.lproj ]; then \
|
2007-03-09 23:33:58 +00:00
|
|
|
rm -rf $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \
|
2001-10-07 04:22:41 +00:00
|
|
|
fi; \
|
2006-11-15 16:59:32 +00:00
|
|
|
done$(END_ECHO)
|
2001-10-07 04:22:41 +00:00
|
|
|
endif
|
2001-03-16 23:26:37 +00:00
|
|
|
|
2007-03-17 16:27:03 +00:00
|
|
|
|