commit 937b464e601b8ed829c6709afc9fb7bdcffbcea5
Author: Elan Ruusamäe <[email protected]>
Date:   Sun Nov 25 17:47:08 2012 +0200

    - up to 0.1.9998, svn 2577; apply lflags; auto conf sed

 get-source.sh | 22 ++++++++++++++++++++++
 kBuild.spec   | 34 ++++++++++++++++++++++------------
 2 files changed, 44 insertions(+), 12 deletions(-)
---
diff --git a/kBuild.spec b/kBuild.spec
index f6b76cf..9beb3fb 100644
--- a/kBuild.spec
+++ b/kBuild.spec
@@ -2,33 +2,38 @@
 # Conditional build:
 %bcond_with    bootstrap               # build boostrap
 
-%define                svnrev 2537
+%define                svnrev 2577
 Summary:       A cross-platform build environment
 Name:          kBuild
-Version:       0.1.999
+Version:       0.1.9998
 Release:       1
 Group:         Development/Tools
 # Most tools are from NetBSD, some are from FreeBSD, and make and sed are from 
GNU
 License:       BSD and GPL v2+
 URL:           http://svn.netlabs.org/kbuild
-#Source0:        
ftp://ftp.netlabs.org/pub/kbuild/%{name}-%{version}%{?patchlevel:-%{patchlevel}}-src.tar.gz
-# svn co -e2537 http://svn.netlabs.org/repos/kbuild/trunk@2537 kBuild
-# tar czf kBuild-r2537.tar.gz --exclude .svn kBuild
-Source0:       %{name}-r%{svnrev}.tar.gz
-# Source0-md5: 4890acabce44bb9c94f1211eca1c135c
+Source0:       %{name}-r%{svnrev}.tar.bz2
+# Source0-md5: d2ae623626f1e464333c384a2465a77a
+Source1:       get-source.sh
 Patch0:                %{name}-0.1.3-escape.patch
 Patch1:                %{name}-0.1.5-dprintf.patch
 Patch2:                %{name}-0.1.5-pthread.patch
 BuildRequires: acl-devel
-%{!?with_bootstrap:BuildRequires:      kBuild}
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: byacc
 BuildRequires: cvs
 BuildRequires: flex
 BuildRequires: gettext-devel
+%{!?with_bootstrap:BuildRequires:      kBuild}
+ExclusiveArch: %{x8664} %{ix86}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%ifarch %{x8664}
+%define                kbuild_arch     amd64
+%else
+%define                kbuild_arch     x86
+%endif
+
 %description
 This is a GNU make fork with a set of scripts to simplify complex
 tasks and portable versions of various UNIX tools to ensure
@@ -51,14 +56,13 @@ The goals of the kBuild framework:
 %patch1 -p1
 %patch2 -p1
 
-# Remove prebuilt stuff
-%{__rm} -r kBuild/bin/*
-
 cat > SvnInfo.kmk << EOF
 KBUILD_SVN_REV := %{svnrev}
 KBUILD_SVN_URL := http://svn.netlabs.org/repos/kbuild/trunk
 EOF
 
+%{__sed} -i -e 's@_LDFLAGS\.%{kbuild_arch}*.*=@& %{rpmldflags}@g' Config.kmk
+
 %build
 %define bootstrap_mflags %{?_smp_mflags} \\\
                CC="%{__cc}" \\\
@@ -82,7 +86,13 @@ cd src/kmk
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-cd -
+cd ../sed
+%{__libtoolize}
+%{__aclocal} -I config
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+cd ../..
 
 %if %{with bootstrap}
 kBuild/env.sh --full \
diff --git a/get-source.sh b/get-source.sh
new file mode 100755
index 0000000..e1d085e
--- /dev/null
+++ b/get-source.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+# Usage:
+# ./get-source.sh
+# Author: Elan Ruusamäe <[email protected]>
+
+p=kBuild
+svn=http://svn.netlabs.org/repos/kbuild/trunk
+
+revno=$1
+specfile=$p.spec
+
+set -e
+svn co $svn${revno:+@$revno} $p
+svnrev=$(svnversion $p)
+tar=$p-r$svnrev.tar.bz2
+tar -cjf $tar --exclude-vcs --exclude kBuild/bin $p
+../dropin $tar
+
+sed -i -e "
+       s/^\(%define[ \t]\+svnrev[ \t]\+\)[0-9]\+\$/\1$svnrev/
+" $specfile
+../md5 $p.spec
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kBuild.git/commitdiff/937b464e601b8ed829c6709afc9fb7bdcffbcea5

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to