forked from openwebos/luna-sysservice
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release luna-sysservice 2.0.0 to the public
Change-Id: I4d2059b9195b1af4db2c6ad334878beab8ce9622
- Loading branch information
Roger Stringer
committed
Aug 21, 2012
0 parents
commit 14bc206
Showing
73 changed files
with
15,826 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# @@@LICENSE | ||
# | ||
# Copyright (c) 2012 Hewlett-Packard Development Company, L.P. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# LICENSE@@@ | ||
|
||
# Common Eclipse project files | ||
.project | ||
.cproject | ||
|
||
# Ignore the build artifacts. | ||
BUILD*/ | ||
/build | ||
release-*/ | ||
debug-*/ | ||
patches/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
# @@@LICENSE | ||
# | ||
# Copyright (c) 2012 Hewlett-Packard Development Company, L.P. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# LICENSE@@@ | ||
|
||
cmake_minimum_required(VERSION 2.8.7) | ||
|
||
project(luna-sysservice CXX) | ||
|
||
include(webOS/webOS) | ||
webos_modules_init(1 0 0 QUALIFIER RC2) | ||
webos_component(2 0 0) | ||
|
||
include(FindPkgConfig) | ||
|
||
# -- check for glib 2.0 | ||
pkg_check_modules(GLIB2 REQUIRED glib-2.0) | ||
webos_add_compiler_flags(ALL ${GLIB2_CFLAGS}) | ||
|
||
# -- check for gthread 2.0 | ||
pkg_check_modules(GTHREAD2 REQUIRED gthread-2.0) | ||
webos_add_compiler_flags(ALL ${GTHREAD2_CFLAGS}) | ||
|
||
# -- check for libxml 2.0 | ||
pkg_check_modules(GXML2 REQUIRED libxml-2.0) | ||
webos_add_compiler_flags(ALL ${GXML2_CFLAGS}) | ||
|
||
# -- check for sqlite 3.0 | ||
pkg_check_modules(SQLITE3 REQUIRED sqlite3) | ||
webos_add_compiler_flags(ALL ${SQLITE3_CFLAGS}) | ||
|
||
# -- check for cjson | ||
pkg_check_modules(CJSON REQUIRED cjson) | ||
include_directories(CJSON_INCLUDE_DIRS) | ||
webos_add_compiler_flags(ALL ${CJSON_CFLAGS}) | ||
|
||
# -- check for mjson | ||
pkg_check_modules(MJSON REQUIRED mjson) | ||
include_directories(MJSON_INCLUDE_DIRS) | ||
webos_add_compiler_flags(ALL ${MJSON_CFLAGS}) | ||
|
||
# -- check for pbnjson | ||
pkg_check_modules(PBNJSON REQUIRED pbnjson) | ||
include_directories(PBNJSON_INCLUDE_DIRS) | ||
webos_add_compiler_flags(ALL ${PBNJSON_CFLAGS}) | ||
|
||
# -- check for LS2 (internally depends on pmloglib) | ||
pkg_check_modules(LS2 REQUIRED luna-service2) | ||
include_directories(LS2_INCLUDE_DIRS) | ||
webos_add_compiler_flags(ALL ${LS2_CFLAGS}) | ||
|
||
# -- check for QtCore | ||
# (e.g. /usr/local/Trolltech/QtLighthouse-4.8.0/lib/pkgconfig/QtCore.pc) | ||
pkg_check_modules(QTCORE REQUIRED QtCore) | ||
include_directories(QTCORE_INCLUDE_DIRS) | ||
webos_add_compiler_flags(ALL ${QTCORE_CFLAGS}) | ||
|
||
# -- check for QtGui | ||
# (e.g. /usr/local/Trolltech/QtLighthouse-4.8.0/lib/pkgconfig/QtGui.pc) | ||
pkg_check_modules(QTGUI REQUIRED QtGui) | ||
include_directories(QTGUI_INCLUDE_DIRS) | ||
webos_add_compiler_flags(ALL ${QTGUI_CFLAGS}) | ||
|
||
# -- check for uriparser | ||
pkg_check_modules(URIPARSER REQUIRED uriparser) | ||
include_directories(URIPARSER_INCLUDE_DIRS) | ||
webos_add_compiler_flags(ALL ${URIPARSER_CFLAGS}) | ||
|
||
webos_build_pkgconfig() | ||
webos_config_build_doxygen(doc Doxyfile) | ||
|
||
# -- no way to disable warn_unused_result right now. | ||
webos_add_compiler_flags(ALL -g -O3 -Wall -Wno-unused-but-set-variable -Wno-unused-variable -fno-exceptions -fno-rtti) | ||
webos_add_linker_options(ALL --no-undefined) | ||
|
||
# -- add local include paths | ||
include_directories(include/public) | ||
|
||
#file(GLOB SOURCE_FILES Src/*.cpp) | ||
file(GLOB SOURCE_FILES Src/Logging.cpp | ||
Src/LocalePrefsHandler.cpp | ||
Src/Main.cpp | ||
Src/PrefsDb.cpp | ||
Src/PrefsFactory.cpp | ||
Src/TimePrefsHandler.cpp | ||
Src/UrlRep.cpp | ||
Src/WallpaperPrefsHandler.cpp | ||
Src/BuildInfoHandler.cpp | ||
Src/Utils.cpp | ||
Src/SystemRestore.cpp | ||
Src/RingtonePrefsHandler.cpp | ||
Src/ImageServices.cpp | ||
Src/Mainloop.cpp | ||
Src/TimeZoneService.cpp | ||
Src/TzParser.cpp | ||
Src/BackupManager.cpp | ||
Src/Settings.cpp | ||
Src/NetworkConnectionListener.cpp | ||
Src/JSONUtils.cpp | ||
Src/ImageHelpers.cpp | ||
) | ||
add_executable(luna-sysservice ${SOURCE_FILES}) | ||
target_link_libraries(luna-sysservice | ||
${GLIB2_LDFLAGS} | ||
${GTHREAD2_LDFLAGS} | ||
${GXML2_LDFLAGS} | ||
${SQLITE3_LDFLAGS} | ||
${CJSON_LDFLAGS} | ||
${MJSON_LDFLAGS} | ||
-L/usr/local/lib;-lpbnjson_c | ||
-L/usr/local/lib;-lpbnjson_cpp | ||
${LS2_LDFLAGS} | ||
${QTCORE_LDFLAGS} | ||
${QTGUI_LDFLAGS} | ||
${URIPARSER_LDFLAGS} | ||
) | ||
|
||
|
||
webos_build_system_bus_files() | ||
webos_build_daemon() | ||
|
||
install(FILES files/conf/sysservice-backupkeys.json DESTINATION ${WEBOS_INSTALL_WEBOS_SYSCONFDIR}) | ||
install(FILES files/conf/sysservice.conf DESTINATION ${WEBOS_INSTALL_WEBOS_SYSCONFDIR}) | ||
install(FILES files/sysbus/com.palm.systemservice.backupRegistration.json DESTINATION ${WEBOS_INSTALL_WEBOS_SYSCONFDIR}/backup) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
start on started java-serviceboot | ||
start on started filecache | ||
|
||
# Stop when the Software Update tool is about to install an update. The tool | ||
# uses upstart to restart jobs when the installation is complete. | ||
stop on started start_update | ||
|
||
exec /usr/bin/LunaSysService | ||
respawn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Device makefile | ||
BUILD_TYPE := release | ||
PLATFORM := arm | ||
|
||
INCLUDES += \ | ||
-DHAVE_LUNA_PREFS=1 | ||
|
||
LIBS := -L$(LIB_DIR) -ljemalloc_mt -llunaservice -lpthread | ||
|
||
include Makefile.inc | ||
|
||
#install: | ||
# mkdir -p $(INSTALL_DIR)/usr/bin | ||
# install -m 0775 release-arm/LunaSysService $(INSTALL_DIR)/usr/bin/LunaSysService | ||
|
||
stage: | ||
echo "nothing to do" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
BUILD_TYPE := debug | ||
PLATFORM := x86 | ||
MACHINE := x86 | ||
LUNA_STAGING := $(HOME)/luna-desktop-binaries/staging | ||
|
||
NOVA_TOP_DIR_REL = ../ | ||
NOVA_TOP_DIR_ABS = $(shell cd $(NOVA_TOP_DIR_REL); pwd) | ||
|
||
INCLUDE_DIR := $(LUNA_STAGING)/include | ||
|
||
|
||
LIBS := -L$(LUNA_STAGING)/lib\ | ||
## -lmjson | ||
|
||
ARCH_CFLAGS := -DDESKTOP=1 | ||
|
||
include Makefile.inc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#bin_PROGRAMS = LunaSysService | ||
|
||
SUBDIRS = Src | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
MACHINE ?= "x86" | ||
OBJDIR := $(BUILD_TYPE)-$(MACHINE) | ||
|
||
# ------------------------------------------------------------------ | ||
|
||
SOURCES := \ | ||
Logging.cpp \ | ||
LocalePrefsHandler.cpp \ | ||
Main.cpp \ | ||
PrefsDb.cpp \ | ||
PrefsFactory.cpp \ | ||
TimePrefsHandler.cpp \ | ||
UrlRep.cpp \ | ||
WallpaperPrefsHandler.cpp \ | ||
BuildInfoHandler.cpp \ | ||
Utils.cpp \ | ||
SystemRestore.cpp \ | ||
RingtonePrefsHandler.cpp \ | ||
ImageServices.cpp \ | ||
Mainloop.cpp \ | ||
TimeZoneService.cpp \ | ||
TzParser.cpp \ | ||
BackupManager.cpp \ | ||
Settings.cpp \ | ||
NetworkConnectionListener.cpp \ | ||
JSONUtils.cpp \ | ||
ImageHelpers.cpp | ||
|
||
TARGET_OBJS := $(SOURCES:%.cpp=$(OBJDIR)/%.o) | ||
TARGET_OBJS += $(C_SOURCES:%.c=$(OBJDIR)/%.o) | ||
|
||
TARGET := $(OBJDIR)/LunaSysService | ||
|
||
# ------------------------------------------------------------------ | ||
|
||
ifeq ("$(BUILD_TYPE)", "debug") | ||
FLAGS_OPT := -O0 -g -fno-exceptions -fno-inline | ||
else | ||
FLAGS_OPT := -O2 -g -fno-exceptions -Wno-error | ||
endif | ||
|
||
FLAGS_OPT += -DMACHINE_$(MACHINE)=1 -DQT_PLUGIN | ||
INCLUDES := $(INCLUDES) \ | ||
-I./Src \ | ||
-isystem $(INCLUDE_DIR) \ | ||
-isystem $(INCLUDE_DIR)/QtCore \ | ||
-isystem $(INCLUDE_DIR)/QtGui \ | ||
`pkg-config --cflags glib-2.0 freetype2` | ||
|
||
LIBS := $(LIBS) \ | ||
-lglib-2.0 -llunaservice -lcjson -lsqlite3 -luriparser -lluna-prefs -lpbnjson_cpp -lQtCore -lQtGui | ||
|
||
LOCAL_CFLAGS := $(CFLAGS) -Wall -Werror $(FLAGS_OPT) $(ARCH_CFLAGS) | ||
|
||
LOCAL_LFLAGS := $(LDFLAGS) $(FLAGS_OPT) $(LIBS) | ||
|
||
# ------------------------------------------------------------------ | ||
|
||
all: setup $(TARGET_OBJS) $(TARGET) | ||
|
||
setup: | ||
@mkdir -p $(OBJDIR) | ||
|
||
vpath %.cpp Src | ||
vpath %.c Src | ||
|
||
$(TARGET): $(TARGET_OBJS) | ||
$(CXX) -o $(TARGET) $(TARGET_OBJS) $(LOCAL_LFLAGS) | ||
|
||
$(OBJDIR)/%.o: %.cpp | ||
$(CXX) -MMD $(INCLUDES) $(LOCAL_CFLAGS) -fno-rtti -c $< -o $@ | ||
|
||
$(OBJDIR)/%.o: %.c | ||
$(CC) -MMD $(INCLUDES) $(LOCAL_CFLAGS) -c $< -o $@ | ||
|
||
-include $(SOURCES:%.cpp=$(OBJDIR)/%.d) | ||
|
||
clean: | ||
rm -rf $(OBJDIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Summary | ||
======== | ||
The LunaSysService repository contains the system Service Component supporting luna-sysmgr. | ||
|
||
|
||
# Copyright and License Information | ||
|
||
All content, including all source code files and documentation files in this repository except otherwise noted are: | ||
|
||
Copyright (c) 2010-2012 Hewlett-Packard Development Company, L.P. | ||
|
||
All content, including all source code files and documentation files in this repository except otherwise noted are: | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this content except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
Oops, something went wrong.