8bbb861cf3d1576d4ecb0a0ef1e2ea530d8a08b9
[adaptation/ap_samsung/xserver-xorg-misc-exynos.git] / packaging / xorg-x11-misc-exynos.spec
1 #sbs-git:slp/pkgs/xorg/driver/xserver-xorg-misc xserver-xorg-misc 0.0.1 13496ac354ad7f6709f1ef9b880a206a2df41c80
2
3 Name:   xorg-x11-misc-exynos
4 Summary:    X11 X server misc files for exynos
5 Version:    0.0.42
6 Release:    1
7 VCS:        magnolia/adaptation/ap_samsung/xserver-xorg-misc-exynos#xorg-x11-misc-exynos-0.0.6-1-47-g27a0e7218c4e5e6ec98ec5801657f371928eba86
8 ExclusiveArch:  %arm
9 Group:      System/X11
10 License:    MIT
11 Source0:    %{name}-%{version}.tar.gz
12 %if "%{?tizen_profile_name}" == "wearable"
13 Source1:    xorg.service.wearable
14 Source2:    xresources.service.wearable
15 Source3:    xscim.service
16 %else
17 Source1:    xresources.service.mobile
18 Source2:    xresources.path
19 Source3:    xorg.service.mobile
20 %endif
21
22 Requires:   xserver-xorg-core
23 Requires:   xorg-x11-drv-evdev-multitouch
24 Requires(post):   xkeyboard-config
25
26 %if ("%{tizen_profile_name}" == "wearable" && "%{_repository}" == "target-b3")
27 Excludearch: %arm
28 %endif
29
30 %description
31 Description: %{summary}
32
33
34 %prep
35 %setup -q
36
37
38 %build
39
40 %if "%{?tizen_profile_name}" == "wearable"
41 cd wearable
42 %else
43 cd mobile
44 %endif
45
46 {
47 for f in `find arm-common/ -name "*.in"`; do
48         cat $f > ${f%.in};
49         sed -i -e "s#@PREFIX@#/usr#g" ${f%.in};
50         sed -i -e "s#@DATADIR@#/opt#g" ${f%.in};
51         chmod a+x ${f%.in};
52 done
53 }
54
55 %reconfigure \
56         --with-arch=arm \
57         --with-conf-prefix=/
58
59 make %{?jobs:-j%jobs}
60
61 %install
62
63 %if "%{?tizen_profile_name}" == "wearable"
64 cd wearable
65 %else
66 cd mobile
67 %endif
68
69 rm -rf %{buildroot}
70 mkdir -p %{buildroot}/usr/share/license
71 cp -af COPYING %{buildroot}/usr/share/license/%{name}
72 %make_install
73 %if "%{?tizen_profile_name}" == "mobile"
74 mkdir -p %{buildroot}/etc/rc.d/init.d/
75 mkdir -p %{buildroot}/etc/rc.d/rc3.d/
76 mkdir -p %{buildroot}/etc/rc.d/rc4.d/
77 %endif
78 mkdir -p %{buildroot}/etc/profile.d/
79 mkdir -p %{buildroot}/etc/X11/
80 %if "%{?tizen_profile_name}" == "wearable"
81 mkdir -p %{buildroot}/opt/etc/dump.d/module.d
82 mkdir -p %{buildroot}/usr/bin/
83 %else
84 cp -af arm-common/xserver %{buildroot}/etc/rc.d/init.d/
85 cp -af arm-common/xresources %{buildroot}/etc/rc.d/init.d/
86 %endif
87 cp -af arm-common/xsetrc %{buildroot}/etc/X11/
88 cp -af arm-common/Xmodmap %{buildroot}/etc/X11/
89 cp -af arm-common/xinitrc %{buildroot}/etc/X11/
90 %if "%{?tizen_profile_name}" == "wearable"
91 cp -af arm-common/winsys_log_dump.sh %{buildroot}/opt/etc/dump.d/module.d
92 %else
93 ln -s /etc/rc.d/init.d/xserver %{buildroot}/etc/rc.d/rc3.d/S02xserver
94 ln -s /etc/rc.d/init.d/xserver %{buildroot}/etc/rc.d/rc4.d/S02xserver
95 ln -s /etc/rc.d/init.d/xresources %{buildroot}/etc/rc.d/rc4.d/S80xresources
96 %endif
97 cp -af arm-common/Xorg.sh %{buildroot}/etc/profile.d/
98 %if "%{?tizen_profile_name}" == "wearable"
99 mkdir -p %{buildroot}%{_libdir}/systemd/system/basic.target.wants
100 install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/xorg.service
101 ln -s ../xorg.service %{buildroot}%{_libdir}/systemd/system/basic.target.wants/xorg.service
102 mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
103 install -m 0644 %SOURCE2 %{buildroot}%{_libdir}/systemd/system/xresources.service
104 ln -s ../xresources.service.wearable %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/xresources.service
105 install -m 0644 %SOURCE3 %{buildroot}%{_libdir}/systemd/system/xscim.service
106 ln -s ../xscim.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/xscim.service
107 %else
108 mkdir -p %{buildroot}%{_libdir}/systemd/system/graphical.target.wants
109 install -m 0644 %SOURCE3 %{buildroot}%{_libdir}/systemd/system/xorg.service
110 mkdir -p %{buildroot}%{_libdir}/systemd/system/basic.target.wants/
111 install -m 0644 %SOURCE3 %{buildroot}%{_libdir}/systemd/system/basic.target.wants/xorg.service
112 install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/xresources.service
113 install -m 0644 %SOURCE2 %{buildroot}%{_libdir}/systemd/system/xresources.path
114 ln -s ../xresources.path %{buildroot}%{_libdir}/systemd/system/graphical.target.wants/
115 %endif
116
117 cp -rf arm-e4412/* %{buildroot}/etc/X11/
118
119 %post
120 mkdir -p /opt/var/log
121
122 %files
123 %if "%{?tizen_profile_name}" == "wearable"
124 %manifest wearable/xorg-x11-misc-exynos.manifest
125 %else
126 %manifest mobile/xorg-x11-misc-exynos.manifest
127 %endif
128 %defattr(-,root,root,-)
129 /usr/share/license/%{name}
130 %{_sysconfdir}/profile.d/Xorg.sh
131 %if "%{?tizen_profile_name}" == "mobile"
132 %{_sysconfdir}/rc.d/init.d/*
133 %{_sysconfdir}/rc.d/rc3.d/*
134 %{_sysconfdir}/rc.d/rc4.d/*
135 %endif
136 %attr(-,inhouse,inhouse)
137 /etc/X11/Xresources
138 /etc/X11/xinitrc
139 /etc/X11/xsetrc
140 /etc/X11/Xmodmap
141 /etc/X11/xorg.conf
142 /etc/X11/xorg.conf.d/*.conf
143 %if "%{?tizen_profile_name}" == "wearable"
144 /opt/etc/dump.d/module.d/*
145 %endif
146 %{_bindir}/startx
147 %if "%{?tizen_profile_name}" == "wearable"
148 %{_libdir}/systemd/system/xorg.service
149 %{_libdir}/systemd/system/basic.target.wants/xorg.service
150 %else
151 %{_libdir}/systemd/system/xorg.service
152 %{_libdir}/systemd/system/basic.target.wants/xorg.service
153 %endif
154 %{_libdir}/systemd/system/xresources.service
155 %if "%{?tizen_profile_name}" == "wearable"
156 %{_libdir}/systemd/system/xscim.service
157 %{_libdir}/systemd/system/multi-user.target.wants/xresources.service
158 %{_libdir}/systemd/system/multi-user.target.wants/xscim.service
159 %else
160 %{_libdir}/systemd/system/xresources.path
161 %{_libdir}/systemd/system/graphical.target.wants/xresources.path
162 %endif