Option to jump with up on keyboard.
[supertux.git] / mk / jam / install.jam
index 9d3553f..a2cfefd 100644 (file)
@@ -14,6 +14,8 @@ appdatadir ?= [ ConcatDirs $(datadir) $(PACKAGE_NAME) ] ;
 appdocdir ?= [ ConcatDirs $(datadir) doc $(PACKAGE_NAME)-$(PACKAGE_VERSION) ] ;
 appconfdir ?= [ ConcatDirs $(sysconfdir) $(PACKAGE_NAME) ] ;
 plugindir ?= [ ConcatDirs $(libdir) $(PACKAGE_NAME) ] ;
+applicationsdir ?= [ ConcatDirs $(datadir) applications ] ;
+pixmapsdir ?= [ ConcatDirs $(datadir) pixmaps ] ;
 
 ##  InstallHeader headername [ : subdir ]
 ##    DoInstall a headerfile into the includedir directory. A subdirectory
@@ -85,7 +87,25 @@ rule InstallMan
     }
 }
 
-##  DoInstall sourcename : directories [ : installapp ]
+##  InstallPixmap files [ : subdir ]
+##    Install a pixmap
+rule InstallPixmap
+{
+    LOCATE on $(<:G=installpixmap) = $(SUBDIR) ;
+    Depends install_data
+        : [ DoInstall $(<:G=installpixmap) : $(pixmapsdir) $(2) ] ;
+}
+
+##  InstallDesktop files [ : subdir ]
+##    Install a .desktop file (menu entries for kde/gnome and others)
+rule InstallDesktop
+{
+    LOCATE on $(<:G=installdesktop) = $(SUBDIR) ;
+    Depends install_bin
+        : [ DoInstall $(<:G=installdesktop) : $(applicationsdir) $(2) ] ;
+}
+
+##  DoInstall sourcename : directories [ : installapp ] [ : options ]
 ##    Creates a new installtarget for the given sources. The target(s) are
 ##    returned as function result.
 rule DoInstall
@@ -96,7 +116,7 @@ rule DoInstall
     gdir = $(dir:G=dir) ;
     MkDir $(gdir) ;
   
-    for i in $(1) {
+    for i in $(<) {
         target = $(i:BSR=$(dir):G=install) ;
         targets += $(target) ;
         Depends $(target) : $(gdir) $(i) ;
@@ -109,6 +129,11 @@ rule DoInstall
         }
     }
 
+    # We want to package all files we install
+    if ! [ IsElem nopackage : $(4) ] {
+        Package $(<) ;
+    }
+
     Always $(targets) ;
     return $(targets) ;
 }
@@ -127,7 +152,7 @@ Help install : "Install $(PACKAGE_NAME)" ;
 
 actions Install1
 {
-  $(INSTALL) "$(>)" "$(<:D)" $(INSTALLFLAGS) ;
+  $(INSTALL) "$(>)" "$(<:D)" $(INSTALLIBS) ;
 }
 
 actions CopyDirs