Skip to content

Commit

Permalink
Install emojis.json globally, add PKGBUILD file
Browse files Browse the repository at this point in the history
  • Loading branch information
alex1701c committed Sep 15, 2019
1 parent 0167e8d commit f74fc55
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
38 changes: 38 additions & 0 deletions PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Maintainer: Alex <alex1701c.dev[at]gmx.net>
pkgname=krunner-emojirunner
pkgver=1.1.3
pkgrel=1
pkgdesc="Select emojis and copy/paste them"
arch=("any")
url=https://github.com/alex1701c/EmojiRunner
license=(GLP3)
groups=()
depends=(krunner xdotool)
makedepends=(cmake extra-cmake-modules ki18n qt5-base qt5-tools)
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("https://github.com/alex1701c/EmojiRunner/archive/1.1.3.tar.gz")
noextract=()
md5sums=(8f5abe20749d0731454a43ea19614662)

prepare(){
cd "EmojiRunner-$pkgver"
mkdir -p build
}

build() {
cd "EmojiRunner-$pkgver/build"
cmake -DQT_PLUGIN_INSTALL_DIR=`kf5-config --qt-plugins` -DCMAKE_BUILD_TYPE=Release ..
make -j $(nproc)
}

package() {
cd "$srcdir/EmojiRunner-$pkgver/build"
sudo make install
}
4 changes: 1 addition & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,4 @@ add_dependencies(krunner_emojirunner kcm_krunner_emojirunner)

install(TARGETS krunner_emojirunner kcm_krunner_emojirunner DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES plasma-runner-emojirunner.desktop config/plasma-runner-emojirunner_config.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(FILES emojis.json DESTINATION $ENV{HOME}/.config/)
# Not necessary anymore
#install(FILES paste.py DESTINATION $ENV{HOME}/.local/share/emojirunner/)
install(FILES emojis.json DESTINATION /usr/share/emojirunner)
2 changes: 1 addition & 1 deletion src/FileReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ QList<EmojiCategory> FileReader::readJSONFile(bool getAllEmojis) {
QList<EmojiCategory> categories;
KConfigGroup config = KSharedConfig::openConfig("krunnerrc")->group("Runners").group("EmojiRunner");

QFile file(QDir::homePath() + "/.config/emojis.json");
QFile file("/usr/share/emojirunner/emojis.json");
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
const QString content = file.readAll();

Expand Down

0 comments on commit f74fc55

Please sign in to comment.