Skip to content

Commit

Permalink
PKGBUILD: Add pkgver(), copy LICENSE and README as well
Browse files Browse the repository at this point in the history
  • Loading branch information
LupertEverett authored and dpjudas committed Oct 9, 2024
1 parent 2bb7600 commit 6fec0e4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ license=('BSD-3-Clause AND MIT AND various others')
source=("git+${url}.git")
sha512sums=('SKIP')

pkgver() {
cd "${srcdir}/SurrealEngine"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

build() {
cd SurrealEngine
[[ -d build ]] && rm -rf build
Expand All @@ -33,6 +38,13 @@ package() {

# Copy SurrealEngine.pk3
install -Dm755 "${srcdir}/SurrealEngine/build/SurrealEngine.pk3" "${pkgdir}/usr/share/surrealengine/SurrealEngine.pk3"

# Copy license file and readme
install -Dm644 "${srcdir}/SurrealEngine/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}"

mkdir -p "${pkgdir}/usr/share/doc/surrealengine/"

install -Dm644 "${srcdir}/SurrealEngine/README.md" "${pkgdir}/usr/share/doc/surrealengine/readme.md"
}

post_install() {
Expand Down

0 comments on commit 6fec0e4

Please sign in to comment.