diff options
author | Swyter | 2016-02-19 12:42:41 +0100 |
---|---|---|
committer | Swyter | 2016-02-19 12:42:41 +0100 |
commit | 3acea3f943e034e9427ebd4783ff4c5337718e7c (patch) | |
tree | 92d0c6d28fad4748613c2ef35c509cc40f9b11c3 | |
download | aur-3acea3f943e034e9427ebd4783ff4c5337718e7c.tar.gz |
First revision :)
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 96 | ||||
-rw-r--r-- | openbrf.install | 11 |
3 files changed, 129 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..dd274aa14446 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +# Generated by makepkg 5.0.0 +# Fri Feb 19 11:30:14 UTC 2016 +pkgbase = openbrf + pkgver = 0.0.80 + pkgrel = 1 + install = openbrf.install + arch = i686 + arch = x86_64 + license = GPL + makedepends = icoutils + makedepends = subversion + makedepends = git + depends = qt4 + depends = glew + depends = glu + source = git+https://github.com/cfcohen/openbrf.git + source = svn://svn.code.sf.net/p/vcg/code/trunk/vcglib + md5sums = SKIP + md5sums = SKIP + +pkgname = openbrf + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e921c8b94ed8 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,96 @@ +# This is an example PKGBUILD file. Use this as a start to creating your own, +# and remove these comments. For more information, see 'man PKGBUILD'. +# NOTE: Please fill out the license field for your package! If it is unknown, +# then please put 'unknown'. + +# Maintainer: Your Name <youremail@domain.com> +pkgname=openbrf +pkgdesc='Mount&Blade resource editor by Marco Tarini.' +pkgver=0.0.80 +pkgrel=1 +epoch= +pkgdesc="" +arch=('i686' 'x86_64') +url="" +license=('GPL') +groups=() +depends=('qt4' 'glew' 'glu') +makedepends=('icoutils' 'subversion' 'git') +checkdepends=() +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +install=openbrf.install +changelog= +source=('git+https://github.com/cfcohen/openbrf.git' 'svn://svn.code.sf.net/p/vcg/code/trunk/vcglib') +noextract=() +md5sums=('SKIP' 'SKIP') +validpgpkeys=() + +pkgver() +{ + cat "${srcdir}/openbrf/main_info.cpp" | grep applVersion\ \= | cut -d'"' -f2 +} + +build() +{ + cd "openbrf" + + icotool -x openBrf.ico + + # use the correct location for our VCG lib, instead of the custom hardcoded path + sed -e "s/VCGLIB = \/home\/cory\/Source\/VCGLib/VCGLIB = ..\/vcglib/" openBrf.pro --in-place + + qmake-qt4 -makefile openBrf.pro + make -j 4 +} + +package() +{ + mkdir -p "${pkgdir}/opt/openbrf" + + install -D -m711 -s "${srcdir}/openbrf/openBrf" "${pkgdir}/opt/openbrf/openbrf" + install -D -m644 "${srcdir}/openbrf/carry_positions.txt" "${pkgdir}/opt/openbrf/carry_positions.txt" + install -D -m644 "${srcdir}/openbrf/reference.brf" "${pkgdir}/opt/openbrf/reference.brf" + + mkdir -p "${pkgdir}/usr/bin" + + echo 'env LC_NUMERIC=C /opt/openbrf/openbrf "$@"' > "${pkgdir}/usr/bin/openbrf" + chmod 755 "${pkgdir}/usr/bin/openbrf" + + install -D -m644 "${srcdir}/openbrf/openBrf_6_256x256x32.png" "${pkgdir}/usr/share/pixmaps/openbrf.png" + + + # add a shortcut that handles application/x-openbrf files + mkdir -p "${pkgdir}/usr/share/applications" + cat <<EOF > "${pkgdir}/usr/share/applications/openbrf.desktop" +#!/usr/bin/env xdg-open +[Desktop Entry] +Version=1.0 +Terminal=false +Type=Application +Name=OpenBRF +Comment=Mount&Blade resource editor by Marco Tarini. +Exec=openbrf +Icon=openbrf +MimeType=application/x-openbrf +Categories=Graphics +EOF + + # add our custom mime type for application/x-openbrf => *.brf files + mkdir -p "${pkgdir}/usr/share/mime/packages" + cat <<EOF > "${pkgdir}/usr/share/mime/packages/openbrf.xml" +<?xml version="1.0" encoding="utf-8"?> +<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> +<mime-type type="application/x-openbrf"> + <generic-icon name="openbrf"/> + <acronym>BRF</acronym> + <comment>Mount&Blade Binary Resource File</comment> + <glob pattern="*.brf"/> +</mime-type> +</mime-info> +EOF +} diff --git a/openbrf.install b/openbrf.install new file mode 100644 index 000000000000..c4f58f1700de --- /dev/null +++ b/openbrf.install @@ -0,0 +1,11 @@ +post_install() { + xdg-icon-resource forceupdate --theme hicolor &>/dev/null + update-mime-database /usr/share/mime &>/dev/null + update-desktop-database -q +} +post_upgrade() { + post_install +} +post_remove() { + post_install +} |