summaryrefslogtreecommitdiff
path: root/pcr/qtox-git
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-01-19 21:52:35 -0200
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-01-19 21:52:35 -0200
commit83c3448562d63f39a2e0804e4474fc883cdde54b (patch)
tree1dc3d7296b0cbceb79b9ed3161d20d7c35b87dee /pcr/qtox-git
parent42bf39e10250504590efbd1ee14381398f8fe491 (diff)
qtox-git: add new package to [pcr]
Diffstat (limited to 'pcr/qtox-git')
-rw-r--r--pcr/qtox-git/PKGBUILD65
-rw-r--r--pcr/qtox-git/qtox-git.install12
2 files changed, 77 insertions, 0 deletions
diff --git a/pcr/qtox-git/PKGBUILD b/pcr/qtox-git/PKGBUILD
new file mode 100644
index 000000000..91656e035
--- /dev/null
+++ b/pcr/qtox-git/PKGBUILD
@@ -0,0 +1,65 @@
+# Maintainer (Arch): Kevin MacMartin <prurigro at gmail dot com>
+
+_pkgname=qtox
+pkgname=${_pkgname}-git
+pkgver=r1827.c0fef78
+pkgrel=1
+pkgdesc="Powerful QT Tox client that tries to follow the Tox UI guidlines"
+arch=('i686' 'x86_64')
+url="https://github.com/tux3/qTox"
+license=('GPL3')
+depends=('desktop-file-utils'
+ 'filter_audio-git'
+ 'libxkbcommon-x11'
+ 'libxss'
+ 'opencv'
+ 'openal'
+ 'qt5-base'
+ 'tox-git>=r3070')
+makedepends=('git' 'qt5-tools')
+provides=("$_pkgname")
+conflicts=("$_pkgname")
+replaces=("$_pkgname")
+install="${pkgname}.install"
+source=("${_pkgname}::git+${url}.git")
+sha512sums=('SKIP')
+
+pkgver() {
+ cd $_pkgname
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd $_pkgname
+ [[ -d 'libs' ]] \
+ && rm -rf libs
+ install -d libs
+ ln -s /usr/lib libs/
+ ln -s /usr/include libs/
+}
+
+build() {
+ cd $_pkgname
+ install -d build
+ cd build
+ qmake-qt5 ..
+ make
+}
+
+package() {
+ cd $_pkgname
+
+ # executable
+ install -Dm755 build/${_pkgname} "${pkgdir}/usr/bin/${_pkgname}"
+
+ # xdg desktop file
+ install -Dm644 qTox.desktop "${pkgdir}/usr/share/applications/qTox.desktop"
+
+ # icons
+ cd img/icons
+ for _icon in *.png; do
+ _size=$(sed 's|^[^-]*-||;s|\.png||' <<< $_icon)
+ install -Dm644 $_icon "$pkgdir"/usr/share/icons/hicolor/${_size}/apps/${_pkgname}.png
+ done
+ install -Dm644 ${_pkgname}.svg "$pkgdir"/usr/share/icons/hicolor/scalable/apps/${_pkgname}.png
+}
diff --git a/pcr/qtox-git/qtox-git.install b/pcr/qtox-git/qtox-git.install
new file mode 100644
index 000000000..fd791829a
--- /dev/null
+++ b/pcr/qtox-git/qtox-git.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_upgrade
+}