Switch to new package format
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
# 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-rpath
|
||||
make -j1
|
||||
}
|
||||
|
||||
# The check function is executed in the source directory
|
||||
# This function is used to run tests to verify the package has been compiled correctly
|
||||
check() {
|
||||
cd unix
|
||||
|
||||
make -j1 test
|
||||
}
|
||||
|
||||
# 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-libraries install-msgs install-private-headers
|
||||
|
||||
# Remove build directory traces
|
||||
sed -e "s|${BPM_SOURCE}/unix|/usr/lib|" \
|
||||
-e "s|${BPM_SOURCE}|/usr/include|" \
|
||||
-i "$BPM_OUTPUT"/usr/lib/tclConfig.sh
|
||||
tdbcver=$(ls -1 "${BPM_SOURCE}"/unix/pkgs | grep '^tdbc[0-9]' | sed 's/^tdbc//')
|
||||
sed -e "s|${BPM_SOURCE}/unix/pkgs/tdbc$tdbcver|/usr/lib/tdbc$tdbcver|" \
|
||||
-e "s|${BPM_SOURCE}/pkgs/tdbc$tdbcver/generic|/usr/include|" \
|
||||
-e "s|${BPM_SOURCE}/pkgs/tdbc$tdbcver/library|/usr/lib/tcl${BPM_PKG_VERSION%.*}|" \
|
||||
-e "s|${BPM_SOURCE}/pkgs/tdbc$tdbcver|/usr/include|" \
|
||||
-i "$BPM_OUTPUT"/usr/lib/tdbc$tdbcver/tdbcConfig.sh
|
||||
itclver=$(ls -1 "${BPM_SOURCE}"/unix/pkgs | grep '^itcl[0-9]' | sed 's/^itcl//')
|
||||
sed -e "s|${BPM_SOURCE}/unix/pkgs/itcl$itclver|/usr/lib/itcl$itclver|" \
|
||||
-e "s|${BPM_SOURCE}/pkgs/itcl$itclver/generic|/usr/include|" \
|
||||
-e "s|${BPM_SOURCE}/pkgs/itcl$itclver|/usr/include|" \
|
||||
-i "$BPM_OUTPUT"/usr/lib/itcl$itclver/itclConfig.sh
|
||||
|
||||
# Create unversioned symlinks
|
||||
ln -sf tclsh${BPM_PKG_VERSION%.*} "$BPM_OUTPUT"/usr/bin/tclsh
|
||||
ln -sf libtcl${BPM_PKG_VERSION%.*}.so "$BPM_OUTPUT"/usr/lib/libtcl.so
|
||||
|
||||
# Move man page as it is in conflict with a perl man page
|
||||
mv "$BPM_OUTPUT"/usr/share/man/man3/Thread.3 "$BPM_OUTPUT"/usr/share/man/man3/Tcl_Thread.3
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/license.terms "$BPM_OUTPUT"/usr/share/licenses/tcl/license.terms
|
||||
}
|
||||
Reference in New Issue
Block a user