diff --git a/pkg.info b/pkg.info index 79d3133..68bfda8 100644 --- a/pkg.info +++ b/pkg.info @@ -1,9 +1,18 @@ name: sdl12-compat description: An SDL-1.2 compatibility layer that uses SDL 2.0 behind the scenes -version: 1.2.68 +version: 1.2.70 +revision: 1 url: https://github.com/libsdl-org/sdl12-compat license: MIT architecture: any -depends: ["glu","sdl2-compat"] -make_depends: ["cmake"] type: source +depends: + - glu + - sdl2-compat +make_depends: + - cmake +downloads: + - url: https://github.com/libsdl-org/sdl12-compat/archive/refs/tags/release-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: b8350cc400b9605dd5e319f451f09d5d6e70bb1dfc22cd67f718b3ffc16ebb7c diff --git a/source.sh b/source.sh index 501720a..5ddcd2c 100644 --- a/source.sh +++ b/source.sh @@ -2,32 +2,17 @@ # 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="https://github.com/libsdl-org/sdl12-compat/archive/refs/tags/release-${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" -} - # The build function is executed in the source directory # This function is used to compile the source code build() { - mkdir build - cd build - - cmake -DCMAKE_INSTALL_PREFIX=/usr .. - make + cmake -B build -DCMAKE_INSTALL_PREFIX=/usr + cmake --build build } # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package() { - cd build - - make DESTDIR="$BPM_OUTPUT" install + DESTDIR="$BPM_OUTPUT" cmake --install build # Install package license install -Dm644 "$BPM_SOURCE"/LICENSE.txt "$BPM_OUTPUT"/usr/share/licenses/sdl12-compat/LICENSE.txt