summaryrefslogtreecommitdiff
path: root/packaging/tizen-mobile-session.spec
blob: 8d4e50f1207cdafc8eed42385227f343fb3a1466 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
%bcond_with emulator
%bcond_with x
Name:       tizen-mobile-session
Summary:    Target for tizen systemd user session
Version:    2
Release:    2
Group:      System/Libraries
License:    Public Domain
Source0:    tizen-mobile-session.target
Source1:    tizen-middleware.target
Source4:    tizen-generate-env.service
Source5:    tizen-mobile-env.conf

Requires: systemd

%description
Target for tizen systemd user session

%install

mkdir -p %{buildroot}%{_libdir}/systemd/user/tizen-mobile-session.target.wants
mkdir -p %{buildroot}%{_libdir}/systemd/user/tizen-middleware.target.wants
mkdir -p %{buildroot}%{_libdir}/systemd/system/graphical.target.wants
mkdir -p %{buildroot}%{_libdir}/systemd/system/basic.target.wants
mkdir -p %{buildroot}%{_libdir}/systemd/system/user@.service.d
install -m 0644 %SOURCE0 %{buildroot}%{_libdir}/systemd/user/
install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/user/
install -m 0644 %SOURCE4 %{buildroot}%{_libdir}/systemd/system/
install -m 0644 %SOURCE5 %{buildroot}%{_libdir}/systemd/system/user@.service.d/

%if %{with x}
echo "Environment=DISPLAY=:0" >> %{buildroot}%{_libdir}/systemd/system/user@.service.d/tizen-mobile-env.conf
%endif

ln -sf ../user-session-launch@.service %{buildroot}%{_libdir}/systemd/system/graphical.target.wants/user-session-launch@seat0-5000.service
ln -sf tizen-mobile-session.target %{buildroot}%{_libdir}/systemd/user/default.target
ln -sf ../tizen-generate-env.service %{buildroot}%{_libdir}/systemd/system/basic.target.wants

mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
ln -sf /run/tizen-mobile-ui %{buildroot}%{_sysconfdir}/sysconfig/tizen-mobile-ui


%files
%config %{_sysconfdir}/sysconfig/tizen-mobile-ui
%{_libdir}/systemd/user/tizen-mobile-session.target
%{_libdir}/systemd/user/tizen-middleware.target
%{_libdir}/systemd/user/tizen-mobile-session.target.wants/
%{_libdir}/systemd/user/tizen-middleware.target.wants/
%{_libdir}/systemd/user/default.target
%{_libdir}/systemd/system/graphical.target.wants/user-session-launch@seat0-5000.service
%{_libdir}/systemd/system/tizen-generate-env.service
%{_libdir}/systemd/system/basic.target.wants/tizen-generate-env.service
%{_libdir}/systemd/system/user@.service.d/tizen-mobile-env.conf