Switch to new package format

This commit is contained in:
2026-06-13 20:00:34 +03:00
parent 0bbc9cc945
commit 7e55971780
2 changed files with 4 additions and 2 deletions
+43
View File
@@ -0,0 +1,43 @@
# 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() {
./configure --prefix=/usr \
--mandir=/usr/share/man \
--with-shared \
--without-debug \
--without-normal \
--with-cxx-shared \
--enable-pc-files \
--enable-widec \
--with-pkg-config-libdir=/usr/lib/pkgconfig
make
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
make DESTDIR="$BPM_OUTPUT" install
# Ensure wide-character ABI is used
sed -e 's/^#if.*XOPEN.*$/#if 1/' -i "$BPM_OUTPUT"/usr/include/curses.h
# Symlink libraries for compatibility with applications that use non-wide character ncurses libraries
for lib in ncurses form panel menu ; do
ln -sfv lib${lib}w.so "$BPM_OUTPUT"/usr/lib/lib${lib}.so
ln -sfv ${lib}w.pc "$BPM_OUTPUT"/usr/lib/pkgconfig/${lib}.pc
done
# Symlink libcurses for compatibility with older applications
ln -sfv libncursesw.so "$BPM_OUTPUT"/usr/lib/libcurses.so
# Install documentation
install -d "$BPM_OUTPUT"/usr/share/doc/ncurses/
cp -R doc -T "$BPM_OUTPUT"/usr/share/doc/ncurses
# Install package license
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/ncurses/COPYING
}