From 55cd3f10c936a8f1994111fea70ad2fbfd3409a2 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Thu, 8 May 2025 17:15:36 +0300 Subject: [PATCH] Initial Commit --- pkg.info | 10 ++++++++++ source.sh | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 pkg.info create mode 100644 source.sh diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..dfce261 --- /dev/null +++ b/pkg.info @@ -0,0 +1,10 @@ +name: openbox +description: A minimalistic, highly configurable, next generation window manager with extensive standards support +version: 3.6.1 +url: http://openbox.org/ +license: GPL2 +architecture: any +depends: ["imlib2","librsvg","libsm","libxcursor","libxinerama","libxml2","libxrandr","pango","startup-notification"] +optional_depends: ["python-pyxdg"] +make_depends: ["python-pyxdg"] +type: source diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..f6d7f63 --- /dev/null +++ b/source.sh @@ -0,0 +1,35 @@ +# This is the source.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="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 +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 +} + +# 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 + 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 + + # Remove additional sessions for DEs with currently non-existent packages + rm "$BPM_OUTPUT"/usr/share/xsessions/openbox-{gnome,kde}.desktop + + install -Dm644 COPYING "$BPM_OUTPUT"/usr/share/licenses/openbox/COPYING +}