summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-11-10 09:54:15 (EST)
committer P. J. McDermott <pjm@nac.net>2012-11-10 09:54:15 (EST)
commitc30f279353d4123967d792f3b0d37e714613f91e (patch)
tree04e0759a9690abacc85dd784a3d2a1418240dd03
parente3263174b615bf1260f0a30fb31031890b156a27 (diff)
Install directly into binary package data dirs.
Now we don't need to use oh-installfiles.
-rw-r--r--binutils-doc.pkg.in/install1
-rw-r--r--binutils.pkg.in/install5
-rwxr-xr-xbuild28
-rw-r--r--libbfd-dev.pkg.in/install6
4 files changed, 18 insertions, 22 deletions
diff --git a/binutils-doc.pkg.in/install b/binutils-doc.pkg.in/install
deleted file mode 100644
index 8a62a0f..0000000
--- a/binutils-doc.pkg.in/install
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share
diff --git a/binutils.pkg.in/install b/binutils.pkg.in/install
deleted file mode 100644
index 2154c1f..0000000
--- a/binutils.pkg.in/install
+++ /dev/null
@@ -1,5 +0,0 @@
-/usr/bin
-/usr/lib/*/*.x*
-/usr/lib/*/*/libbfd-*.so
-/usr/lib/*/*/libopcodes-*.so
-/etc
diff --git a/build b/build
index fe35207..4be17b9 100755
--- a/build
+++ b/build
@@ -56,7 +56,8 @@ install: build
# All of these macro settings are effective thanks to
# `patches/01_pass-some-dirs-to-child-makes.patch`.
for target in $$(cat ../targets); do \
- oh-autoinstall -B "build-$${target}" CFLAGS='$(CFLAGS)' \
+ oh-autoinstall -B "build-$${target}" -d "binutils-$${target}.data" \
+ CFLAGS='$(CFLAGS)' \
tooldir='/usr/tool' scriptdir="/usr/lib/$${target}" \
bfdlibdir="/usr/lib/$(OPK_HOST_ARCH)/$${target}" \
bfdincludedir="/usr/include/$(OPK_HOST_ARCH)/$${target}" || \
@@ -65,11 +66,16 @@ install: build
# /usr/tool/bin (TOOLBINDIR) contains hard links to tools. A quick look at
# the code suggests we don't need them; ld *should* work without them in any
# sane configuration.
- rm -Rf dest/usr/tool
# We don't need a static libiberty.
- find dest/usr/lib -name 'libiberty.a' -exec rm -f '{}' ';'
# Remove static library dependency metadata generated by libtool.
- find dest/usr/lib -name '*.la' -exec rm -f '{}' ';'
+ for target in $$(cat ../targets); do \
+ rm -Rf "binutils-$${target}.data/usr/tool" && \
+ find "binutils-$${target}.data/usr/lib" -name 'libiberty.a' \
+ -exec rm -f '{}' ';' && \
+ find "binutils-$${target}.data/usr/lib" -name '*.la' \
+ -exec rm -f '{}' ';' || \
+ exit 1; \
+ done
# Make symbolic links to native utilities.
for target in $$(cat ../targets); do \
if [ '$(OPK_HOST_ARCH)' = "$${target}" ]; then \
@@ -79,17 +85,19 @@ install: build
fi; \
done
# Write GNU ld configuration to point to BFD libraries.
- mkdir -p dest/etc/ld.so.conf.d
for target in $$(cat ../targets); do \
+ mkdir -p "binutils-$${target}.data/etc/ld.so.conf.d" && \
echo '# GNU BFD libraries' \
- >"dest/etc/ld.so.conf.d/bfd_$(OPK_HOST_ARCH)_$${target}" && \
+ >"binutils-$${target}.data/etc/ld.so.conf.d/bfd_$(OPK_HOST_ARCH)_$${target}" && \
echo "/usr/lib/$(OPK_HOST_ARCH)/$${target}" \
- >>"dest/etc/ld.so.conf.d/bfd_$(OPK_HOST_ARCH)_$${target}"; \
+ >>"binutils-$${target}.data/etc/ld.so.conf.d/bfd_$(OPK_HOST_ARCH)_$${target}"; \
done
# Post-process and install everything.
- oh-fixperms
- oh-strip
- oh-installfiles
+ for target in $$(cat ../targets); do \
+ oh-fixperms -d "binutils-$${target}.data" && \
+ oh-strip -d "binutils-$${target}.data" || \
+ exit 1; \
+ done
clean:
for target in $$(cat ../targets); do \
diff --git a/libbfd-dev.pkg.in/install b/libbfd-dev.pkg.in/install
deleted file mode 100644
index 536667b..0000000
--- a/libbfd-dev.pkg.in/install
+++ /dev/null
@@ -1,6 +0,0 @@
-/usr/lib/*/libiberty.a
-/usr/lib/*/*/libbfd.a
-/usr/lib/*/*/libbfd.so
-/usr/lib/*/*/libopcodes.a
-/usr/lib/*/*/libopcodes.so
-/usr/include