Skip to content

Instantly share code, notes, and snippets.

@Phitherek Phitherek/PKGBUILD
Created Jan 28, 2017

Embed
What would you like to do?
Working PKGBUILD for lib32-glxosd-git package based on my own upstream fixes
# Maintainer: Maxime Poulin <maxpoulin64@gmail.com>
# Contributor: xpander <xpander0@gmail.com>
pkgname=lib32-glxosd-git
_gitname=GLXOSD
pkgver=r203.f5a515d
pkgrel=1
pkgdesc="An OSD for OpenGL applications running under the X Window System. This allows you to monitor your framerate and hardware temperature in games on Linux!"
arch=('i686' 'x86_64')
url="https://github.com/Phitherek/GLXOSD"
license=('GPL')
depends=('mesa' 'glu' 'fontconfig' 'freetype2' 'lm_sensors' 'libxext')
makedepends=('cmake' 'gcc' 'git' 'boost' 'libxnvctrl')
provides=('lib32-glxosd')
conflicts=('lib32-glxosd')
replaces=('lib32-glxosd')
source=('git://github.com/Phitherek/GLXOSD.git')
md5sums=('SKIP')
pkgver() {
cd "$srcdir/$_gitname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "$srcdir/$_gitname/src/freetype-gl-glxosd/freetype-gl"
git submodule init; git submodule update
}
build() {
cd "$srcdir/$_gitname"
git checkout 32bit
export CMAKE_C_FLAGS='-m32'
export CMAKE_CXX_FLAGS='-m32'
export CC='gcc -m32'
export CXX='g++ -m32'
export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
cmake -DLIB_SUFFIX=32 -DCMAKE_INSTALL_PREFIX=/usr -G "Unix Makefiles"
make all
}
package() {
cd "$srcdir/$_gitname"
git checkout 32bit
make DESTDIR="$pkgdir/" install
sed -i 's+/usr//lib32/x86_64-linux-gnu//glxosd/+/usr/lib32/glxosd+g' $pkgdir/usr/bin/glxosd32
sed -i 's+/usr//lib32/i386-linux-gnu//glxosd+/usr/lib32/glxosd+g' $pkgdir/usr/bin/glxosd32
mv $pkgdir/usr/lib $pkgdir/usr/lib32
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.