Skip to content

Instantly share code, notes, and snippets.

@MikuAuahDark

MikuAuahDark/PKGBUILD

Last active Sep 8, 2020
Embed
What would you like to do?
LOVE PKGBUILD for ArchLinux
# This PKGBUILD is based on community love package and AUR love-hg package.
# * love (https://www.archlinux.org/packages/community/x86_64/love)
# For the dependency list
# * love-hg (https://aur.archlinux.org/packages/love-hg)
# For the building block
pkgname=love-git
pkgver=11.3.r3665.9f62bafea2b8
pkgrel=1
pkgdesc="An open-source 2D game engine which uses the versatile Lua scripting language to create dynamic gaming experiences."
arch=('i686' 'x86_64')
url="http://love2d.org/"
license=('ZLIB')
depends=('luajit' 'freetype2' 'mpg123' 'openal' 'libvorbis' 'libmodplug' 'sdl2' 'shared-mime-info' 'hicolor-icon-theme' 'desktop-file-utils' 'libtheora')
source=('git+https://github.com/love2d/love.git')
makedepends=('git')
conflicts=('love')
provides=('love')
options=(!strip)
sha256sums=('SKIP')
pkgver() {
cd $srcdir/love
echo $(git describe --abbrev=0 --tags).r$(git rev-list --count HEAD).$(git rev-parse --short=12 HEAD)
}
build() {
cd $srcdir/love
# Update version information in configure script
msg "Updating version information"
head -c 15 platform/unix/configure.ac > configure.ac.tmp
echo " [`git describe --abbrev=0 --tags`-`git rev-parse --short=12 HEAD`])" >> configure.ac.tmp
tail -n +2 platform/unix/configure.ac >> configure.ac.tmp
mv configure.ac.tmp platform/unix/configure.ac
# Generate a configure script for love-hg (note the suffix), then configure
msg "Generating makefiles"
sh platform/unix/automagic
./configure --enable-silent-rules --prefix=/usr LDFLAGS=""
# Finally build
msg "Building"
make -j$(nproc)
}
package() {
cd "$srcdir/love"
make DESTDIR="$pkgdir" install
# Install the license file
install -D -m644 license.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
# vim:set ts=4 sw=4 noet:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment