archrelease: copy trunk to extra-x86_64
[arch-packages.git] / freeglut / trunk / PKGBUILD
blob3a9388aa7cc1684393c8629aa94aa199f7b7d413
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 _commit=63c0e78d84ecbfcf8accd8bac04404427899053b  # tags/v3.4.0
18 source=("git+https://github.com/FreeGLUTProject/freeglut#commit=$_commit")
19 b2sums=('SKIP')
21 pkgver() {
22   cd freeglut
23   git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g'
26 prepare() {
27   cd freeglut
30 build() {
31   cmake -S freeglut -B build -G Ninja \
32     -DFREEGLUT_BUILD_STATIC_LIBS=OFF \
33     -DCMAKE_INSTALL_PREFIX=/usr \
34     -DCMAKE_INSTALL_LIBDIR=lib \
35     -DCMAKE_BUILD_TYPE=None
36   cmake --build build
39 package() {
40   DESTDIR="$pkgdir" cmake --install build
42   ln -s glut.pc "$pkgdir/usr/lib/pkgconfig/freeglut.pc"
44   install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" freeglut/COPYING
47 # vim:set sw=2 sts=-1 et: