c32783de04227f225404e0be98c45199e07a0b60
[platform/core/system/storaged.git] / packaging / storaged.spec
1 #These options are DEACTIVATED by default.
2 %bcond_with emulator
3 %define extended_storage 0
4
5 Name:       storaged
6 Summary:    Storaged
7 Version:    1.0.0
8 Release:    1
9 Group:      System/Management
10 License:    Apache-2.0
11 Source0:    %{name}-%{version}.tar.gz
12 Source1:    %{name}.manifest
13
14 BuildRequires:  cmake
15 BuildRequires:  pkgconfig(vconf)
16 BuildRequires:  pkgconfig(dlog)
17 BuildRequires:  pkgconfig(capi-base-common)
18 BuildRequires:  pkgconfig(libudev)
19 BuildRequires:  pkgconfig(gio-2.0)
20 BuildRequires:  pkgconfig(glib-2.0)
21 BuildRequires:  pkgconfig(libtzplatform-config)
22 BuildRequires:  pkgconfig(capi-system-info)
23 BuildRequires:  pkgconfig(capi-system-device)
24 BuildRequires:  pkgconfig(argos_watchdog)
25 BuildRequires:  pkgconfig(libsystemd)
26 BuildRequires:  pkgconfig(storage)
27 BuildRequires:  pkgconfig(app2sd)
28 BuildRequires:  pkgconfig(blkid)
29 BuildRequires:  pkgconfig(mount)
30 BuildRequires:  pkgconfig(libsyscommon)
31 BuildRequires:  pkgconfig(json-c)
32
33 BuildRequires:  pkgconfig(capi-ui-efl-util)
34 BuildRequires:  pkgconfig(capi-appfw-application)
35 BuildRequires:  pkgconfig(capi-appfw-preference)
36 BuildRequires:  pkgconfig(capi-appfw-app-control)
37 BuildRequires:  pkgconfig(capi-system-system-settings)
38 BuildRequires:  pkgconfig(efl-extension)
39 %if %{extended_storage}
40 BuildRequires:  pkgconfig(ode)
41 %endif
42
43 #For /usr/bin/msgfmt
44 BuildRequires: gettext-tools
45
46 Requires(post): /usr/bin/vconftool
47
48 Requires: /usr/bin/fsck_msdosfs
49 Requires: /usr/bin/newfs_msdos
50
51 %description
52 storage daemon.
53
54 %package  module_block
55 Summary:  block module plugin
56 Requires: %{name} = %{version}-%{release}
57 %description module_block
58 block module plugin
59
60 %package  module_storage
61 Summary:  storage module plugin
62 Requires: %{name} = %{version}-%{release}
63 %description module_storage
64 storage module plugin
65
66 %package  org.tizen.extended-sd
67 Summary:  App to setup sdcard
68 Requires: %{name} = %{version}-%{release}
69 %description org.tizen.extended-sd
70 App to setup sdcard
71
72 %package auto-test
73 Summary:  Storaged auto test tool
74 Group:    System/Utilities
75 %description auto-test
76 Storaged helper programs.
77 This package can be installed optional for auto dbus test.
78
79 %prep
80 %setup -q
81 %if %{with emulator}
82         %define ARCH emulator
83 %else
84         %ifarch %{arm} aarch64
85                 %define ARCH arm
86         %else
87                 %define ARCH x86
88         %endif
89 %endif
90
91 %ifarch %{arm} %ix86
92         %define ARCH_BIT 32
93 %else
94         %define ARCH_BIT 64
95 %endif
96
97 %define APP_PREFIX    "/usr/apps/org.tizen.extended-sd"
98
99 %cmake . \
100         -DTZ_SYS_ETC=%TZ_SYS_ETC \
101         -DCMAKE_INSTALL_PREFIX=%{_prefix} \
102         -DCMAKE_INSTALL_APP_PREFIX=%{APP_PREFIX} \
103         -DAPP_INSTALL_PREFIX="%{TZ_SYS_RO_APP}" \
104         -DAPP_SHARE_PACKAGES_DIR="%{TZ_SYS_RO_PACKAGES}" \
105         -DARCH=%{ARCH} \
106         -DARCH_BIT=%{ARCH_BIT} \
107         -DPROFILE=mobile \
108         -DBLOCK_MODULE=on \
109         -DBLOCK_TMPFS=on \
110         -DSTORAGE_MODULE=on \
111         -DEXTENDED_STORAGE=%{extended_storage} \
112         #eol
113
114 %build
115 cp %{SOURCE1} .
116
117 make %{?jobs:-j%jobs}
118
119 %install
120 rm -rf %{buildroot}
121 %make_install
122
123 %install_service delayed.target.wants storaged.service
124
125 %find_lang extended-sd
126
127 %post
128 systemctl daemon-reload
129 if [ "$1" == "1" ]; then
130     systemctl restart storaged.service
131 fi
132
133 %postun
134 systemctl daemon-reload
135
136 %files
137 %manifest %{name}.manifest
138 %license LICENSE.Apache-2.0
139 %config %{_sysconfdir}/dbus-1/system.d/org.tizen.system.storage.conf
140 %{_datadir}/dbus-1/system-services/org.tizen.system.storage.service
141 %{_unitdir}/delayed.target.wants/storaged.service
142 %{_unitdir}/storaged.service
143 %{_bindir}/storaged
144
145 %files module_block
146 %manifest %{name}.manifest
147 %license LICENSE.Apache-2.0
148 %{_libdir}/storaged/module_block.so
149 %{_bindir}/mmc-smack-label
150 %config %{_sysconfdir}/storaged/block.conf
151
152 %files module_storage
153 %manifest %{name}.manifest
154 %license LICENSE.Apache-2.0
155 %{_libdir}/storaged/module_storage.so
156 %config %{_sysconfdir}/storaged/storage.conf
157
158 %files org.tizen.extended-sd -f extended-sd.lang
159 %manifest %{name}.manifest
160 %license LICENSE.Apache-2.0
161 %defattr(-,root,root,-)
162 %{TZ_SYS_RO_APP}/org.tizen.extended-sd/bin/*
163 %{TZ_SYS_RO_APP}/org.tizen.extended-sd/res/*
164 %{TZ_SYS_RO_PACKAGES}/org.tizen.extended-sd.xml
165 %{TZ_SYS_RO_APP}/org.tizen.extended-sd/res/edje/extended-sd.edj
166
167 %files auto-test
168 %license LICENSE.Apache-2.0
169 %manifest %{name}.manifest
170 %{_bindir}/storaged-auto-test