From a19f4db83b5b9579bb453e43f045b6a422b9e594 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 16 Jan 2012 05:30:58 -0500 Subject: Provide an example 'build' file. --- 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 -- cgit v0.9.1