commit b7322e30382962e937ce7e1673b608ed52a57dd5 Author: EnumDev Date: Sun Apr 5 11:59:33 2026 +0300 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9d96df7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Ignore BPM archives and signatures +*.bpm +*.bpm.sig diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..0a294d4 --- /dev/null +++ b/check-version.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Codeberg repository +REPO="river/river-classic" + +# Get version from tag name using Codeberg Rest API +VERSION=$(curl -s -L https://codeberg.org/api/v1/repos/$REPO/tags/ | jq -r '.[0]'.name) + +# Remove 'v' +VERSION=${VERSION//v/} + +echo "$VERSION" diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..63f0538 --- /dev/null +++ b/pkg.info @@ -0,0 +1,49 @@ +name: river-classic +description: A dynamic tiling Wayland compositor +version: 0.3.15 +revision: 1 +url: https://codeberg.org/river/river-classic +license: GPL3-only +maintainers: + - enumdev@enumerated.dev +architecture: any +type: source +depends: + - glibc + - libevdev + - libinput + - libxkbcommon + - mesa + - pixman + - wayland + - wlroots + - xorg-xwayland +optional_depends: + - polkit +make_depends: + - scdoc + - wayland-protocols + - zig +conflicts: + - river +downloads: + - url: https://codeberg.org/river/river-classic/releases/download/v${BPM_PKG_VERSION}/river-classic-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: bda4fffb70aed0a3d35e0b27fa248aacdc03bd208abfa3e0464cb37896b2128d + - url: https://codeberg.org/ifreund/zig-pixman/archive/v0.3.0.tar.gz + extract_to: zig-pixman + extract_strip_components: 1 + checksum: cd7fe3415d4d58685a94fdedd308e9994a37f012828940cfb603461de7f2c6ad + - url: https://codeberg.org/ifreund/zig-wayland/archive/v0.5.0.tar.gz + extract_to: zig-wayland + extract_strip_components: 1 + checksum: fa9705e83613b5555d7117ce5c602f10591d6598e69a73fba2e6039200db4f4b + - url: https://codeberg.org/ifreund/zig-wlroots/archive/v0.20.0.tar.gz + extract_to: zig-wlroots + extract_strip_components: 1 + checksum: 75af3510386c639582693d01788579abde4dca9ce1ae6703c1e877ec8123d106 + - url: https://codeberg.org/ifreund/zig-xkbcommon/archive/v0.4.0.tar.gz + extract_to: zig-xkbcommon + extract_strip_components: 1 + checksum: e6df77d511cf9402f6ac08455c8d1fb727b6c3d66191e246671f62e5db083c49 diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..b4b8caa --- /dev/null +++ b/source.sh @@ -0,0 +1,56 @@ +# 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 + +# The prepare function is executed in the root of the temp directory +# This function is used for putting downloaded files to the correct location or applying patches +prepare() { + zig fetch --global-cache-dir ./zig-global-cache "$BPM_WORKDIR"/zig-pixman + zig fetch --global-cache-dir ./zig-global-cache "$BPM_WORKDIR"/zig-wayland + zig fetch --global-cache-dir ./zig-global-cache "$BPM_WORKDIR"/zig-wlroots + zig fetch --global-cache-dir ./zig-global-cache "$BPM_WORKDIR"/zig-xkbcommon +} + +# The build function is executed in the source directory +# This function is used to compile the source code +build() { + DESTDIR=build zig build \ + --summary all \ + --prefix /usr \ + --search-prefix /usr \ + --global-cache-dir ../zig-global-cache \ + --build-id=sha1 \ + -Dtarget=native-linux.6.6-gnu.2.40 \ + -Dcpu=baseline \ + -Dpie \ + -Doptimize=ReleaseSafe \ + -Dxwayland +} + +# 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() { + DESTDIR=build zig build test \ + --summary all \ + --prefix /usr \ + --search-prefix /usr \ + --global-cache-dir ../zig-global-cache \ + --build-id=sha1 \ + -Dtarget=native-linux.6.6-gnu.2.40 \ + -Dcpu=baseline \ + -Dpie \ + -Doptimize=ReleaseSafe \ + -Dxwayland +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + cp -a build/* -t "$BPM_OUTPUT" + + # Install session file + install -Dm644 contrib/river.desktop "$BPM_OUTPUT"/usr/share/wayland-sessions/river.desktop + + # Install package licenses + install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/${BPM_PKG_NAME}/LICENSE +}