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