Create /etc/xdg/weston config directory during installation.
[profile/ivi/weston.git] / packaging / weston.spec
1 Name:       weston
2 Summary:    Weston Compositor
3 Version:    1.0.6
4 Release:    1
5 Group:      System/Libraries
6 License:    MIT
7 URL:        http://wayland.freedesktop.org
8 Source0:    %{name}-%{version}.tar.bz2
9 Source1:    cursors.tar.bz2
10 Source2:    weston.service
11 Source3:    99-vtc1000-quirk.rules
12 Source4:    rc.weston
13 Source5:    weston.sh
14 Source6:    weston.manifest
15 Source7:    99-chelong-quirk.rules
16 BuildRequires: pkgconfig(wayland-server)
17 BuildRequires: pkgconfig(egl)
18 BuildRequires: pkgconfig(gl)
19 BuildRequires: pkgconfig(glesv2)
20 BuildRequires: pkgconfig(pixman-1)
21 BuildRequires: pkgconfig(libpng)
22 BuildRequires: pkgconfig(libudev)
23 BuildRequires: pkgconfig(libdrm)
24 BuildRequires: pkgconfig(gbm)
25 BuildRequires: pkgconfig(wayland-client)
26 BuildRequires: pkgconfig(wayland-egl)
27 BuildRequires: pkgconfig(cairo)
28 BuildRequires: pkgconfig(gdk-pixbuf-2.0)
29 BuildRequires: pkgconfig(glib-2.0)
30 BuildRequires: pkgconfig(gobject-2.0)
31 BuildRequires: pkgconfig(gio-2.0)
32 BuildRequires: pkgconfig(xkbcommon)
33 BuildRequires: pkgconfig(libpng)
34 BuildRequires: pkgconfig(mtdev)
35 BuildRequires: pkgconfig(xcursor)
36 BuildRequires: libjpeg-devel
37 Requires: xkeyboard-config
38
39 %description
40 Weston compositor
41
42 %package devel
43 Summary:    Development files for %{name}
44 Group:      Development/Libraries
45 Requires:   %{name} = %{version}-%{release}
46 Requires:   wayland-devel = %{version}
47 Requires:   libGLESv2-devel
48 Requires:   libEGL-devel
49 Requires:   libxkbcommon-devel
50 Requires:   pixman-devel
51
52 %description devel
53 Development files needed for building Weston modules
54
55 %package cursors
56 Summary:    Adds a simple cursor theme to the default cursor theme
57 Group:      System/Libraries
58 Requires:   %{name} = %{version}-%{release}
59
60 %description cursors
61 Adds a simple cursor theme to the default cursor theme
62
63 %prep
64 %setup -q -n %{name}-%{version}
65
66 %build
67
68 %autogen --disable-weston-launch --disable-setuid-install --disable-x11-compositor --disable-xwayland
69
70 make %{?_smp_mflag}
71
72 %install
73 rm -rf %{buildroot}
74 %make_install
75
76 install -m 755 clients/dnd $RPM_BUILD_ROOT%{_bindir}/wayland-dnd
77 install -m 755 clients/eventdemo $RPM_BUILD_ROOT%{_bindir}/wayland-eventdemo
78 install -m 755 clients/flower $RPM_BUILD_ROOT%{_bindir}/wayland-flower
79 install -m 755 clients/image $RPM_BUILD_ROOT%{_bindir}/wayland-image
80 install -m 755 clients/resizor $RPM_BUILD_ROOT%{_bindir}/wayland-resizor
81 install -m 755 clients/simple-egl $RPM_BUILD_ROOT%{_bindir}/wayland-simple-egl
82 install -m 755 clients/simple-shm $RPM_BUILD_ROOT%{_bindir}/wayland-simple-shm
83 install -m 755 clients/simple-touch $RPM_BUILD_ROOT%{_bindir}/wayland-simple-touch
84 install -m 755 clients/smoke $RPM_BUILD_ROOT%{_bindir}/wayland-smoke
85
86 # Systemd
87 mkdir -p $RPM_BUILD_ROOT/%{_libdir}/systemd/system/graphical.target.wants
88 install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT/%{_libdir}/systemd/system/
89 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/udev/rules.d/
90 install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT/%{_sysconfdir}/udev/rules.d/
91 install -m 0644 %{SOURCE7} $RPM_BUILD_ROOT/%{_sysconfdir}/udev/rules.d/
92 ln -sf ../weston.service $RPM_BUILD_ROOT/%{_libdir}/systemd/system/graphical.target.wants/weston.service
93
94 # System V
95 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
96 mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc3.d
97 install -m 0755 %{SOURCE4} %{buildroot}%{_sysconfdir}/rc.d/init.d/weston
98 ln -sf %{_sysconfdir}/rc.d/init.d/weston %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S20weston
99
100 # Environment variables necessary to run Weston and Wayland clients.
101 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
102 install -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/profile.d
103
104 mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/default
105 tar -C $RPM_BUILD_ROOT%{_datadir}/icons/default -xvf %{SOURCE1}
106
107 # Weston configuration file directory
108 mkdir -p %{buildroot}%{_sysconfdir}/xdg/weston
109
110 %files
111 %manifest packaging/weston.manifest
112 %defattr(-,root,root,-)
113 %{_bindir}/weston
114 %{_bindir}/weston-terminal
115 %{_bindir}/weston-info
116 %{_bindir}/wayland-*
117 %{_bindir}/wcap-decode
118 %dir %{_libdir}/weston/
119 %{_libdir}/weston/*.so
120 %{_libexecdir}/weston-desktop-shell
121 %{_libexecdir}/weston-tablet-shell
122 %{_libexecdir}/weston-screenshooter
123 %dir %{_datadir}/weston/
124 %{_datadir}/weston/*.*
125 %{_datadir}/man/*/*
126 %{_libdir}/systemd/system/weston.service
127 %{_libdir}/systemd/system/graphical.target.wants/weston.service
128 %{_sysconfdir}/udev/rules.d/*
129 %{_sysconfdir}/profile.d/weston.sh
130 %{_sysconfdir}/rc.d/init.d/weston
131 %{_sysconfdir}/rc.d/rc3.d/S20weston
132 %dir %{_sysconfdir}/xdg/weston
133
134 %files devel
135 %defattr(-,root,root,-)
136 %{_includedir}/weston/*.h
137 %{_libdir}/pkgconfig/*.pc
138
139 %files cursors
140 %defattr(-,root,root,-)
141 %{_datadir}/icons/default/cursors/*