summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikola Milinković2015-07-29 14:28:49 +0200
committerNikola Milinković2015-07-29 14:28:49 +0200
commit7f5747e2113d013def8c2c18679e951bf29650d2 (patch)
treed8c592e05b6bb43f3b8d21f7ea551b5c235946f4
downloadaur-7f5747e2113d013def8c2c18679e951bf29650d2.tar.gz
Initial import
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD52
-rw-r--r--custom-icons-injection.patch24
3 files changed, 100 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..da4ca7eb87c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = lib32-sni-qt-eplus-bzr
+ pkgdesc = Qt4 plugin which turns all QSystemTrayIcon into StatusNotifierItems. Elementary+ version, from bzr.
+ pkgver = 98
+ pkgrel = 1
+ url = https://launchpad.net/~cybre/+archive/ubuntu/sni-qt-eplus
+ arch = x86_64
+ license = LGPL3
+ makedepends = cmake
+ makedepends = bzr
+ makedepends = gcc-multilib
+ depends = sni-qt-eplus
+ depends = lib32-libdbusmenu-qt
+ depends = lib32-qt4
+ provides = lib32-sni-qt-eplus
+ provides = lib32-sni-qt
+ conflicts = lib32-sni-qt-eplus
+ conflicts = lib32-sni-qt
+ source = sni-qt-eplus::bzr+lp:sni-qt
+ source = custom-icons-injection.patch
+ md5sums = SKIP
+ md5sums = bad3243c40a84a49b77803630b88b89e
+
+pkgname = lib32-sni-qt-eplus-bzr
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..2905e281fcc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Nikola Milinković <nikmil@gmail.com>
+
+pkgname=lib32-sni-qt-eplus-bzr
+_pkgname=sni-qt-eplus
+pkgver=98
+pkgrel=1
+pkgdesc='Qt4 plugin which turns all QSystemTrayIcon into StatusNotifierItems. Elementary+ version, from bzr.'
+arch=('x86_64')
+url='https://launchpad.net/~cybre/+archive/ubuntu/sni-qt-eplus'
+license=('LGPL3')
+depends=('sni-qt-eplus' 'lib32-libdbusmenu-qt' 'lib32-qt4')
+makedepends=('cmake' 'bzr' 'gcc-multilib')
+provides=('lib32-sni-qt-eplus' 'lib32-sni-qt')
+conflicts=('lib32-sni-qt-eplus' 'lib32-sni-qt')
+source=("$_pkgname::bzr+lp:sni-qt"
+ 'custom-icons-injection.patch')
+md5sums=('SKIP'
+ 'bad3243c40a84a49b77803630b88b89e')
+
+pkgver() {
+ cd $_pkgname
+ echo "$(bzr revno)"
+}
+
+prepare() {
+ cd "$srcdir"
+ mkdir build
+ cd "$srcdir"/"$_pkgname"
+ patch -p1 -i "$srcdir"/custom-icons-injection.patch
+}
+
+build() {
+ export CC="gcc -m32"
+ export CXX="g++ -m32"
+ export PKG_CONFIG_PATH=/usr/lib32/pkgconfig
+
+ export CFLAGS="$(pkg-config --cflags QtCore) ${CFLAGS}"
+ export CXXFLAGS="$(pkg-config --cflags QtCore) ${CXXFLAGS}"
+
+ cd "$srcdir"/build
+
+ cmake ../$_pkgname \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DQT_PLUGINS_DIR=/usr/lib32/qt/plugins
+ make
+}
+
+package() {
+ cd build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/custom-icons-injection.patch b/custom-icons-injection.patch
new file mode 100644
index 00000000000..cadf8b5771a
--- /dev/null
+++ b/custom-icons-injection.patch
@@ -0,0 +1,24 @@
+diff -aur sni-qt-eplus/src/iconcache.cpp sni-qt-eplus.new/src/iconcache.cpp
+--- sni-qt-eplus/src/iconcache.cpp 2015-07-27 21:17:58.198767000 +0200
++++ sni-qt-eplus.new/src/iconcache.cpp 2015-07-27 21:28:53.232267894 +0200
+@@ -145,7 +145,19 @@
+
+ QDir dir(m_themePath);
+ Q_FOREACH(const QSize& size, sizes) {
+- QPixmap pix = icon.pixmap(size);
++ QPixmap pix;
++ QStringList parts = key.split("_");
++ QString homedirname = QDir::homePath();
++ QString injectionIconFilename = QString(homedirname + "/.local/share/sni-qt/icons/%1/%2.png").arg(parts[0], parts[2]);
++ QString injectionIconFilename2 = QString(homedirname + "/.local/share/sni-qt/icons/%1.png").arg(parts[2]);
++
++ if (QFile::exists(injectionIconFilename))
++ pix = QPixmap(injectionIconFilename);
++ else if (QFile::exists(injectionIconFilename2))
++ pix = QPixmap(injectionIconFilename2);
++ else
++ pix = icon.pixmap(size);
++
+ QString dirName = QString("hicolor/%1x%1/apps").arg(size.width());
+ if (!dir.exists(dirName)) {
+ if (!dir.mkpath(dirName)) {