Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=da9847a46069220750725fc8fe60a2486c4eed42

commit da9847a46069220750725fc8fe60a2486c4eed42
Author: crazy <cr...@frugalware.org>
Date:   Tue Jan 26 17:42:45 2010 +0100

kde.sh
* some changes =)
* added _F_kde_subpkgs_custom_path and changed
* the detect part to not die if this is set
* added KDE_install() , now KDE_build() is better ;)
* Added __KDE_split() ( internal ) splited from KDE_split()
* function

diff --git a/source/include/kde.sh b/source/include/kde.sh
index 8a025cf..75fd16d 100644
--- a/source/include/kde.sh
+++ b/source/include/kde.sh
@@ -159,6 +159,7 @@ KDE_project_install()
# 1) name of the subpackage 2) Name of the project (see KDE_project_install).
# Example: KDE_project_split kopete-irc kopete/protocols/irc
###
+
KDE_project_split()
{
KDE_project_install "$2"
@@ -172,29 +173,46 @@ KDE_project_split()
# subdirectory project. Example: "kdelibs-kioslave-ftp" would search for
# kioslave/ftp project subdir.
###
+
+
+
+__KDE_split() # internal and should be extended to handle all kind paths
+{
+       ## we use for weird or not logical names
+        ## $pkgname-<the_weird_name>
+       clean=$(eval "echo \"\${i/#$pkgname-/}\"") # Remove front "$pkgname-"
+       if [ ! -d "$clean" ]; then
+               clean="${clean//-//}" # Transform "-" into "/"
+       fi
+
+        ## check whatever that project exists
+       if [ -d "$clean" ]; then
+               ## split it
+               KDE_project_split "$i" "$clean"
+       else
+               if [ -z "$_F_kde_subpkgs_custom_path" ]; then
+                       Fmessage "Could not find $clean!! Maybe is not in the 
TOP_SRC dir? Or Typo?"
+                       Fdie
+               else
+                       Fmessage "Could not find $clean but 
_F_kde_subpkgs_custom_path is set!"
+                       Fmessage "Won't die() here, assuming build() will 
handle this package!..."
+               fi
+       fi
+}
+
KDE_split()
{
local i clean
-
## let's try that way
for i in "${_f_kde_subpk...@]}"
do
-               ## we use for weird or not logical names
-               ## $pkgname-<the_weird_name>
-               clean=$(eval "echo \"\${i/#$pkgname-/}\"") # Remove front 
"$pkgname-"
-               if [ ! -d "$clean" ]; then
-                       clean="${clean//-//}" # Transform "-" into "/"
-               fi
-
-               ## check whatever that project exists
-               if [ -d "$clean" ]; then
-                       ## split it
-                       KDE_project_split "$i" "$clean"
-               else
-                       Fmessage "Aieee project $clean does NOT exists, don't 
know how to install and split :/ ( Typo? )"
-                       Fdie
+               ## Shall we add something more generic some _ignore= ?
+               ## but for that we need some hacks in makepkg I guess
+               if [ "$i" == "$pkgname-docs" ]; then
+                       Fmessage "Ignoring $pkgname-docs KDE_install() will 
take care.."
+                       continue
fi
-
+               __KDE_split
done
}

@@ -210,17 +228,31 @@ KDE_make()
CMake_make "$@"
}

-KDE_build()
+KDE_install()
{
-       KDE_make "$@"
-       KDE_split
make DESTDIR="$Fdestdir" install || Fdie
-       Fcleandestdir "${_f_kde_subpk...@]}"
if [ "$_F_kde_split_docs" == 1 ]; then
-         Fsplit "$pkgname-docs" /usr/share/doc/HTML
+          Fsplit "$pkgname-docs" /usr/share/doc/HTML
+        fi
+
+       if [ -n "$_F_kde_subpkgs" ]; then
+               Fmessage "Found _F_kde_subpkgs , cleaning up..."
+               Fcleandestdir "${_f_kde_subpk...@]}"
+
+       elif [ -z "$_F_kde_subpkgs" -o -n "$subpkgs" ]; then
+               Fmessage "Did not found _F_kde_subpkgs but we have subpkgs , 
cleaning up.."
+               Fcleandestdir "${subpk...@]}"
fi
}

+
+KDE_build()
+{
+       KDE_make "$@"
+       KDE_split
+       KDE_install
+}
+
###
# build: just calls Fbuild_KDE
###
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to