archrelease: copy trunk to extra-x86_64
[arch-packages.git] / freeglut / repos / extra-x86_64 / PKGBUILD
blobde38e5f4876a19166079f71a4bcdb94872f47bc2
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Eric Belanger <eric@archlinux.org>
3 # Contributor: Tom Newsom <Jeepster@gmx.co.uk>
5 pkgname=freeglut
6 pkgver=3.4.0
7 pkgrel=1
8 pkgdesc="Provides functionality for small OpenGL programs"
9 url="https://freeglut.sourceforge.net/"
10 arch=(x86_64)
11 license=(MIT)
12 depends=(libxi libxrandr libgl)
13 makedepends=(mesa glu libxxf86vm cmake ninja git)
14 replaces=(glut)
15 provides=(glut)
16 conflicts=(glut)
17 options=(debug)
18 _commit=63c0e78d84ecbfcf8accd8bac04404427899053b  # tags/v3.4.0
19 source=("git+https://github.com/FreeGLUTProject/freeglut#commit=$_commit")
20 b2sums=('SKIP')
22 pkgver() {
23   cd freeglut
24   git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g'
27 prepare() {
28   cd freeglut
31 build() {
32   cmake -S freeglut -B build -G Ninja \
33     -DFREEGLUT_BUILD_STATIC_LIBS=OFF \
34     -DCMAKE_INSTALL_PREFIX=/usr \
35     -DCMAKE_INSTALL_LIBDIR=lib \
36     -DCMAKE_BUILD_TYPE=None
37   cmake --build build
40 package() {
41   DESTDIR="$pkgdir" cmake --install build
43   ln -s glut.pc "$pkgdir/usr/lib/pkgconfig/freeglut.pc"
45   install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" freeglut/COPYING
48 # vim:set sw=2 sts=-1 et: