aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2014-09-08 09:03:49 -0400
committerKen Moore <ken@pcbsd.org>2014-09-08 09:03:49 -0400
commit21aa0ca897cfa714f28a3d4f6a302dc5b582f2a1 (patch)
tree01dd6abf25a4413ff00b42743d141723f2dc84a2
parentIgnore key press events if both the Qt and the detected X key codes are 0 (un... (diff)
parentMerge pull request #2 from Nanolx/master (diff)
downloadlumina-21aa0ca897cfa714f28a3d4f6a302dc5b582f2a1.tar.gz
lumina-21aa0ca897cfa714f28a3d4f6a302dc5b582f2a1.tar.bz2
lumina-21aa0ca897cfa714f28a3d4f6a302dc5b582f2a1.zip
Merge branch 'master' of github.com:pcbsd/lumina
-rw-r--r--DEPENDENCIES70
-rw-r--r--debian/changelog5
-rw-r--r--debian/compat1
-rw-r--r--debian/control76
-rw-r--r--debian/copyright36
-rw-r--r--debian/docs1
-rw-r--r--debian/libluminautils-dev.install2
-rw-r--r--debian/libluminautils1.install1
-rw-r--r--debian/lumina-config.install1
-rw-r--r--debian/lumina-core.install5
-rw-r--r--debian/lumina-fm.install3
-rw-r--r--debian/lumina-open.install1
-rw-r--r--debian/lumina-screenshot.install2
-rw-r--r--debian/patches/01-change-prefix.diff227
-rw-r--r--debian/patches/02-fix-compilation-non-amd64.diff52
-rw-r--r--debian/patches/series2
-rwxr-xr-xdebian/rules22
-rw-r--r--debian/source/format1
-rw-r--r--libLumina/LuminaOS-Linux.cpp94
-rw-r--r--libLumina/LuminaOS-template.cpp87
-rw-r--r--libLumina/libLumina.pro1
21 files changed, 661 insertions, 29 deletions
diff --git a/DEPENDENCIES b/DEPENDENCIES
index 540831ee..867b129a 100644
--- a/DEPENDENCIES
+++ b/DEPENDENCIES
@@ -1,33 +1,67 @@
-#List of known dependencies for the Lumina Desktop (and associated utilities)
-# FreeBSD port is listed in parentheses after the dependency whenever possible
+# List of known dependencies for the Lumina Desktop (and associated utilities)
+# FreeBSD port is listed in parentheses after the dependency whenever possible
+# Linux packages are listed by name as they appear in Debian, Ubuntu and Mint
+
+=== FreeBSD Requirements ===
+
+Runtime dependencies:
-=== RUNTIME ONLY ===
fluxbox (x11-wm/fluxbox)
fluxbox styles pack? (x11-themes/fluxbox-tenr-styles-pack)
oxygen icon theme (x11-themes/kde4-icons-oxygen)
xscreensaver & xscreensaver-demo (x11/xscreensaver)
numlockx (x11/numlockx)
- == FreeBSD (libLumina/LuminaOS-FreeBSD.cpp) ==
- shutdown (/sbin/shutdown - built in) (System restart/poweroff)
- mount (/sbin/mount - built in) (Device Availability)
- apm (/usr/sbin/apm - built in) (Advanced Power Management utility)
- mixer (/usr/sbin/mixer - built in) (Audio System Mixer)
- xbrightness (x11/xbrightness) (Screen Brightness Control)
+shutdown (/sbin/shutdown - built in) (System restart/poweroff)
+mount (/sbin/mount - built in) (Device Availability)
+apm (/usr/sbin/apm - built in) (Advanced Power Management utility)
+mixer (/usr/sbin/mixer - built in) (Audio System Mixer)
+xbrightness (x11/xbrightness) (Screen Brightness Control)
+
+
+Build time dependencies:
+Qt 4.8+
+ qt4-core (devel/qt4-corelib))
+ qt4-gui (x11-toolkits/qt4-gui)
+ qmake-qt4 (devel/qmake4)
+ qt4-network (net/qt4-network)
+ qt4-linguist (devel/qt4-linguist)
+ qt4-svg (graphics/qt4-svg)
+ qt4-uiv (devel/qt4-uic)
+ qt4-moc (devel/qt4-moc)
+ qt4-rcc (devel/qt4-rcc)
+ devel/qt4-qtsolutions-singleapplication
- == Linux ==
- (Debian/Ubuntu/Mint packages required)
+X.org and XLib with extensions:
+ Xrender (x11/libXrender)
+ Xcomposite (x11/libXcomposite)
+ Xdamage (x11/libXdamage)
+
+
+
+=== Linux Requirements ===
+ These packages are required for building Lumina on Linux
+ g++ (or clang, either compiler should work)
qt4-qmake
libqt4-core
+ libqt4-dev
+ libqt4-dev-bin
libqt4-gui
libqt4-network
libqt4-svg
+ libphonon-dev
libxcomposite-dev
+ libxdamage-dev
+ libxrender-dev
+
+ These packages are required for running Lumina on Linux
+ fluxbox
+ kde-style-oxygen
+ xscreensaver
-=== BUILD & RUN ===
-Qt 4.8+ (modules: core, gui, network, linguist, svg)
- also includes: (qt4-qmake, qt4-uic, qt4-moc, qt4-rcc)
- + devel/qt4-qtsolutions-singleapplication
-
-X.org and XLib
- With extensions: Xrender, Xcomposite, Xdamage
+ Optional packages
+ xbacklight (required for changing screen brightness)
+ alsa-utils (required for adjusting audio volume)
+ acpi (required for monitoring battery life)
+ numlockx (required for changign state of numlock at login)
+ pavucontrol (required for detatched audio mixer)
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 00000000..f54fa6fe
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+lumina-desktop (0.6.2.14-1nano) unstable; urgency=low
+
+ * Initial release
+
+ -- Christopher Roy Bratusek <nano@jpberlin.de> Sat, 06 Sep 2014 21:20:33 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 00000000..ec635144
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 00000000..d2e82a9b
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,76 @@
+Source: lumina-desktop
+Section: x11
+Priority: optional
+Maintainer: Christopher Roy Bratusek <nano@jpberlin.de>
+Build-Depends: debhelper (>= 9), qt4-qmake, libqt4-dev, make, g++, libphonon-dev, libx11-dev,
+ libxrender-dev, libxcomposite-dev, libxdamage-dev
+Standards-Version: 3.9.5
+Homepage: https://github.com/pcbsd/lumina
+
+Package: lumina-desktop
+Architecture: all
+Depends: libluminautils1, lumina-core, lumina-config, lumina-fm,
+ lumina-open, lumina-screenshot
+Description: Lightweight Qt4-based desktop environment
+ Metapackage depending on all other lumina packages.
+
+Package: libluminautils1
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: Library for the lumina desktop environment
+ Utility library for the lumina desktop environment
+
+Package: libluminautils-dev
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, libluminautils1 (= ${binary:Version})
+Description: Development files for lumina desktop environment
+ Files needed to develop plugins or extensions for the lumina desktop environment,
+ or using libluminautils1 in projects.
+
+Package: libluminautils-dbg
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, libluminautils-dev (= ${binary:Version})
+Description: Debugging symbols for lumina desktop environment
+ Debugging symbols for libluminautils1
+
+Package: lumina-core
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, libluminautils1 (= ${binary:Version}),
+ fluxbox, numlockx, xbacklight, xscreensaver, oxygen-icon-theme
+Description: Core package for the lumina desktop environment
+ This package provides the basic components of lumina
+ - session manager
+ - panel with plugins
+ - wallpaper setter
+ - fluxbox configurator
+ - desktop icon manager and menu
+ - wallpapers
+
+Package: lumina-config
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, libluminautils1 (= ${binary:Version})
+Description: Configuration utility for the lumina desktop environment
+ lumina-config allows to change various aspects of lumina and fluxbox, like the
+ wallpaper beeing used, startup-applications, desktop-menu and more.
+
+Package: lumina-fm
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, libluminautils1 (= ${binary:Version})
+Description: Filemanager for the lumina desktop environment
+ Simple filemanager for lumina with support for multiple view modes and
+ integrated slideshow-based picture viewer.
+
+Package: lumina-open
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, libluminautils1 (= ${binary:Version})
+Description: xdg-open like utilityfor the lumina desktop environment
+ lumina-open handles opening of files and urls according to the system wide
+ mime type association. It also provides an optional selector if more than one
+ application is assigned with the given url or file type.
+
+Package: lumina-screenshot
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, libluminautils1 (= ${binary:Version})
+Description: Screenshot utility for the lumina desktop environment
+ Simple screenshot utility that allows to snapshot the whole desktop or a single
+ window after a configurable delay.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 00000000..d4c686c2
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,36 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: lumina-desktop
+Source: https://github.com/pcbsd/lumina
+
+Files: *
+Copyright: 2012-2014, Ken Moore (moorekou@gmail.com)
+License: BSD-3-Clause
+
+Files: debian/*
+Copyright: 2014 Christopher Roy Bratusek <nano@jpberlin.de>
+License: BSD-3-Clause
+
+License: BSD-3-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HOLDERS OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 00000000..b43bf86b
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README.md
diff --git a/debian/libluminautils-dev.install b/debian/libluminautils-dev.install
new file mode 100644
index 00000000..b205e6c3
--- /dev/null
+++ b/debian/libluminautils-dev.install
@@ -0,0 +1,2 @@
+usr/lib/libLuminaUtils.so
+usr/include/*.h
diff --git a/debian/libluminautils1.install b/debian/libluminautils1.install
new file mode 100644
index 00000000..e6d42ae9
--- /dev/null
+++ b/debian/libluminautils1.install
@@ -0,0 +1 @@
+usr/lib/libLuminaUtils.so.*
diff --git a/debian/lumina-config.install b/debian/lumina-config.install
new file mode 100644
index 00000000..4ed57486
--- /dev/null
+++ b/debian/lumina-config.install
@@ -0,0 +1 @@
+usr/bin/lumina-config
diff --git a/debian/lumina-core.install b/debian/lumina-core.install
new file mode 100644
index 00000000..093cee7f
--- /dev/null
+++ b/debian/lumina-core.install
@@ -0,0 +1,5 @@
+usr/bin/Lumina-DE
+usr/share/pixmaps/Lumina-DE.png
+usr/share/Lumina-DE/
+usr/share/wallpapers/Lumina-DE/
+usr/share/xsessions/Lumina-DE.desktop
diff --git a/debian/lumina-fm.install b/debian/lumina-fm.install
new file mode 100644
index 00000000..b0e21dbd
--- /dev/null
+++ b/debian/lumina-fm.install
@@ -0,0 +1,3 @@
+usr/bin/lumina-fm
+usr/share/pixmaps/Insight-FileManager.png
+usr/share/applications/lumina-fm.desktop
diff --git a/debian/lumina-open.install b/debian/lumina-open.install
new file mode 100644
index 00000000..401cd57a
--- /dev/null
+++ b/debian/lumina-open.install
@@ -0,0 +1 @@
+usr/bin/lumina-open
diff --git a/debian/lumina-screenshot.install b/debian/lumina-screenshot.install
new file mode 100644
index 00000000..2b426b55
--- /dev/null
+++ b/debian/lumina-screenshot.install
@@ -0,0 +1,2 @@
+usr/bin/lumina-screenshot
+usr/share/applications/lumina-screenshot.desktop
diff --git a/debian/patches/01-change-prefix.diff b/debian/patches/01-change-prefix.diff
new file mode 100644
index 00000000..8a610ab0
--- /dev/null
+++ b/debian/patches/01-change-prefix.diff
@@ -0,0 +1,227 @@
+Description: Change the prefix from /usr/local to /usr
+ Change installation prefix to /usr
+ .
+ lumina-desktop (0.6.2.14-1nano) unstable; urgency=low
+ .
+ * Initial release
+Author: Christopher Roy Bratusek <nano@jpberlin.de>
+
+--- lumina-desktop-0.6.2.14.orig/libLumina/libLumina.pro
++++ lumina-desktop-0.6.2.14/libLumina/libLumina.pro
+@@ -2,7 +2,7 @@
+ QT += core
+
+ TARGET=LuminaUtils
+-target.path = /usr/local/lib
++target.path = /usr/lib
+
+ DESTDIR= $$_PRO_FILE_PWD_/
+
+@@ -21,11 +21,11 @@ SOURCES += LuminaXDG.cpp \
+ LuminaOS-FreeBSD.cpp \
+ LuminaOS-Linux.cpp
+
+-INCLUDEPATH += /usr/local/include
++INCLUDEPATH += /usr/include
+
+ LIBS += -lX11 -lXrender -lXcomposite
+
+-include.path=/usr/local/include/
++include.path=/usr/include/
+ include.files=LuminaXDG.h \
+ LuminaUtils.h \
+ LuminaX11.h \
+@@ -33,4 +33,4 @@ include.files=LuminaXDG.h \
+
+ INSTALLS += target include
+
+-QMAKE_LIBDIR = /usr/local/lib/qt4 /usr/local/lib
++QMAKE_LIBDIR = /usr/lib/qt4 /usr/lib
+--- lumina-desktop-0.6.2.14.orig/lumina-config/lumina-config.pro
++++ lumina-desktop-0.6.2.14/lumina-config/lumina-config.pro
+@@ -2,7 +2,7 @@
+ QT += core gui
+
+ TARGET = lumina-config
+-target.path = /usr/local/bin
++target.path = /usr/bin
+
+ TEMPLATE = app
+
+@@ -20,7 +20,7 @@ FORMS += mainUI.ui \
+
+ # RESOURCES+= lumina-config.qrc
+
+-INCLUDEPATH += ../libLumina /usr/local/include
++INCLUDEPATH += ../libLumina /usr/include
+
+ linux-g++-64 {
+ LIBS += -L../libLumina -lLuminaUtils
+@@ -93,7 +93,7 @@ TRANSLATIONS = i18n/lumina-config_af.ts
+ i18n/lumina-config_zh_TW.ts \
+ i18n/lumina-config_zu.ts
+
+-dotrans.path=/usr/local/share/Lumina-DE/i18n/
+-dotrans.extra=cd i18n && lrelease-qt4 -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/local/share/Lumina-DE/i18n/
++dotrans.path=/usr/share/Lumina-DE/i18n/
++dotrans.extra=cd i18n && lrelease-qt4 -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/share/Lumina-DE/i18n/
+
+ INSTALLS += target dotrans
+--- lumina-desktop-0.6.2.14.orig/lumina-desktop/lumina-desktop.pro
++++ lumina-desktop-0.6.2.14/lumina-desktop/lumina-desktop.pro
+@@ -2,7 +2,7 @@
+ QT += core gui network phonon
+
+ TARGET = Lumina-DE
+-target.path = /usr/local/bin
++target.path = /usr/bin
+
+ LIBS += -L../libLumina -lLuminaUtils -lXdamage -lX11
+ QMAKE_LIBDIR = ../libLumina
+@@ -78,25 +78,25 @@ FORMS += SystemWindow.ui \
+
+ RESOURCES+= Lumina-DE.qrc
+
+-INCLUDEPATH += ../libLumina /usr/local/include
++INCLUDEPATH += ../libLumina /usr/include
+
+ desktop.files = Lumina-DE.desktop
+ linux-g++-64 {
+ desktop.path = /usr/share/xsessions
+ } else {
+-desktop.path = /usr/local/share/xsessions
++desktop.path = /usr/share/xsessions
+ }
+
+ icons.files = Lumina-DE.png \
+ Insight-FileManager.png
+
+-icons.path = /usr/local/share/pixmaps
++icons.path = /usr/share/pixmaps
+
+ wallpapers.files = wallpapers/Lumina_Wispy_gold_1920x1080.jpg \
+ wallpapers/Lumina_Wispy_green_1920x1080.jpg \
+ wallpapers/Lumina_Wispy_purple_1920x1080.jpg \
+ wallpapers/Lumina_Wispy_red_1920x1080.jpg
+-wallpapers.path = /usr/local/share/wallpapers/Lumina-DE
++wallpapers.path = /usr/share/wallpapers/Lumina-DE
+
+ defaults.files = defaults/desktop-background.jpg \
+ defaults/defaultapps.conf \
+@@ -104,7 +104,7 @@ defaults.files = defaults/desktop-backgr
+ defaults/stylesheet.qss \
+ audiofiles/Logout.ogg \
+ audiofiles/Login.ogg
+-defaults.path = /usr/local/share/Lumina-DE/
++defaults.path = /usr/share/Lumina-DE/
+
+ TRANSLATIONS = i18n/lumina-desktop_af.ts \
+ i18n/lumina-desktop_ar.ts \
+@@ -169,7 +169,7 @@ TRANSLATIONS = i18n/lumina-desktop_af.t
+ i18n/lumina-desktop_zh_TW.ts \
+ i18n/lumina-desktop_zu.ts
+
+-dotrans.path=/usr/local/share/Lumina-DE/i18n/
+-dotrans.extra=cd i18n && lrelease-qt4 -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/local/share/Lumina-DE/i18n/
++dotrans.path=/usr/share/Lumina-DE/i18n/
++dotrans.extra=cd i18n && lrelease-qt4 -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/share/Lumina-DE/i18n/
+
+ INSTALLS += target desktop icons wallpapers defaults dotrans
+--- lumina-desktop-0.6.2.14.orig/lumina-fm/lumina-fm.pro
++++ lumina-desktop-0.6.2.14/lumina-fm/lumina-fm.pro
+@@ -2,7 +2,7 @@
+ QT += core gui phonon
+
+ TARGET = lumina-fm
+-target.path = /usr/local/bin
++target.path = /usr/bin
+
+ TEMPLATE = app
+
+@@ -22,7 +22,7 @@ FORMS += MainUI.ui \
+
+ # RESOURCES+= lumina-fm.qrc
+
+-INCLUDEPATH += ../libLumina /usr/local/include
++INCLUDEPATH += ../libLumina /usr/include
+
+ linux-g++-64 {
+ LIBS += -L../libLumina -lLuminaUtils
+@@ -95,10 +95,10 @@ TRANSLATIONS = i18n/lumina-fm_af.ts \
+ i18n/lumina-fm_zh_TW.ts \
+ i18n/lumina-fm_zu.ts
+
+-dotrans.path=/usr/local/share/Lumina-DE/i18n/
+-dotrans.extra=cd i18n && lrelease-qt4 -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/local/share/Lumina-DE/i18n/
++dotrans.path=/usr/share/Lumina-DE/i18n/
++dotrans.extra=cd i18n && lrelease-qt4 -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/share/Lumina-DE/i18n/
+
+ desktop.files=lumina-fm.desktop
+-desktop.path=/usr/local/share/applications/
++desktop.path=/usr/share/applications/
+
+ INSTALLS += target dotrans desktop
+--- lumina-desktop-0.6.2.14.orig/lumina-open/lumina-open.pro
++++ lumina-desktop-0.6.2.14/lumina-open/lumina-open.pro
+@@ -2,7 +2,7 @@
+ QT += core gui
+
+ TARGET = lumina-open
+-target.path = /usr/local/bin
++target.path = /usr/bin
+
+ TEMPLATE = app
+
+@@ -15,7 +15,7 @@ FORMS += LFileDialog.ui
+
+ RESOURCES+= lumina-open.qrc
+
+-INCLUDEPATH += ../libLumina /usr/local/include
++INCLUDEPATH += ../libLumina /usr/include
+ LIBS += -L../libLumina -lLuminaUtils
+ QMAKE_LIBDIR = ../libLumina
+ DEPENDPATH += ../libLumina
+@@ -83,7 +83,7 @@ TRANSLATIONS = i18n/lumina-open_af.ts \
+ i18n/lumina-open_zh_TW.ts \
+ i18n/lumina-open_zu.ts
+
+-dotrans.path=/usr/local/share/Lumina-DE/i18n/
+-dotrans.extra=cd i18n && lrelease-qt4 -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/local/share/Lumina-DE/i18n/
++dotrans.path=/usr/share/Lumina-DE/i18n/
++dotrans.extra=cd i18n && lrelease-qt4 -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/share/Lumina-DE/i18n/
+
+ INSTALLS += target dotrans
+--- lumina-desktop-0.6.2.14.orig/lumina-screenshot/lumina-screenshot.pro
++++ lumina-desktop-0.6.2.14/lumina-screenshot/lumina-screenshot.pro
+@@ -2,7 +2,7 @@
+ QT += core gui
+
+ TARGET = lumina-screenshot
+-target.path = /usr/local/bin
++target.path = /usr/bin
+
+ TEMPLATE = app
+
+@@ -13,7 +13,7 @@ HEADERS += MainUI.h
+
+ FORMS += MainUI.ui
+
+-INCLUDEPATH += ../libLumina /usr/local/include
++INCLUDEPATH += ../libLumina /usr/include
+
+ linux-g++-64 {
+ LIBS += -L../libLumina -lLuminaUtils
+@@ -86,10 +86,10 @@ TRANSLATIONS = i18n/lumina-screenshot_a
+ i18n/lumina-screenshot_zh_TW.ts \
+ i18n/lumina-screenshot_zu.ts
+
+-dotrans.path=/usr/local/share/Lumina-DE/i18n/
+-dotrans.extra=cd i18n && lrelease-qt4 -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/local/share/Lumina-DE/i18n/
++dotrans.path=/usr/share/Lumina-DE/i18n/
++dotrans.extra=cd i18n && lrelease-qt4 -nounfinished *.ts && cp *.qm $(INSTALL_ROOT)/usr/share/Lumina-DE/i18n/
+
+ desktop.files=lumina-screenshot.desktop
+-desktop.path=/usr/local/share/applications/
++desktop.path=/usr/share/applications/
+
+ INSTALLS += target dotrans desktop
diff --git a/debian/patches/02-fix-compilation-non-amd64.diff b/debian/patches/02-fix-compilation-non-amd64.diff
new file mode 100644
index 00000000..401ec1b7
--- /dev/null
+++ b/debian/patches/02-fix-compilation-non-amd64.diff
@@ -0,0 +1,52 @@
+Description: Fix compilation on architectures other than amd64
+ don't link against libQtSolutions_SingleApplication-head on amd64/i386 and others.
+ .
+ lumina-desktop (0.6.2.14-1nano) unstable; urgency=low
+ .
+ * Initial release
+Author: Christopher Roy Bratusek <nano@jpberlin.de>
+
+--- lumina-desktop-0.6.2.14.orig/lumina-config/lumina-config.pro
++++ lumina-desktop-0.6.2.14/lumina-config/lumina-config.pro
+@@ -22,7 +22,7 @@ FORMS += mainUI.ui \
+
+ INCLUDEPATH += ../libLumina /usr/include
+
+-linux-g++-64 {
++linux-g++* {
+ LIBS += -L../libLumina -lLuminaUtils
+ } else {
+ LIBS += -L../libLumina -lLuminaUtils -lQtSolutions_SingleApplication-head
+--- lumina-desktop-0.6.2.14.orig/lumina-desktop/lumina-desktop.pro
++++ lumina-desktop-0.6.2.14/lumina-desktop/lumina-desktop.pro
+@@ -81,7 +81,7 @@ RESOURCES+= Lumina-DE.qrc
+ INCLUDEPATH += ../libLumina /usr/include
+
+ desktop.files = Lumina-DE.desktop
+-linux-g++-64 {
++linux-g++* {
+ desktop.path = /usr/share/xsessions
+ } else {
+ desktop.path = /usr/share/xsessions
+--- lumina-desktop-0.6.2.14.orig/lumina-fm/lumina-fm.pro
++++ lumina-desktop-0.6.2.14/lumina-fm/lumina-fm.pro
+@@ -24,7 +24,7 @@ FORMS += MainUI.ui \
+
+ INCLUDEPATH += ../libLumina /usr/include
+
+-linux-g++-64 {
++linux-g++* {
+ LIBS += -L../libLumina -lLuminaUtils
+ } else {
+ LIBS += -L../libLumina -lLuminaUtils -lQtSolutions_SingleApplication-head
+--- lumina-desktop-0.6.2.14.orig/lumina-screenshot/lumina-screenshot.pro
++++ lumina-desktop-0.6.2.14/lumina-screenshot/lumina-screenshot.pro
+@@ -15,7 +15,7 @@ FORMS += MainUI.ui
+
+ INCLUDEPATH += ../libLumina /usr/include
+
+-linux-g++-64 {
++linux-g++* {
+ LIBS += -L../libLumina -lLuminaUtils
+ } else {
+ LIBS += -L../libLumina -lLuminaUtils -lQtSolutions_SingleApplication-head
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 00000000..1ba24f47
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+01-change-prefix.diff
+02-fix-compilation-non-amd64.diff
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 00000000..8d0192e4
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,22 @@
+#!/usr/bin/make -f
+DH_VERBOSE = 1
+
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/default.mk
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+%:
+ dh $@
+
+override_dh_auto_clean:
+ -$(MAKE) distclean
+ -find $(CURDIR) -name *.qm | xargs rm
+
+override_dh_strip:
+ dh_strip -a --dbg-package=libluminautils-dbg
+
+override_dh_auto_install:
+ INSTALL_ROOT=$(CURDIR)/debian/tmp/ $(MAKE) install
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 00000000..163aaf8d
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/libLumina/LuminaOS-Linux.cpp b/libLumina/LuminaOS-Linux.cpp
index 9d891461..60fb35fe 100644
--- a/libLumina/LuminaOS-Linux.cpp
+++ b/libLumina/LuminaOS-Linux.cpp
@@ -5,10 +5,14 @@
// See the LICENSE file for full details
//===========================================
#ifdef __linux__
+#include <QDebug>
#include "LuminaOS.h"
#include <unistd.h>
#include <stdio.h> // Needed for BUFSIZ
+//can't read xbrightness settings - assume invalid until set
+static int screenbrightness = -1;
+
// ==== ExternalDevicePaths() ====
QStringList LOS::ExternalDevicePaths(){
//Returns: QStringList[<type>::::<filesystem>::::<path>]
@@ -20,38 +24,85 @@ QStringList LOS::ExternalDevicePaths(){
//Read screen brightness information
int LOS::ScreenBrightness(){
- //Returns: Screen Brightness as a percentage (0-100, with -1 for errors)
- return -1; //not implemented yet for Linux
+ //Returns: Screen Brightness as a percentage (0-100, with -1 for errors)
+ if(screenbrightness==-1){
+ if(QFile::exists("/tmp/.lumina-currentxbrightness")){
+ int val = LUtils::readFile("/tmp/.lumina-currentxbrightness").join("").simplified().toInt();
+ screenbrightness = val;
+ }
+ }
+ return screenbrightness;
+
}
//Set screen brightness
void LOS::setScreenBrightness(int percent){
- //not implemented yet for Linux
+ //ensure bounds
+ if(percent<0){percent=0;}
+ else if(percent>100){ percent=100; }
+ // float pf = percent/100.0; //convert to a decimel
+ //Run the command
+ QString cmd = "xbacklight -set %1";
+ // cmd = cmd.arg( QString::number( int(65535*pf) ) );
+ cmd = cmd.arg( QString::number( percent ) );
+ int ret = LUtils::runCmd(cmd);
+ //Save the result for later
+ if(ret!=0){ screenbrightness = -1; }
+ else{ screenbrightness = percent; }
+ LUtils::writeFile("/tmp/.lumina-currentxbrightness", QStringList() << QString::number(screenbrightness), true);
+
}
//Read the current volume
int LOS::audioVolume(){ //Returns: audio volume as a percentage (0-100, with -1 for errors)
- return -1; //Not implemented yet for Linux
+QString info = LUtils::getCmdOutput("amixer get Master").join("").simplified();;
+ int out = -1;
+ int start_position, end_position;
+ QString current_volume;
+ if(!info.isEmpty()){
+ start_position = info.indexOf("[");
+ start_position++;
+ end_position = info.indexOf("%");
+ current_volume = info.mid(start_position, end_position - start_position);
+ out = current_volume.toInt();
+ }
+ return out;
+
+
}
//Set the current volume
void LOS::setAudioVolume(int percent){
- //not implemented yet for Linux
+ if(percent<0){percent=0;}
+ else if(percent>100){percent=100;}
+ QString info = "amixer -c 0 sset Master,0 " + QString::number(percent) + "%";
+ if(!info.isEmpty()){
+ //Run Command
+ LUtils::runCmd(info);
+ }
+
}
//Change the current volume a set amount (+ or -)
void LOS::changeAudioVolume(int percentdiff){
- //not implemented yet for Linux
+ int old_volume = audioVolume();
+ int new_volume = old_volume + percentdiff;
+ if (new_volume < 0)
+ new_volume = 0;
+ if (new_volume > 100)
+ new_volume = 100;
+ qDebug() << "Setting new volume to: " << new_volume;
+ setAudioVolume(new_volume);
}
//Check if a graphical audio mixer is installed
bool LOS::hasMixerUtility(){
- return false; //not implemented yet for Linux
+ return QFile::exists("/usr/bin/pavucontrol");
}
//Launch the graphical audio mixer utility
void LOS::startMixerUtility(){
- //not implemented yet for Linux
+ QProcess::startDetached("/usr/bin/pavucontrol");
}
//System Shutdown
@@ -66,17 +117,38 @@ void LOS::systemRestart(){ //start reboot sequence
//Battery Availability
bool LOS::hasBattery(){
- return false; //not implemented yet for Linux
+ QString my_status = LUtils::getCmdOutput("acpi -b").join("");
+ bool no_battery = my_status.contains("No support");
+ if (no_battery) return false;
+ return true;
}
//Battery Charge Level
int LOS::batteryCharge(){ //Returns: percent charge (0-100), anything outside that range is counted as an error
- return -1; //not implemented yet for Linux
+ QString my_status = LUtils::getCmdOutput("acpi -b").join("");
+ int my_start = my_status.indexOf("%");
+ // get the number right before the % sign
+ int my_end = my_start;
+ my_start--;
+ while ( (my_status[my_start] != ' ') && (my_start > 0) )
+ my_start--;
+ my_start++;
+ int my_charge = my_status.mid(my_start, my_end - my_start).toInt();
+ if ( (my_charge < 0) || (my_charge > 100) ) return -1;
+ return my_charge;
}
//Battery Charging State
+// Many possible values are returned if the laptop is plugged in
+// these include "Unknown, Full and No support.
+// However, it seems just one status is returned when running
+// on battery and that is "Discharging". So if the value we get
+// is NOT Discharging then we assume the batter yis charging.
bool LOS::batteryIsCharging(){
- return false; //not implemented yet for Linux
+ QString my_status = LUtils::getCmdOutput("acpi -b").join("");
+ bool discharging = my_status.contains("Discharging");
+ if (discharging) return false;
+ return true;
}
//Battery Time Remaining
diff --git a/libLumina/LuminaOS-template.cpp b/libLumina/LuminaOS-template.cpp
new file mode 100644
index 00000000..be70e1a5
--- /dev/null
+++ b/libLumina/LuminaOS-template.cpp
@@ -0,0 +1,87 @@
+//===========================================
+// Lumina-DE source code
+// Copyright (c) 2014, Ken Moore
+// Available under the 3-clause BSD license
+// See the LICENSE file for full details
+//===========================================
+#ifdef __OSNAME__
+#include "LuminaOS.h"
+#include <unistd.h>
+#include <stdio.h> // Needed for BUFSIZ
+
+// ==== ExternalDevicePaths() ====
+QStringList LOS::ExternalDevicePaths(){
+ //Returns: QStringList[<type>::::<filesystem>::::<path>]
+ //Note: <type> = [USB, HDRIVE, DVD, SDCARD, UNKNOWN]
+
+ //Not implemented yet for Linux
+ return QStringList();
+}
+
+//Read screen brightness information
+int LOS::ScreenBrightness(){
+ //Returns: Screen Brightness as a percentage (0-100, with -1 for errors)
+ return -1; //not implemented yet for Linux
+}
+
+//Set screen brightness
+void LOS::setScreenBrightness(int percent){
+ //not implemented yet for Linux
+}
+
+//Read the current volume
+int LOS::audioVolume(){ //Returns: audio volume as a percentage (0-100, with -1 for errors)
+ return -1; //Not implemented yet for Linux
+}
+
+//Set the current volume
+void LOS::setAudioVolume(int percent){
+ //not implemented yet for Linux
+}
+
+//Change the current volume a set amount (+ or -)
+void LOS::changeAudioVolume(int percentdiff){
+ //not implemented yet for Linux
+}
+
+//Check if a graphical audio mixer is installed
+bool LOS::hasMixerUtility(){
+ return false; //not implemented yet for Linux
+}
+
+//Launch the graphical audio mixer utility
+void LOS::startMixerUtility(){
+ //not implemented yet for Linux
+}
+
+//System Shutdown
+void LOS::systemShutdown(){ //start poweroff sequence
+ QProcess::startDetached("shutdown -h now");
+}
+
+//System Restart
+void LOS::systemRestart(){ //start reboot sequence
+ QProcess::startDetached("shutdown -r now");
+}
+
+//Battery Availability
+bool LOS::hasBattery(){
+ return false; //not implemented yet for Linux
+}
+
+//Battery Charge Level
+int LOS::batteryCharge(){ //Returns: percent charge (0-100), anything outside that range is counted as an error
+ return -1; //not implemented yet for Linux
+}
+
+//Battery Charging State
+bool LOS::batteryIsCharging(){
+ return false; //not implemented yet for Linux
+}
+
+//Battery Time Remaining
+int LOS::batterySecondsLeft(){ //Returns: estimated number of seconds remaining
+ return 0; //not implemented yet for Linux
+}
+
+#endif
diff --git a/libLumina/libLumina.pro b/libLumina/libLumina.pro
index fcf84980..9de16637 100644
--- a/libLumina/libLumina.pro
+++ b/libLumina/libLumina.pro
@@ -20,6 +20,7 @@ SOURCES += LuminaXDG.cpp \
LuminaX11.cpp \
LuminaOS-FreeBSD.cpp \
LuminaOS-Linux.cpp
+# new OS support can be added here
INCLUDEPATH += /usr/local/include
bgstack15