summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-01-16 05:30:58 (EST)
committer P. J. McDermott <pjm@nac.net>2012-01-16 05:30:58 (EST)
commita19f4db83b5b9579bb453e43f045b6a422b9e594 (patch)
tree913f5b007d36da723beee0a69a623ef03c81e2d4
parentcb47a13c282656651149c7df084ab1995aad424b (diff)
Provide an example 'build' file.
-rwxr-xr-xbuild.example32
1 files changed, 32 insertions, 0 deletions
diff --git a/build.example b/build.example
new file mode 100755
index 0000000..d2e1296
--- /dev/null
+++ b/build.example
@@ -0,0 +1,32 @@
+#! /usr/bin/make -f
+
+# libfoo.42 is a split package.
+libfoo.42 libfoo.42-dbg libfoo.42-dev: libfoo.42.buildstamp
+
+# This is the real target for all packages installed from the same build.
+libfoo.42.buildstamp:
+ # The current working directory is the temporary build/install directory.
+ # In this directory are 'src', 'dest', and any buildstamps.
+ cd src
+ # Configure, build, and install the software.
+ ./configure --prefix=/usr
+ make
+ make DESTDIR=../dest install
+ cd ..
+ # Make a debugging binary, strip the regular one of debugging symbols, and
+ # add to the regular binary a link directing GDB to the debugging binary.
+ objcopy --only-keep-debug dest/usr/lib/libfoo.so.42 \
+ dest/usr/lib/debug/usr/lib/libfoo.so.42
+ strip -g dest/usr/lib/libfoo.so.42
+ objcopy --add-gnu-debuglink=/usr/lib/debug/usr/lib/libfoo.so.42 \
+ dest/usr/lib/libfoo.so.42
+ # Move files from 'dest' into a binary package.
+ opk-installfiles libfoo.42
+ opk-installfiles libfoo.42-dbg
+ opk-installfiles libfoo.42-dev
+ # Pack each binary package.
+ opk-pack libfoo.42
+ opk-pack libfoo.42-dbg
+ opk-pack libfoo.42-dev
+ # Touch the build stamp to prevent these packages from being built again.
+ touch libfoo.42.buildstamp