summaryrefslogtreecommitdiffstats
path: root/KDE5_FUNCTIONS
diff options
context:
space:
mode:
authorTreeve Jelbert2015-04-25 15:41:10 +0200
committerTreeve Jelbert2015-04-25 15:48:11 +0200
commitf6a8f8e7e5d2eb53d47b9469f893e16803d793d4 (patch)
tree57b677911d354bfdb062651fe33da7ff2bc8a4a2 /KDE5_FUNCTIONS
parentd4cc18d89954ecc1d1bfbc38c306cf335ed822c0 (diff)
improve cmake builds, allow choice of prefix
prepare for kde5 frameworks/plasma/apps
Diffstat (limited to 'KDE5_FUNCTIONS')
-rwxr-xr-xKDE5_FUNCTIONS40
1 files changed, 40 insertions, 0 deletions
diff --git a/KDE5_FUNCTIONS b/KDE5_FUNCTIONS
new file mode 100755
index 0000000000..af5c72c667
--- /dev/null
+++ b/KDE5_FUNCTIONS
@@ -0,0 +1,40 @@
+export XDG_DATA_DIRS=$KF5DIR/share:/usr/share
+
+#---------------------------------------------------------------------
+function kde5_build() {
+ OPTS+=" -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=1 -Wno-dev $CM_TESTS"
+ qt5_cmake_build
+}
+
+
+default_build() {
+ kde5_build
+}
+
+#function default_install() {
+# cmake_install
+#}
+
+
+# we need a default_final, default_post_remove
+# so that the mime and desktop databases get updated
+update_databases() {
+local DD
+ DD=$KF5DIR
+# update-mime-database takes a long time, so only do it when needed
+ if is_depends_enabled $SPELL;then
+ update-mime-database $DD/share/mime/
+ fi
+ if [[ -e $DD/share/desktop-directories ]]; then
+ update-desktop-database $DD/share/desktop-directories
+ fi
+}
+
+default_final() {
+ update_databases
+}
+
+
+default_post_remove() {
+ update_databases
+}