SET(SYSTEMD_UNIT_DIR "${LIB_INSTALL_DIR}/systemd/system")
ENDIF(NOT DEFINED SYSTEMD_UNIT_DIR)
+IF(NOT DEFINED DATA_DIR)
+ SET(DATA_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}")
+ENDIF(NOT DEFINED DATA_DIR)
+
SET(VSM_CONFIG_INSTALL_DIR ${SYSCONF_INSTALL_DIR}/vasum)
SET(VSM_DATA_INSTALL_DIR ${SHARE_INSTALL_PREFIX}/vasum)
%{_unitdir}/vasum.service
%{_unitdir}/multi-user.target.wants/vasum.service
/etc/dbus-1/system.d/org.tizen.vasum.host.conf
+%dir %{_datadir}/.zones
%prep
%setup -q
-DCMAKE_BUILD_TYPE=%{build_type} \
-DSCRIPT_INSTALL_DIR=%{script_dir} \
-DSYSTEMD_UNIT_DIR=%{_unitdir} \
+ -DDATA_DIR=%{_datadir} \
-DPYTHON_SITELIB=%{python_sitelib} \
-DVASUM_USER=%{vsm_user} \
-DINPUT_EVENT_GROUP=%{input_event_group} \
%make_install
mkdir -p %{buildroot}/%{_unitdir}/multi-user.target.wants
ln -s ../vasum.service %{buildroot}/%{_unitdir}/multi-user.target.wants/vasum.service
+mkdir -p %{buildroot}/%{_datadir}/.zones
%clean
rm -rf %{buildroot}
## Install #####################################################################
-INSTALL(FILES daemon.conf
+CONFIGURE_FILE(daemon.conf.in
+ ${CMAKE_BINARY_DIR}/daemon.conf)
+
+INSTALL(FILES ${CMAKE_BINARY_DIR}/daemon.conf
DESTINATION ${VSM_CONFIG_INSTALL_DIR})
# preprocess d-bus configs
{
"zoneConfigs" : ["zones/private.conf", "zones/business.conf"],
- "zonesPath" : "/opt/usr/zones",
- "zoneImagePath" : "/opt/usr/zones/img/system-data.img",
+ "zonesPath" : "${DATA_DIR}/.zones",
+ "zoneImagePath" : "${DATA_DIR}/.zones/img/system-data.img",
"zoneTemplatePath" : "templates",
"zoneNewConfigPrefix" : "/var/lib/vasum",
"runMountPointPrefix" : "/var/run/zones",
[Service]
Type=simple
-ExecStart=${CMAKE_INSTALL_PREFIX}/bin/vasum-server
+ExecStart=${CMAKE_INSTALL_PREFIX}/bin/vasum-server -r
Restart=on-failure
ExecReload=/bin/kill -HUP $MAINPID