Add patches

This commit is contained in:
2025-10-12 11:28:19 +03:00
parent 55cd3f10c9
commit bba9306e4a
7 changed files with 268 additions and 13 deletions
+10 -10
View File
@@ -2,24 +2,23 @@
# 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="http://openbox.org/dist/openbox/openbox-${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
# This function is used for putting downloaded files to the correct location or applying patches
prepare() {
wget "$DOWNLOAD"
tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE"
# Convert a script to Python 3
cd "$BPM_SOURCE"
2to3-3.12 -w data/autostart/openbox-xdg-autostart
# Apply patches
for patch in "$BPM_WORKDIR"/*.patch; do
patch -Np1 -i "$patch"
done
autoreconf -fi
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
./configure --prefix=/usr --sysconfdir=/etc --disable-static
./configure --prefix=/usr --sysconfdir=/etc --disable-static --with-x --with-startup-notification
make
}
@@ -31,5 +30,6 @@ package() {
# Remove additional sessions for DEs with currently non-existent packages
rm "$BPM_OUTPUT"/usr/share/xsessions/openbox-{gnome,kde}.desktop
# Install package license
install -Dm644 COPYING "$BPM_OUTPUT"/usr/share/licenses/openbox/COPYING
}