summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macros.bashrc27
-rw-r--r--recipe.d/0001-cpio4
-rw-r--r--recipe.d/0004-flex3
-rw-r--r--recipe.d/0005-bison2
-rw-r--r--recipe.d/0006-readline2
-rw-r--r--recipe.d/0006-texinfo2
-rw-r--r--recipe.d/0007-gdb6
-rw-r--r--recipe.d/0008-curl2
-rw-r--r--recipe.d/0010-pcre3
-rw-r--r--recipe.d/0013-sqlite3
-rw-r--r--recipe.d/0014-gdbm4
-rw-r--r--recipe.d/0016-pth2
-rw-r--r--recipe.d/0017-libtool2
-rw-r--r--recipe.d/0018-db42
-rw-r--r--recipe.d/0019-perl3
-rw-r--r--recipe.d/0020-openssl2
-rw-r--r--recipe.d/0021-gettext3
-rw-r--r--recipe.d/0021-popt2
-rw-r--r--recipe.d/0022-libffi2
-rw-r--r--recipe.d/0022-pkgconfig2
-rw-r--r--recipe.d/0023-glib26
-rw-r--r--recipe.d/0023-nss-util19
-rw-r--r--recipe.d/0024-nss-softokn21
-rw-r--r--recipe.d/0025-nss22
-rw-r--r--recipe.d/0026-elfutils4
-rw-r--r--recipe.d/0027-fakechroot2
-rw-r--r--recipe.d/0030-file2
-rw-r--r--recipe.d/0031-ustr2
-rw-r--r--recipe.d/0033-libusb2
-rw-r--r--recipe.d/0034-tzdata5
-rw-r--r--recipe.d/0035-redhat-rpm-config6
-rw-r--r--recipe.d/0036-rpm16
-rw-r--r--recipe.d/0100-ccache4
-rw-r--r--recipe.d/0101-cracklib3
-rw-r--r--recipe.d/0101-libsepol4
-rw-r--r--recipe.d/0102-attr3
-rw-r--r--recipe.d/0103-acl4
-rw-r--r--recipe.d/0104-libsemanage5
-rw-r--r--recipe.d/0105-pam9
-rw-r--r--recipe.d/0106-shadow-utils5
-rw-r--r--recipe.d/0107-strace2
-rw-r--r--recipe.d/XXXX-audit2
-rw-r--r--recipe.d/XXXX-gnupg3
-rw-r--r--recipe.d/XXXX-rpm3
-rw-r--r--script2makefile38
-rwxr-xr-xstage130
-rwxr-xr-xstage287
47 files changed, 267 insertions, 120 deletions
diff --git a/macros.bashrc b/macros.bashrc
new file mode 100644
index 0000000..7e265c6
--- /dev/null
+++ b/macros.bashrc
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+mkdirp()
+{
+ test -d $1 || mkdir -p $1
+}
+
+go()
+{
+ "$0" "$@"
+}
+
+mcd()
+{
+ test -d $1 || mkdir -p $1
+ cd $1
+}
+
+notparallel()
+{
+ echo .NOTPARALLEL: >> Makefile
+}
+
+if [ -f $MYDIR/local.conf ]
+then
+ . $MYDIR/local.conf
+fi
diff --git a/recipe.d/0001-cpio b/recipe.d/0001-cpio
index 8ef2d54..b97058e 100644
--- a/recipe.d/0001-cpio
+++ b/recipe.d/0001-cpio
@@ -1,5 +1,5 @@
- mcd $BUILDDIR/$1
- $SRC/${1}-*/configure $TCONFIGARGS
+ mcd $BUILDDIR/cpio
+ $SRC/cpio-*/configure $TCONFIGARGS
notparallel
make $J
make $J install
diff --git a/recipe.d/0004-flex b/recipe.d/0004-flex
index 56df525..2131f92 100644
--- a/recipe.d/0004-flex
+++ b/recipe.d/0004-flex
@@ -1,3 +1,6 @@
+#requires m4
+#requires bison
+
mcd $BUILDDIR/flex
$SRC/flex-*/configure $TCONFIGARGS --disable-dependency-tracking
make $J -k
diff --git a/recipe.d/0005-bison b/recipe.d/0005-bison
index f5b4773..e4f248c 100644
--- a/recipe.d/0005-bison
+++ b/recipe.d/0005-bison
@@ -1,3 +1,5 @@
+#requires m4
+
mcd $BUILDDIR/bison
$SRC/bison-*/configure $TCONFIGARGS
make $J -k
diff --git a/recipe.d/0006-readline b/recipe.d/0006-readline
index ed2f513..076cb2d 100644
--- a/recipe.d/0006-readline
+++ b/recipe.d/0006-readline
@@ -1,3 +1,5 @@
+#requires ncurses
+
mcd $BUILDDIR/readline
$SRC/readline-*/configure $TCONFIGARGS
make $J
diff --git a/recipe.d/0006-texinfo b/recipe.d/0006-texinfo
index d42fd72..677c80b 100644
--- a/recipe.d/0006-texinfo
+++ b/recipe.d/0006-texinfo
@@ -1,3 +1,5 @@
+#requires ncurses
+
mcd $BUILDDIR/texinfo
$SRC/texinfo-*/configure $TCONFIGARGS
make $J -k
diff --git a/recipe.d/0007-gdb b/recipe.d/0007-gdb
index 62b8aaf..cdaf9bf 100644
--- a/recipe.d/0007-gdb
+++ b/recipe.d/0007-gdb
@@ -1,3 +1,9 @@
+#requires ncurses
+#requires flex
+#requires bison
+#requires readline
+#requires texinfo
+
mcd $BUILDDIR/gdb
$SRC/gdb-*/configure $TCONFIGARGS --without-rpm --with-system-readline
notparallel
diff --git a/recipe.d/0008-curl b/recipe.d/0008-curl
index 12d95ae..9eeb92c 100644
--- a/recipe.d/0008-curl
+++ b/recipe.d/0008-curl
@@ -1,3 +1,5 @@
+#requires perl
+
mcd $BUILDDIR/curl
$SRC/curl-*/configure $TCONFIGARGS
make $J
diff --git a/recipe.d/0010-pcre b/recipe.d/0010-pcre
index bfcb1dd..9f3b6bf 100644
--- a/recipe.d/0010-pcre
+++ b/recipe.d/0010-pcre
@@ -1,3 +1,6 @@
+#requires readline
+#requires libtool
+
# install fails if these files already exist!
rm -f /usr/share/man/man3/pcre* || true
mcd $BUILDDIR/pcre
diff --git a/recipe.d/0013-sqlite b/recipe.d/0013-sqlite
index e3af038..a8d6305 100644
--- a/recipe.d/0013-sqlite
+++ b/recipe.d/0013-sqlite
@@ -1,3 +1,6 @@
+#requires ncurses
+#requires readline
+
#####################################################
# sqlite is choking on sqlite_int64 definition
#####################################################
diff --git a/recipe.d/0014-gdbm b/recipe.d/0014-gdbm
index 3ebe358..b2afea1 100644
--- a/recipe.d/0014-gdbm
+++ b/recipe.d/0014-gdbm
@@ -1,6 +1,8 @@
+#requires libtool
+
mcd $BUILDDIR/gdbm
echo "Current in: $PWD"
- $SRC/${1}-*/configure $TCONFIGARGS
+ $SRC/gdbm-*/configure $TCONFIGARGS
make $J
make $J install
diff --git a/recipe.d/0016-pth b/recipe.d/0016-pth
index 762f780..a393cc3 100644
--- a/recipe.d/0016-pth
+++ b/recipe.d/0016-pth
@@ -1,5 +1,5 @@
mcd $BUILDDIR/pth
- $SRC/${1}-*/configure $TCONFIGARGS
+ $SRC/pth-*/configure $TCONFIGARGS
make $J
make $J install
diff --git a/recipe.d/0017-libtool b/recipe.d/0017-libtool
index 8f0591a..58419d5 100644
--- a/recipe.d/0017-libtool
+++ b/recipe.d/0017-libtool
@@ -1,3 +1,5 @@
+#requires texinfo
+
mcd $BUILDDIR/libtool
$SRC/libtool-*/configure $TCONFIGARGS
make $J
diff --git a/recipe.d/0018-db4 b/recipe.d/0018-db4
index 4b35df2..322a1db 100644
--- a/recipe.d/0018-db4
+++ b/recipe.d/0018-db4
@@ -1,3 +1,5 @@
+#requires libtool
+
mcd $BUILDDIR/db4
$SRC/db-*/dist/configure $TCONFIGARGS
make $J
diff --git a/recipe.d/0019-perl b/recipe.d/0019-perl
index 2a1ebf3..1683f3f 100644
--- a/recipe.d/0019-perl
+++ b/recipe.d/0019-perl
@@ -1,3 +1,6 @@
+#requires gdbm
+#requires db4
+
mcd $BUILDDIR/perl
cd $SRC/perl-*
diff --git a/recipe.d/0020-openssl b/recipe.d/0020-openssl
index b47a1a5..195fb26 100644
--- a/recipe.d/0020-openssl
+++ b/recipe.d/0020-openssl
@@ -1,3 +1,5 @@
+#requires perl
+
mcd $BUILDDIR/openssl
cd $SRC/openssl-*
./Configure \
diff --git a/recipe.d/0021-gettext b/recipe.d/0021-gettext
index c4128a0..2a066c6 100644
--- a/recipe.d/0021-gettext
+++ b/recipe.d/0021-gettext
@@ -1,3 +1,6 @@
+#requires bison
+#requires libtool
+
mcd $BUILDDIR/gettext
$SRC/gettext-*/configure $TCONFIGARGS --disable-static --enable-shared --with-pic-=yes --disable-csharp --disable-rpath
make $J
diff --git a/recipe.d/0021-popt b/recipe.d/0021-popt
index 18cccaf..b21f5f3 100644
--- a/recipe.d/0021-popt
+++ b/recipe.d/0021-popt
@@ -1,3 +1,5 @@
+#requires gettext
+
mcd $BUILDDIR/popt
$SRC/popt-*/configure $TCONFIGARGS
make $J
diff --git a/recipe.d/0022-libffi b/recipe.d/0022-libffi
index cd0d9b1..5fa3547 100644
--- a/recipe.d/0022-libffi
+++ b/recipe.d/0022-libffi
@@ -1,3 +1,5 @@
+#requires pcre
+
mcd $BUILDDIR/libffi
$SRC/libffi-*/configure $TCONFIGARGS
make $J
diff --git a/recipe.d/0022-pkgconfig b/recipe.d/0022-pkgconfig
index 863e66d..8407806 100644
--- a/recipe.d/0022-pkgconfig
+++ b/recipe.d/0022-pkgconfig
@@ -1,3 +1,5 @@
+#requires popt
+
mcd $BUILDDIR/pkg-config
$SRC/pkg-config-*/configure $TCONFIGARGS --disable-shared --with-installed-glib --with-installed-popt
make $J
diff --git a/recipe.d/0023-glib2 b/recipe.d/0023-glib2
index 294be35..4863a80 100644
--- a/recipe.d/0023-glib2
+++ b/recipe.d/0023-glib2
@@ -1,3 +1,9 @@
+#requires libffi
+#requires pcre
+#requires libtool
+#requires gettext
+#requires pkgconfig
+
mcd $BUILDDIR/glib2
# glib2 expects --enable-threads=yes to enable threads,
# anything else disables threads
diff --git a/recipe.d/0023-nss-util b/recipe.d/0023-nss-util
index 1c546d5..aeaafba 100644
--- a/recipe.d/0023-nss-util
+++ b/recipe.d/0023-nss-util
@@ -1,6 +1,5 @@
-########################################################
-# needs perl
-########################################################
+#requires nspr
+#requires perl
mcd $BUILDDIR/nss
@@ -23,18 +22,18 @@ export FREEBL_NO_DEPEND
NSS_USE_SYSTEM_SQLITE=1
export NSS_USE_SYSTEM_SQLITE
-make -C $SRC/${1}-3.*/mozilla/security/coreconf
-make -C $SRC/${1}-3.*/mozilla/security/dbm
-make -C $SRC/${1}-3.*/mozilla/security/nss
+make -C $SRC/nss-util-3.*/mozilla/security/coreconf
+make -C $SRC/nss-util-3.*/mozilla/security/dbm
+make -C $SRC/nss-util-3.*/mozilla/security/nss
-cd $SRC/${1}-3.*/mozilla/security/coreconf
+cd $SRC/nss-util-3.*/mozilla/security/coreconf
make install
-cd $SRC/${1}-3.*/mozilla/security/dbm
+cd $SRC/nss-util-3.*/mozilla/security/dbm
make install
-cd $SRC/${1}-3.*/mozilla/security/nss
+cd $SRC/nss-util-3.*/mozilla/security/nss
make install
# Copy the binary libraries we want
-cd $SRC/${1}-3.*
+cd $SRC/nss-util-3.*
for file in `cd mozilla/dist/*.OBJ/lib; echo *`
do
diff --git a/recipe.d/0024-nss-softokn b/recipe.d/0024-nss-softokn
index 2df15e6..7dfc548 100644
--- a/recipe.d/0024-nss-softokn
+++ b/recipe.d/0024-nss-softokn
@@ -1,6 +1,7 @@
-########################################################
-# needs perl
-########################################################
+#requires nspr
+#requires perl
+#requires pkgconfig
+#requires nss-util
mcd $BUILDDIR/nss
@@ -28,18 +29,18 @@ export FREEBL_NO_DEPEND
NSS_USE_SYSTEM_SQLITE=1
export NSS_USE_SYSTEM_SQLITE
-make -C $SRC/${1}-3.*/mozilla/security/coreconf
-make -C $SRC/${1}-3.*/mozilla/security/dbm
-make -C $SRC/${1}-3.*/mozilla/security/nss
+make -C $SRC/nss-softokn-3.*/mozilla/security/coreconf
+make -C $SRC/nss-softokn-3.*/mozilla/security/dbm
+make -C $SRC/nss-softokn-3.*/mozilla/security/nss
-cd $SRC/${1}-3.*/mozilla/security/coreconf
+cd $SRC/nss-softokn-3.*/mozilla/security/coreconf
make install
-cd $SRC/${1}-3.*/mozilla/security/dbm
+cd $SRC/nss-softokn-3.*/mozilla/security/dbm
make install
-cd $SRC/${1}-3.*/mozilla/security/nss
+cd $SRC/nss-softokn-3.*/mozilla/security/nss
make install
# Copy the binary libraries we want
-cd $SRC/${1}-3.*
+cd $SRC/nss-softokn-3.*
for file in `cd mozilla/dist/*.OBJ/lib; echo *`
do
diff --git a/recipe.d/0025-nss b/recipe.d/0025-nss
index 0050a57..de962eb 100644
--- a/recipe.d/0025-nss
+++ b/recipe.d/0025-nss
@@ -1,6 +1,8 @@
- ########################################################
- # needs perl
- ########################################################
+#requires nspr
+#requires perl
+#requires nss-util
+#requires nss-softokn
+
mcd $BUILDDIR/nss
BUILD_OPT=1
export BUILD_OPT
@@ -19,17 +21,17 @@
FREEBL_LIB_DIR=/usr/lib
export FREEBL_LIB_DIR
- make -C $SRC/${1}-3.*/mozilla/security/coreconf
- make -C $SRC/${1}-3.*/mozilla/security/dbm
- make -C $SRC/${1}-3.*/mozilla/security/nss
- cd $SRC/${1}-3.*/mozilla/security/coreconf
+ make -C $SRC/nss-3.*/mozilla/security/coreconf
+ make -C $SRC/nss-3.*/mozilla/security/dbm
+ make -C $SRC/nss-3.*/mozilla/security/nss
+ cd $SRC/nss-3.*/mozilla/security/coreconf
make install
- cd $SRC/${1}-3.*/mozilla/security/dbm
+ cd $SRC/nss-3.*/mozilla/security/dbm
make install
- cd $SRC/${1}-3.*/mozilla/security/nss
+ cd $SRC/nss-3.*/mozilla/security/nss
make install
# Copy the binary libraries we want
- cd $SRC/${1}-3.*
+ cd $SRC/nss-3.*
for file in libnss3.so libnssckbi.so libnsspem.so libnsssysinit.so libsmime3.so libssl3.so libnssutil3.so libnssdbm3.chk libfreebl3.chk libfreebl3.so libnssdbm3.so libsoftokn3.chk libsoftokn3.so
do
install -p -m 755 mozilla/dist/*.OBJ/lib/$file /usr/lib/
diff --git a/recipe.d/0026-elfutils b/recipe.d/0026-elfutils
index 3c3bf46..6d90bb2 100644
--- a/recipe.d/0026-elfutils
+++ b/recipe.d/0026-elfutils
@@ -1,3 +1,7 @@
+#requires flex
+#requires bison
+#requires gettext
+
mcd $BUILDDIR/elfutils
$SRC/elfutils-*/configure $TCONFIGARGS --program-prefix=eu-
make $J
diff --git a/recipe.d/0027-fakechroot b/recipe.d/0027-fakechroot
index 09bbfde..8b57e4c 100644
--- a/recipe.d/0027-fakechroot
+++ b/recipe.d/0027-fakechroot
@@ -1,3 +1,5 @@
+#requires libtool
+
mcd $BUILDDIR/fakechroot
$SRC/fakechroot-*/configure $TCONFIGARGS \
--disable-dependency-tracking \
diff --git a/recipe.d/0030-file b/recipe.d/0030-file
index 477096d..6c8adec 100644
--- a/recipe.d/0030-file
+++ b/recipe.d/0030-file
@@ -1,4 +1,4 @@
-cd $SRC/${1}-*
+cd $SRC/file-*
./configure $TCONFIGARGS
make $J
make install
diff --git a/recipe.d/0031-ustr b/recipe.d/0031-ustr
index bbf1738..ee111f6 100644
--- a/recipe.d/0031-ustr
+++ b/recipe.d/0031-ustr
@@ -1,4 +1,4 @@
-cd $SRC/$1-*
+cd $SRC/ustr-*
make $J CC=gcc
make $J CC=gcc all-shared
make $J CC=gcc install
diff --git a/recipe.d/0033-libusb b/recipe.d/0033-libusb
index f8ed4bb..ee0ace8 100644
--- a/recipe.d/0033-libusb
+++ b/recipe.d/0033-libusb
@@ -1,3 +1,5 @@
+#requires libusb1
+
cd $SRC/libusb-compat-*
./configure $TCONFIGARGS
make $J
diff --git a/recipe.d/0034-tzdata b/recipe.d/0034-tzdata
index 0362bf6..a61f815 100644
--- a/recipe.d/0034-tzdata
+++ b/recipe.d/0034-tzdata
@@ -1,7 +1,8 @@
-#
+#requires perl
+
# Note: java tzdata is not built (unlike tzdata.spec)
#
-cd $SRC/$1
+cd $SRC/tzdata
test -d obj && rm -rf obj
make $J
make $J install
diff --git a/recipe.d/0035-redhat-rpm-config b/recipe.d/0035-redhat-rpm-config
index 13d783e..7bbdd2b 100644
--- a/recipe.d/0035-redhat-rpm-config
+++ b/recipe.d/0035-redhat-rpm-config
@@ -1,3 +1,9 @@
+#requires libtool
+#requires nss
+#requires elfutils
+#requires fakechroot
+#requires file
+
cd $SRC/redhat-rpm-config-*
make install
cp -p /usr/share/libtool/config/config.{guess,sub} /usr/lib/rpm/redhat/
diff --git a/recipe.d/0036-rpm b/recipe.d/0036-rpm
index 7405771..61aca69 100644
--- a/recipe.d/0036-rpm
+++ b/recipe.d/0036-rpm
@@ -1,3 +1,19 @@
+#requires cpio
+#requires ncurses
+#requires readline
+#requires gdb
+#requires curl
+#requires sqlite
+#requires gettext
+#requires popt
+#requires pkgconfig
+#requires nss-softokn
+#requires nss
+#requires elfutils
+#requires fakechroot
+#requires file
+#requires redhat-rpm-config
+
mcd $BUILDDIR/rpm
$SRC/rpm-*/configure $TCONFIGARGS \
--build=armv7hl-redhat-linux-gnueabi \
diff --git a/recipe.d/0100-ccache b/recipe.d/0100-ccache
deleted file mode 100644
index f652995..0000000
--- a/recipe.d/0100-ccache
+++ /dev/null
@@ -1,4 +0,0 @@
- mcd $BUILDDIR/ccache
- $SRC/ccache-*/configure $TCONFIGARGS
- make $J
- make $J install
diff --git a/recipe.d/0101-cracklib b/recipe.d/0101-cracklib
index 53ae6ce..c9cf35d 100644
--- a/recipe.d/0101-cracklib
+++ b/recipe.d/0101-cracklib
@@ -1,3 +1,6 @@
+#requires libtool
+#requires gettext
+
mcd $BUILDDIR/cracklib
$SRC/cracklib-*/configure $TCONFIGARGS
make $J
diff --git a/recipe.d/0101-libsepol b/recipe.d/0101-libsepol
index 427647f..831a93a 100644
--- a/recipe.d/0101-libsepol
+++ b/recipe.d/0101-libsepol
@@ -1,5 +1,5 @@
mcd $BUILDDIR/libsepol
rsync -av $SRC/libsepol-*/ ./
-make $J
-make $J install
+make CC=gcc $J
+make CC=gcc $J install
diff --git a/recipe.d/0102-attr b/recipe.d/0102-attr
index 6f9d867..757031f 100644
--- a/recipe.d/0102-attr
+++ b/recipe.d/0102-attr
@@ -1,3 +1,6 @@
+#requires libtool
+#requires gettext
+
mcd $BUILDDIR/attr
rsync -av $SRC/attr-*/ ./
./configure $TCONFIGARGS --libexecdir=/usr/lib
diff --git a/recipe.d/0103-acl b/recipe.d/0103-acl
index 878a406..000ad52 100644
--- a/recipe.d/0103-acl
+++ b/recipe.d/0103-acl
@@ -1,3 +1,7 @@
+#requires libtool
+#requires gettext
+#requires attr
+
mcd $BUILDDIR/acl
rsync -av $SRC/acl-*/ ./
touch .census
diff --git a/recipe.d/0104-libsemanage b/recipe.d/0104-libsemanage
index ce9ff42..c774e97 100644
--- a/recipe.d/0104-libsemanage
+++ b/recipe.d/0104-libsemanage
@@ -1,3 +1,8 @@
+#requires flex
+#requires bison
+#requires ustr
+#requires libsepol
+
mcd $BUILDDIR/libsemanage
rsync -av $SRC/libsemanage-*/ ./
diff --git a/recipe.d/0105-pam b/recipe.d/0105-pam
index 479b3c4..dab92c2 100644
--- a/recipe.d/0105-pam
+++ b/recipe.d/0105-pam
@@ -1,3 +1,12 @@
+#requires flex
+#requires bison
+#requires libtool
+#requires db4
+#requires perl
+#requires gettext
+#requires pkgconfig
+#requires cracklib
+
# FIXME: this possibly has a problem with pam_faillock.8
# not sure if configure would re-generate that warning at this point
mcd $BUILDDIR/pam
diff --git a/recipe.d/0106-shadow-utils b/recipe.d/0106-shadow-utils
index 7cef382..77e8875 100644
--- a/recipe.d/0106-shadow-utils
+++ b/recipe.d/0106-shadow-utils
@@ -1,3 +1,8 @@
+#requires libtool
+#requires attr
+#requires acl
+#requires libsemanage
+
mcd $BUILDDIR/shadow
$SRC/shadow-*/configure $TCONFIGARGS
make $J
diff --git a/recipe.d/0107-strace b/recipe.d/0107-strace
index c755d60..971da3c 100644
--- a/recipe.d/0107-strace
+++ b/recipe.d/0107-strace
@@ -1,3 +1,5 @@
+go acl
+
mcd $BUILDDIR/strace
$SRC/strace-*/configure $TCONFIGARGS
make $J
diff --git a/recipe.d/XXXX-audit b/recipe.d/XXXX-audit
index 6aa2091..8679b71 100644
--- a/recipe.d/XXXX-audit
+++ b/recipe.d/XXXX-audit
@@ -1,3 +1,5 @@
+#skip
+
#######################################################
# needs: libprelude, libcap, openldap, python,
# tcp_wrappers, swig
diff --git a/recipe.d/XXXX-gnupg b/recipe.d/XXXX-gnupg
index ef22072..82a6216 100644
--- a/recipe.d/XXXX-gnupg
+++ b/recipe.d/XXXX-gnupg
@@ -1,8 +1,9 @@
+#skip
#######################################################
# needs libgpg-error, libgcrypt, libassuan, libksba
#######################################################
mcd $BUILDDIR/gnupg2
- $SRC/${1}-*/configure $TCONFIGARGS
+ $SRC/gnupg2-*/configure $TCONFIGARGS
make $J
make $J install
diff --git a/recipe.d/XXXX-rpm b/recipe.d/XXXX-rpm
index 3265bcf..b23a2ba 100644
--- a/recipe.d/XXXX-rpm
+++ b/recipe.d/XXXX-rpm
@@ -1,5 +1,6 @@
+#skip
mcd $BUILDDIR/rpm
- $SRC/${1}-*/configure $TCONFIGARGS
+ $SRC/rpm-*/configure $TCONFIGARGS
notparallel
make $J
make $J install
diff --git a/script2makefile b/script2makefile
new file mode 100644
index 0000000..63701a5
--- /dev/null
+++ b/script2makefile
@@ -0,0 +1,38 @@
+#!/usr/bin/make
+
+SCRIPTDIR := recipe.d
+FRAGDIR := recipe.mk
+RCFILE := ./scripts.rc
+
+SCRIPTS := $(sort $(wildcard ${SCRIPTDIR}/*[0-9A-Za-z]))
+FRAGS := $(addsuffix .mk,$(addprefix ${FRAGDIR}/,$(notdir $(SCRIPTS))))
+
+${FRAGDIR}/%.mk : ${SCRIPTDIR}/%
+ @( \
+ if grep '^#skip' $< >/dev/null ; then true; else \
+ deps=`grep '^#requires ' $< | sed 's@#requires @done\/@'` ;\
+ deps=`echo $$deps` ;\
+ base=`echo $* | sed 's/^[0-9][0-9][0-9][0-9]-//'` ;\
+ echo TARGETS += done/$$base ;\
+ echo ".PHONY: $$base" ;\
+ echo "$$base : done/$$base" ;\
+ echo " @true" ;\
+ echo "done/$$base : $$deps" ;\
+ echo " @echo " ;\
+ echo " @echo Building $$base" ;\
+ echo " @echo " ;\
+ echo " @bash --rcfile ${RCFILE} -i ${SCRIPTDIR}/$*" ;\
+ echo " @true > done/$$base" ;\
+ fi \
+ ) > $@
+
+all.first : all.targets
+ @true
+
+TARGETS :=
+
+include ${FRAGS}
+
+all.targets : ${TARGETS}
+ @echo
+ @echo 'done!'
diff --git a/stage1 b/stage1
index 0c63513..5b270b7 100755
--- a/stage1
+++ b/stage1
@@ -359,6 +359,7 @@ case "$1" in
go xz
go grep
go distcc
+ go ccache
go stage2
@@ -776,6 +777,7 @@ EOF
notparallel
make $J
make $J install DESTDIR=${ROOTFS}
+ ln -s gcc ${ROOTFS}/usr/bin/cc
;;
make | tar | gzip | diffutils | findutils | gawk | which | grep )
@@ -912,11 +914,27 @@ EOF
mcd $ROOTFS/stage2/distcc-bin
for p in gcc cc g++ c++ as ${TARGET}-gcc ${TARGET}-g++ ${TARGET}-as
do
- test -f $p && rm $p
+ test -e $p && rm $p
ln -s /usr/bin/distcc $p
done
;;
+ ccache )
+ srpm ccache
+ mcd $BUILDDIR ccache
+ $SRC/${1}-*/configure $TCONFIGARGS
+ notparallel
+ make $J V=1
+ make $J install DESTDIR=${ROOTFS}
+
+ mcd $ROOTFS/stage2/ccache-bin
+ for p in gcc cc g++ c++ as ${TARGET}-gcc ${TARGET}-g++ ${TARGET}-as
+ do
+ test -e $p && rm $p
+ ln -s /usr/bin/ccache $p
+ done
+ ;;
+
stage2 )
# install source trees in rootfs, so stage2 will have them for
# its builds.
@@ -939,6 +957,8 @@ EOF
# before they can be used.
cp $MYDIR/recipe.d/* $ROOTFS/stage2/recipe.d
+ cp $MYDIR/macros.bashrc $ROOTFS/stage2
+ cp $MYDIR/script2makefile $ROOTFS/stage2
for PKG in $ROOTFS/stage2/recipe.d/[0-9][0-9][0-9][0-9]-*
do
@@ -963,9 +983,13 @@ EOF
(
newJ=$(echo $J | sed 's/-j//')
echo J=-j$newJ
+
echo DISTCC_HOSTS=$(host $(hostname) | sed 's/.* //'):${DISTCC_PORT}/999
echo DISTCC_BACKOFF_PERIOD=0
echo PATH=/stage2/distcc-bin:\$PATH
+
+ echo PATH=/stage2/ccache-bin:\$PATH
+
echo TARGET=$TARGET
echo RPMTARGET=$RPMTARGET
echo TCONFIGARGS=\"$TCONFIGARGS\" \
@@ -980,10 +1004,10 @@ EOF
) > $ROOTFS/stage2/local.conf
mcd $PREFIX/distccd-bin
- rm -f gcc cc g++ c++ as
+ rm -f gcc cc g++ c++ as ${TARGET}-gcc ${TARGET}-g++ ${TARGET}-as
ln -s $PREFIX/bin/${TARGET}-gcc gcc
- ln -s $PREFIX/bin/${TARGET}-gcc ${TARGET}-gcc
ln -s $PREFIX/bin/${TARGET}-gcc cc
+ ln -s $PREFIX/bin/${TARGET}-gcc ${TARGET}-gcc
ln -s $PREFIX/bin/${TARGET}-g++ ${TARGET}-g++
ln -s $PREFIX/bin/${TARGET}-g++ g++
ln -s $PREFIX/bin/${TARGET}-g++ c++
diff --git a/stage2 b/stage2
index 32f19a7..cea5b7d 100755
--- a/stage2
+++ b/stage2
@@ -68,10 +68,7 @@ TARGET=armv7hl-redhat-linux-gnueabi
export TARGET BUILDDIR J SRC STAGE2 MYDIR TOP
-if [ -f $MYDIR/local.conf ]
-then
- . $MYDIR/local.conf
-fi
+. $MYDIR/macros.bashrc
if [ ! -c /dev/null -a -w / ]
then
@@ -107,61 +104,28 @@ fi
# ------------------------------------------------------------
-mkdirp()
-{
- test -d $1 || mkdir -p $1
-}
-
mkdirp $BUILDDIR
-go()
-{
- "$0" "$@"
-}
-
-mcd()
-{
- test -d $1 || mkdir -p $1
- cd $1
-}
-
-notparallel()
-{
- echo .NOTPARALLEL: >> Makefile
-}
+test -d /stage2/done || mkdir /stage2/done
-fix_la()
+scriptmake()
{
- for la in $ROOTFS/usr/lib/*$1*.la
- do
- rm $la
- done
+ test -d $TOP/recipe.mk || mkdir -p $TOP/recipe.mk
+ make -f $MYDIR/script2makefile \
+ SCRIPTDIR=$TOP/recipe.d \
+ FRAGDIR=$TOP/recipe.mk \
+ RCFILE=$TOP/macros.bashrc \
+ SRC="$SRC" \
+ J="$J" \
+ BUILDDIR="$BUILDDIR" \
+ TARGET="$TARGET" \
+ $1
}
-test -d /stage2/done || mkdir /stage2/done
-
case "$1" in
"" )
go clean
-
- # build recipes are now in /stage2/recipe.d/
- # enabled recipes start with [0-9]{4}-
- # disabled recipes start with XXXX-
-
-
- for PKG in /stage2/recipe.d/[0-9][0-9][0-9][0-9]-*
- do
- PKG="$(basename $PKG|sed 's/^[0-9]*-//')"
- if [ ! -f "/stage2/done/$PKG" ]
- then
- if go "$PKG"
- then
- echo "$PKG" OK
- else
- echo "$PKG" BAD
- fi
- fi
- done
+ scriptmake
;;
"clean" )
@@ -183,27 +147,8 @@ case "$1" in
*~ ) ;;
* )
- if [ -f "/stage2/recipe.d/"[0-9][0-9][0-9][0-9]"-$1" ]
- then
- echo
- echo
- echo Building $1 . . .
- echo
- set -e
-
- . /stage2/recipe.d/[0-9][0-9][0-9][0-9]-"$1"
-
- set +e
- echo
- echo Building $1 succeeded
- echo
- : > /stage2/done/$1
- exit 0
- else
- echo "No build recipe found for $1" >&2
- exit 2
- fi
-
+ scriptmake "$1"
+ ;;
esac
exit 0