Implement setup-ivi-clone
[platform/adaptation/setup-scripts.git] / packaging / setup-ivi.spec
1 Name:     setup-ivi
2 Version:  1.0
3 Release:  1
4 License:  GPL-2.0
5 Summary:  Various early setup programs
6 Url:      http://www.tizen.org
7 Group:    System/Configuration
8 Source:   %{name}_%{version}.tar.gz
9 Requires: /usr/bin/sed
10 Requires: /usr/bin/grep
11 Requires: /usr/bin/printf
12 Requires: /usr/bin/printenv
13 Requires: /usr/bin/sort
14 Requires: /usr/bin/tr
15 Requires: virtual-setup-ivi-bootloader
16 BuildArchitectures: noarch
17
18 %package -n setup-gummiboot
19 Summary:  Command-line tool for tweaking gummiboot configuration
20 Provides: virtual-setup-ivi-bootloader
21 Requires: %{name}
22 Requires: gummiboot
23
24 %package -n setup-extlinux
25 Summary:  Command-line tool for tweaking extlinux configuration
26 Provides: virtual-setup-ivi-bootloader
27 Requires: %{name}
28 Requires: syslinux-extlinux
29
30 %package -n setup-ivi-clone
31 Summary:  A tool for cloning a Tizen IVI system
32 Requires: %{name}
33 Requires: /usr/bin/mount
34 Requires: /usr/bin/udevadm
35 Requires: /usr/bin/uuidgen
36 Requires: /usr/bin/sync
37 Requires: /usr/bin/tail
38 Requires: systemd
39 Requires: gptfdisk
40 Requires: e2fsprogs
41 Requires: dosfstools
42 Requires: rsync
43
44 %description
45 This package provides various early system setup programs
46
47 %description -n setup-gummiboot
48 This package provides a command-line tool for changing the gummiboot bootloader
49 configuration files.
50
51 %description -n setup-extlinux
52 This package provides a command-line tool for changing the extlinux bootloader
53 configuration file.
54
55 %description -n setup-ivi-clone
56 This package provides a command line tool for cloning a Tizen IVI system to a
57 different disk.
58
59 ###
60 ### PREP
61 ###
62 %prep
63 %setup -q -n %{name}-%{version}
64
65 %build
66
67 ###
68 ### INSTALL
69 ###
70 %install
71 install -d %{buildroot}/%{_sbindir}
72 install -d %{buildroot}/%{_prefix}/share/setup-ivi
73 install -d %{buildroot}/%{_unitdir}
74
75 install -m755 setup-ivi-boot %{buildroot}/%{_sbindir}
76 install -m755 setup-ivi-fstab %{buildroot}/%{_sbindir}
77 install -m755 setup-ivi-bootloader-conf %{buildroot}/%{_sbindir}
78 install -m755 setup-ivi-clone %{buildroot}/%{_sbindir}
79 install -m755 setup-ivi-clone-service %{buildroot}/%{_sbindir}
80 install -m644 ivi-clone.service %{buildroot}/%{_unitdir}
81 install -m755 setup-gummiboot-conf %{buildroot}/%{_sbindir}
82 install -m755 setup-extlinux-conf %{buildroot}/%{_sbindir}
83 install -m644 setup-ivi-sh-functions %{buildroot}/%{_prefix}/share/setup-ivi
84 install -m644 installerfw-sh-functions %{buildroot}/%{_prefix}/share/setup-ivi
85
86 ###
87 ### CLEAN
88 ###
89 %clean
90 rm -rf %{buildroot}
91
92 ###
93 ### FILES
94 ###
95 %files
96 %defattr(-,root,root)
97 %{_sbindir}/setup-ivi-boot
98 %{_sbindir}/setup-ivi-fstab
99 %{_sbindir}/setup-ivi-bootloader-conf
100 %{_prefix}/share/setup-ivi/setup-ivi-sh-functions
101 %{_prefix}/share/setup-ivi/installerfw-sh-functions
102
103 %files -n setup-gummiboot
104 %defattr(-,root,root)
105 %{_sbindir}/setup-gummiboot-conf
106
107 %files -n setup-extlinux
108 %defattr(-,root,root)
109 %{_sbindir}/setup-extlinux-conf
110
111 %files -n setup-ivi-clone
112 %defattr(-,root,root)
113 %{_sbindir}/setup-ivi-clone
114 %{_sbindir}/setup-ivi-clone-service
115 # Note, we do not need to run 'systemctl enable ivi-clone' for this one because
116 # it is activated by the 'systemd.unit=ivi-clone.service' kernel parameter.
117 %{_unitdir}/ivi-clone.service