|
| 1 | +# Maintainer: David Hess (Lunix) <[email protected]> |
| 2 | +# PKGBUILD for Oscilloscope Unstable (latest git commit) |
| 3 | + |
| 4 | +pkgname=dimethoxy-oscilloscope-git |
| 5 | +# pkgver is generated from the latest git commit; the initial dummy version is 0.0.0. |
| 6 | +pkgver=7a25a9d |
| 7 | +pkgrel=1 |
| 8 | +pkgdesc="Unstable build of the latest commit of Oscilloscope from Dimethoxy's GitHub repository" |
| 9 | +arch=('x86_64') |
| 10 | +url="https://github.com/Dimethoxy/Oscilloscope" |
| 11 | +license=('GPL3') |
| 12 | +provides=('dimethoxy-oscilloscope') |
| 13 | +conflicts=('dimethoxy-oscilloscope' 'dimethoxy-oscilloscope-git' 'dimethoxy-oscilloscope-bin') |
| 14 | +# Source from the git repo (unstable build using the latest commit) |
| 15 | +source=("git+https://github.com/Dimethoxy/Oscilloscope.git") |
| 16 | +sha256sums=('SKIP') |
| 17 | + |
| 18 | +# Build and runtime dependencies – adjust as necessary for your project. |
| 19 | +makedepends=('gcc' 'git' 'cmake' 'ninja' 'pkg-config' 'alsa-lib' 'jack' 'ladspa' |
| 20 | + 'curl' 'freetype2' 'fontconfig' 'libx11' 'libxcomposite' 'libxcursor' |
| 21 | + 'libxext' 'libxinerama' 'libxrandr' 'libxrender' 'webkit2gtk' 'glu' 'mesa') |
| 22 | +depends=('curl') |
| 23 | + |
| 24 | +# Generate a proper pkgver from the git commit (using git describe) |
| 25 | +pkgver() { |
| 26 | + cd "$srcdir/Oscilloscope" |
| 27 | + # Extract the latest tag (assumed to be the base version) |
| 28 | + base_version=$(git describe --tags --abbrev=0 | sed 's/^v//') |
| 29 | + # Get the short commit hash |
| 30 | + commit_hash=$(git rev-parse --short HEAD) |
| 31 | + # Construct the version string |
| 32 | + echo "${commit_hash}" |
| 33 | +} |
| 34 | + |
| 35 | +build() { |
| 36 | + cd "$srcdir/Oscilloscope" |
| 37 | + mkdir -p build |
| 38 | + cd build |
| 39 | + # Configure using the CMake preset defined in your project. |
| 40 | + cmake --preset "Linux Release" .. |
| 41 | + # Build using the Release configuration. |
| 42 | + cmake --build . --config "Release" |
| 43 | +} |
| 44 | + |
| 45 | +package() { |
| 46 | + # Create installation directories for the plugin formats. |
| 47 | + install -d "$pkgdir/usr/lib/vst3/Oscilloscope" |
| 48 | + install -d "$pkgdir/usr/lib/lv2/Oscilloscope" |
| 49 | + install -d "$pkgdir/usr/lib/clap/Oscilloscope" |
| 50 | + install -d "$pkgdir/usr/share/licenses/$pkgname" |
| 51 | + |
| 52 | + # Install the built artifacts paths mirror those produced by your CI/CD script. |
| 53 | + cp -r "$srcdir/Oscilloscope/build/src/OscilloscopePlugin_artefacts/Release/VST3" "$pkgdir/usr/lib/vst3/Oscilloscope/" |
| 54 | + cp -r "$srcdir/Oscilloscope/build/src/OscilloscopePlugin_artefacts/Release/LV2" "$pkgdir/usr/lib/lv2/Oscilloscope/" |
| 55 | + cp -r "$srcdir/Oscilloscope/build/src/OscilloscopePlugin_artefacts/Release/CLAP" "$pkgdir/usr/lib/clap/Oscilloscope/" |
| 56 | + |
| 57 | + # Install the license. |
| 58 | + if [ -f "$srcdir/Oscilloscope/LICENSE" ]; then |
| 59 | + install -Dm644 "$srcdir/Oscilloscope/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" |
| 60 | + else |
| 61 | + curl -L "https://raw.githubusercontent.com/USERNAME/Oscilloscope/refs/heads/main/LICENSE" \ |
| 62 | + -o "$pkgdir/usr/share/licenses/$pkgname/LICENSE" |
| 63 | + fi |
| 64 | +} |
0 commit comments