2007-07-18 17:21:52 +04:00
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
#
|
|
|
|
# Part of Equinox Desktop Environment (EDE).
|
|
|
|
# Copyright (c) 2000-2007 EDE Authors.
|
|
|
|
#
|
|
|
|
# This program is licensed under terms of the
|
|
|
|
# GNU General Public License version 2 or newer.
|
|
|
|
# See COPYING for details.
|
|
|
|
|
2008-08-22 20:40:18 +04:00
|
|
|
# jam by default set 711 for executable files which is
|
|
|
|
# too restrictive disabling shell scripts to be excuted.
|
|
|
|
# Here I'm changing it to default used
|
|
|
|
EXEMODE = 755 ;
|
2007-07-18 17:21:52 +04:00
|
|
|
|
|
|
|
# MakeInstallPrivate [location-dir] : [targets] : [opt-file-mode] : [opt-chown] : [opt-chgrp] ;
|
|
|
|
rule MakeInstallPrivate
|
|
|
|
{
|
|
|
|
local i t s ;
|
|
|
|
local dir = $(1) ;
|
|
|
|
|
|
|
|
MkDir $(dir) ;
|
|
|
|
|
|
|
|
# This was pain-in-the-ass to set up (bad docs)
|
|
|
|
# but this is the shortest possible explaination of it:
|
|
|
|
# files must be gristed (or foo/foo will not be build) and _after_
|
|
|
|
# that apply SEARCH on it, consulting SUBDIR. Otherwise
|
|
|
|
# known targets will be compiled, but unknown (icons etc.) will not
|
|
|
|
# be recognized as installable entity.
|
|
|
|
s = [ FGristFiles $(2) ] ;
|
|
|
|
SEARCH on $(s) = $(SUBDIR) ;
|
|
|
|
|
|
|
|
for i in $(s) {
|
|
|
|
t = $(i:BSR=$(dir):G=installed) ;
|
2007-09-28 18:08:59 +04:00
|
|
|
LocalDepends $(t) : $(i) ;
|
|
|
|
LocalDepends $(t) : $(dir) ;
|
2007-07-18 17:21:52 +04:00
|
|
|
|
2007-09-28 18:08:59 +04:00
|
|
|
LocalDepends install : $(t) ;
|
|
|
|
LocalClean uninstall : $(t) ;
|
2007-07-18 17:21:52 +04:00
|
|
|
|
|
|
|
Install1 $(t) : $(i) ;
|
|
|
|
|
|
|
|
if $(3) {
|
|
|
|
MODE on $(t) = $(3) ;
|
|
|
|
Chmod $(t) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
if $(4) {
|
|
|
|
OWNER on $(t) = $(4) ;
|
|
|
|
Chown $(t) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
if $(5) {
|
|
|
|
GROUP on $(t) = $(5) ;
|
|
|
|
Chgrp $(t) ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# InstallAny [location-dir] : [targets] : [opt-file-mode] : [opt-chown] : [opt-chgrp] ;
|
|
|
|
# Install [targets] and [location-dir] directory. If directory does not exists, it will
|
|
|
|
# be created (the same applies for it's parents).
|
|
|
|
# [opt-file-mode], if given, is mode for installed files, which can be EXEMODE, FILEMODE or manually
|
|
|
|
# supplied one (chmod will be called). [opt-chown], if given, will run chown with given
|
|
|
|
# name and change owner of installed targets. [opt-chgrp], if given, will run chgrp and change
|
|
|
|
# group of installed targets.
|
|
|
|
rule InstallAny
|
|
|
|
{
|
|
|
|
MakeInstallPrivate $(1) : $(2) : $(3) : $(4) : $(5) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
# InstallProgram [location-dir] : [targets] : [opt-chown] : [opt-chgrp] ;
|
|
|
|
rule InstallProgram
|
|
|
|
{
|
|
|
|
MakeInstallPrivate $(1) : $(2) : $(EXEMODE) : $(3) : $(4) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
# InstallData [location-dir] : [targets] : [opt-chown] : [opt-chgrp] ;
|
|
|
|
rule InstallData
|
|
|
|
{
|
|
|
|
MakeInstallPrivate $(1) : $(2) : $(FILEMODE) : $(3) : $(4) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
# InstallEdeProgram [targets] ;
|
|
|
|
rule InstallEdeProgram
|
|
|
|
{
|
2009-02-20 18:29:11 +03:00
|
|
|
InstallProgram $(EDE_BIN_DIR) : $(<) ;
|
2007-07-18 17:21:52 +04:00
|
|
|
}
|
|
|
|
|
2007-07-18 20:14:10 +04:00
|
|
|
# InstallEdeIcons [app-dir:] [targets] ;
|
2007-07-18 17:21:52 +04:00
|
|
|
rule InstallEdeIcons
|
|
|
|
{
|
2007-07-18 20:14:10 +04:00
|
|
|
if $(2) {
|
2009-02-20 18:29:11 +03:00
|
|
|
InstallData [ FDirName $(EDE_ICON_DIR) $(1) ] : $(2) ;
|
2007-07-18 20:14:10 +04:00
|
|
|
} else {
|
2009-02-20 18:29:11 +03:00
|
|
|
InstallData $(EDE_ICON_DIR) : $(1) ;
|
2007-07-18 20:14:10 +04:00
|
|
|
}
|
2007-07-18 17:21:52 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
# InstallEdeDesktopFiles [targets] ;
|
|
|
|
rule InstallEdeDesktopFiles
|
|
|
|
{
|
2009-02-20 18:29:11 +03:00
|
|
|
InstallData $(EDE_DESKTOP_FILE_DIR) : $(<) ;
|
2007-07-18 17:21:52 +04:00
|
|
|
}
|
|
|
|
|
2009-02-20 18:29:11 +03:00
|
|
|
# InstallEdeConfigFilesOld [targets] ;
|
|
|
|
rule InstallEdeConfigFilesOld
|
|
|
|
{
|
|
|
|
InstallData $(EDE_CONFIG_DIR_OLD) : $(<) ;
|
|
|
|
}
|
|
|
|
|
|
|
|
# InstallEdeConfigFiles [targets] ;
|
2007-07-18 20:14:10 +04:00
|
|
|
rule InstallEdeConfigFiles
|
|
|
|
{
|
2009-02-20 18:29:11 +03:00
|
|
|
InstallData $(EDE_CONFIG_DIR) : $(<) ;
|
2007-07-18 20:14:10 +04:00
|
|
|
}
|
2007-07-18 17:21:52 +04:00
|
|
|
|
2009-02-24 16:54:14 +03:00
|
|
|
# InstallEdeTips [targets] ;
|
|
|
|
rule InstallEdeTips
|
|
|
|
{
|
|
|
|
InstallData $(EDE_TIPS_DIR) : $(<) ;
|
|
|
|
}
|
|
|
|
|
2008-02-11 16:55:58 +03:00
|
|
|
# InstallEdeMimeFiles [targets] ;
|
|
|
|
# Installs XDG mime files and run update-mime-database
|
|
|
|
rule InstallEdeMimeFiles
|
|
|
|
{
|
|
|
|
# First check if we have 'update-mime-database' command
|
|
|
|
# TODO: this should be set globaly
|
|
|
|
local matches = [ Glob $(PATH) : update-mime-database ] ;
|
|
|
|
|
|
|
|
if ! $(matches) {
|
|
|
|
return ;
|
|
|
|
} else {
|
|
|
|
local update_cmd pakdir ;
|
|
|
|
|
|
|
|
update_cmd = $(matches[1]) ;
|
|
|
|
|
2009-02-20 18:29:11 +03:00
|
|
|
# Files must be instaled in $(EDE_MIME_DIR)/packages or
|
2008-02-11 16:55:58 +03:00
|
|
|
# update-mime-database will not see it
|
2009-02-20 18:29:11 +03:00
|
|
|
pakdir = [ FDirName $(EDE_MIME_DIR) packages ] ;
|
2008-02-11 16:55:58 +03:00
|
|
|
InstallData $(pakdir) : $(<) ;
|
|
|
|
|
|
|
|
MIME_UPDATE_DATABASE = $(update_cmd) ;
|
|
|
|
|
|
|
|
# Shut up jam warning
|
2009-02-20 18:29:11 +03:00
|
|
|
NotFile $(EDE_MIME_DIR) ;
|
2008-02-11 16:55:58 +03:00
|
|
|
|
|
|
|
# Call update-mime-database after install/uninstall
|
|
|
|
# Just hoping this will be executed after files are copied/removed...
|
2009-02-20 18:29:11 +03:00
|
|
|
MimeUpdater install : $(EDE_MIME_DIR) ;
|
|
|
|
MimeUpdater uninstall : $(EDE_MIME_DIR) ;
|
2008-02-11 16:55:58 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-08-25 17:24:16 +04:00
|
|
|
# InstallEdeDoc [targets] ;
|
2009-02-20 18:29:11 +03:00
|
|
|
# Installs targets to EDE_DOC_DIR directory
|
2008-08-25 17:24:16 +04:00
|
|
|
rule InstallEdeDoc
|
|
|
|
{
|
2009-02-20 18:29:11 +03:00
|
|
|
InstallData $(EDE_DOC_DIR) : $(1) ;
|
2008-08-25 17:24:16 +04:00
|
|
|
}
|
|
|
|
|
2009-03-06 17:15:32 +03:00
|
|
|
# InstallDbusService [targets] ;
|
|
|
|
# Installs D-BUS service targets to D-BUS known directory
|
|
|
|
rule InstallDbusService
|
|
|
|
{
|
|
|
|
InstallData $(DBUS_SERVICE_DIR) : $(1) ;
|
|
|
|
}
|
|
|
|
|
2007-07-18 17:21:52 +04:00
|
|
|
actions Install1
|
|
|
|
{
|
|
|
|
$(CP) "$(>)" "$(<)"
|
|
|
|
}
|
|
|
|
|
2008-02-11 16:55:58 +03:00
|
|
|
actions updated together MimeUpdater
|
|
|
|
{
|
|
|
|
$(MIME_UPDATE_DATABASE) "$(>)"
|
|
|
|
}
|
|
|
|
|
2007-07-18 17:21:52 +04:00
|
|
|
NotFile install uninstall ;
|
|
|
|
Always install uninstall ;
|