#! /usr/bin/make -f # # build.example # Example package 'build' makefile # # Copyright (C) 2012 Patrick "P. J." McDermott # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # 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. oh-strip -g /usr/lib/libfoo.so.42 # Move files from 'dest' into a binary package. oh-installfiles libfoo.42 oh-installfiles libfoo.42-dbg oh-installfiles libfoo.42-dev # Pack each binary package. oh-buildopk libfoo.42 oh-buildopk libfoo.42-dbg oh-buildopk libfoo.42-dev # Touch the build stamp to prevent these packages from being built again. touch libfoo.42.buildstamp