cookutils rev 500
cook: Updated copy_generic_files function to be more like in slitaz-tank branch.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Wed Jun 20 02:46:06 2012 +0000 (2012-06-20) |
parents | abfee2306690 |
children | e09f02df6e1e |
files | cook |
line diff
1.1 --- a/cook Wed Jun 20 02:41:13 2012 +0000 1.2 +++ b/cook Wed Jun 20 02:46:06 2012 +0000 1.3 @@ -313,9 +313,10 @@ 1.4 1.5 # Copy all generic files (locale, pixmaps, .desktop). We use standard paths, 1.6 # so some packages need to copy these files with the receipt and genpkg_rules. 1.7 -copy_generic_files() { 1.8 +copy_generic_files() 1.9 +{ 1.10 # $LOCALE is set in cook.conf 1.11 - if [ "$LOCALE" ]; then 1.12 + if [ "$LOCALE" -a "$WANTED" = "" ]; then 1.13 if [ -d "$install/usr/share/locale" ]; then 1.14 mkdir -p $fs/usr/share/locale 1.15 for i in $LOCALE 1.16 @@ -331,10 +332,13 @@ 1.17 if [ "$GENERIC_PIXMAPS" != "no" ]; then 1.18 if [ -d "$install/usr/share/pixmaps" ]; then 1.19 mkdir -p $fs/usr/share/pixmaps 1.20 - cp -a $install/usr/share/pixmaps/$PACKAGE.png \ 1.21 - $fs/usr/share/pixmaps 2>/dev/null || continue 1.22 - cp -a $install/usr/share/pixmaps/$PACKAGE.xpm \ 1.23 - $fs/usr/share/pixmaps 2>/dev/null || continue 1.24 + if [ -f "$install/usr/share/pixmaps/$PACKAGE.png" ]; then 1.25 + cp -a $install/usr/share/pixmaps/$PACKAGE.png \ 1.26 + $fs/usr/share/pixmaps 1.27 + elif [ -f "$install/usr/share/pixmaps/$PACKAGE.xpm" ]; then 1.28 + cp -a $install/usr/share/pixmaps/$PACKAGE.xpm \ 1.29 + $fs/usr/share/pixmaps 1.30 + fi 1.31 fi 1.32 1.33 # Custom or homemade PNG pixmap can be in stuff. 1.34 @@ -348,6 +352,7 @@ 1.35 # Generic desktop entry copy can be disabled with GENERIC_MENUS="no" 1.36 if [ "$GENERIC_MENUS" != "no" ]; then 1.37 if [ -d "$install/usr/share/applications" ] && [ "$WANTED" == "" ]; then 1.38 + mkdir -p $fs/usr/share 1.39 cp -a $install/usr/share/applications $fs/usr/share 1.40 fi 1.41 fi 1.42 @@ -361,6 +366,12 @@ 1.43 mkdir -p $fs/usr/share/applications 1.44 cp -a $stuff/$PACKAGE.desktop $fs/usr/share/applications 1.45 fi 1.46 + 1.47 + # Add custom licenses 1.48 + if [ -d "$stuff/licenses" ]; then 1.49 + mkdir -p $fs/usr/share/licenses 1.50 + cp -a $stuff/licenses $fs/usr/share/licenses/$PACKAGE 1.51 + fi 1.52 } 1.53 1.54 # Find and strip : --strip-all (-s) or --strip-debug on static libs as well