Switch to new package format

This commit is contained in:
2026-06-13 19:59:13 +03:00
parent f266e183aa
commit e473bc961c
2 changed files with 2 additions and 2 deletions
+70
View File
@@ -0,0 +1,70 @@
# 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
DOWNLOAD="https://www.fftw.org/fftw-${BPM_PKG_VERSION}.tar.gz"
FILENAME="${DOWNLOAD##*/}"
# The prepare function is executed in the root of the temp directory
# This function is used for downloading files and putting them into the correct location
prepare() {
wget "$DOWNLOAD"
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
# Build double precision arithmetic version
mkdir "$BPM_SOURCE"/double_precision
cd "$BPM_SOURCE"/double_precision
../configure --prefix=/usr --enable-shared --disable-static --enable-threads --enable-sse2 --enable-avx --enable-avx2
make
# Build single precision arithmetic version
mkdir "$BPM_SOURCE"/single_precision
cd "$BPM_SOURCE"/single_precision
../configure --prefix=/usr --enable-shared --disable-static --enable-threads --enable-sse2 --enable-avx --enable-avx2 --enable-float
make
# Build long double precision arithmetic version
mkdir "$BPM_SOURCE"/long_double_precision
cd "$BPM_SOURCE"/long_double_precision
../configure --prefix=/usr --enable-shared --disable-static --enable-threads --enable-long-double
make
}
# 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() {
# Check double precision arithmetic version
cd "$BPM_SOURCE"/double_precision
make check
# Check single precision arithmetic version
cd "$BPM_SOURCE"/single_precision
make check
# Check long double precision arithmetic version
cd "$BPM_SOURCE"/long_double_precision
make check
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
# Package double precision arithmetic version
cd "$BPM_SOURCE"/double_precision
make DESTDIR="$BPM_OUTPUT" install
# Package single precision arithmetic version
cd "$BPM_SOURCE"/single_precision
make DESTDIR="$BPM_OUTPUT" install
# Package long double precision arithmetic version
cd "$BPM_SOURCE"/long_double_precision
make DESTDIR="$BPM_OUTPUT" install
# Install license
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/fftw/COPYING
}