# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT # The build function is executed in the source directory # This function is used to compile the source code build() { cd unix ./configure --prefix=/usr \ --mandir=/usr/share/man \ --enable-threads \ --enable-64bit \ --disable-zipfs \ --disable-rpath make } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package() { cd unix make INSTALL_ROOT="$BPM_OUTPUT" install install-private-headers # Create unversioned symlinks ln -sf wish${BPM_PKG_VERSION%.*} "$BPM_OUTPUT"/usr/bin/wish ln -sf libtk${BPM_PKG_VERSION%.*}.so "$BPM_OUTPUT"/usr/lib/libtk.so # Remove buildroot traces sed -e "s#${BPM_SOURCE}/unix#/usr/lib#" \ -e "s#${BPM_SOURCE}#/usr/include#" \ -i "${BPM_OUTPUT}/usr/lib/tkConfig.sh" # Remove unrequired execute permissions chmod -x "$BPM_OUTPUT"/usr/lib/libtkstub.a # Install package license install -Dm644 "$BPM_SOURCE"/license.terms "$BPM_OUTPUT"/usr/share/licenses/tk/license.terms }