]>
Commit | Line | Data |
---|---|---|
5b7f8d81 JB |
1 | # TODO: |
2 | # - iscsi: libiscsi.h, libiscsi_init in libiscsi | |
3 | # - lsm: libstoragemgmt >= 1.3.0, libconfig >= 1.3.2 | |
aa20e8c1 MB |
4 | # |
5 | # Conditional build: | |
51e80493 | 6 | %bcond_with elogind # elogind insead of systemd logind support |
5b7f8d81 JB |
7 | %bcond_with iscsi # iSCSI support |
8 | %bcond_with libstoragemgmt # libstoragemgmt support | |
51e80493 | 9 | %bcond_without vdo # VDO support (deprecated) |
aa20e8c1 MB |
10 | %bcond_without apidocs # do not build and package API docs |
11 | %bcond_without static_libs # don't build static libraries | |
02b17b81 | 12 | |
aa20e8c1 | 13 | Summary: Disk Management Service |
aec8bf99 | 14 | Summary(pl.UTF-8): Usługa zarządzania dyskami |
aa20e8c1 | 15 | Name: udisks2 |
3daa8c0f | 16 | Version: 2.9.2 |
51e80493 | 17 | Release: 1 |
aa20e8c1 MB |
18 | License: GPL v2+ |
19 | Group: Libraries | |
5b7f8d81 JB |
20 | #Source0Download: https://github.com/storaged-project/udisks/releases |
21 | Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 | |
3daa8c0f | 22 | # Source0-md5: 1f8a9ca98a63ecc9e48ffd08309d0492 |
e683d159 | 23 | Patch0: automake-1.12.patch |
326b1825 | 24 | Patch1: %{name}-housekeeping_interval.patch |
3618e355 | 25 | URL: https://www.freedesktop.org/wiki/Software/udisks |
52984135 | 26 | BuildRequires: acl-devel |
aec8bf99 | 27 | BuildRequires: autoconf >= 2.50 |
62493131 | 28 | BuildRequires: automake >= 1:1.11 |
5b7f8d81 JB |
29 | %{?with_elogind:BuildRequires: elogind-devel >= 219} |
30 | BuildRequires: gettext-tools >= 0.19.8 | |
31 | BuildRequires: glib2-devel >= 1:2.50 | |
aa20e8c1 MB |
32 | BuildRequires: gobject-introspection-devel >= 0.6.2 |
33 | BuildRequires: gtk-doc >= 1.3 | |
aa20e8c1 | 34 | BuildRequires: libatasmart-devel >= 0.17 |
51e80493 JB |
35 | # with btrfs,crypto,fs,kbd,loop,lvm2,mdraid,part,swap%{?with_vdo:,vdo} modules |
36 | BuildRequires: libblockdev-devel >= 2.24 | |
5b7f8d81 JB |
37 | %{?with_libstoragemgmt:BuildRequires: libconfig-devel >= 1.3.2} |
38 | BuildRequires: libmount-devel >= 2.30 | |
39 | %{?with_libstoragemgmt:BuildRequires: libstoragemgmt-devel >= 1.3.0} | |
aa20e8c1 | 40 | BuildRequires: libtool |
51e80493 | 41 | BuildRequires: libuuid-devel >= 2.31 |
aa20e8c1 MB |
42 | BuildRequires: libxslt-progs |
43 | BuildRequires: pkgconfig | |
62493131 | 44 | BuildRequires: polkit-devel >= 0.102 |
270be2dd | 45 | BuildRequires: rpmbuild(macros) >= 1.752 |
5b7f8d81 | 46 | %{!?with_elogind:BuildRequires: systemd-devel >= 1:209} |
aec8bf99 | 47 | BuildRequires: udev-glib-devel >= 1:165 |
5b7f8d81 | 48 | %{?with_elogind:BuildConflicts: systemd-devel} |
aa20e8c1 | 49 | Requires: %{name}-libs = %{version}-%{release} |
aec8bf99 | 50 | Requires: libatasmart >= 0.17 |
51e80493 JB |
51 | Requires: libblockdev-crypto >= 2.24 |
52 | Requires: libblockdev-fs >= 2.24 | |
53 | Requires: libblockdev-loop >= 2.24 | |
4ce4b6b1 | 54 | Requires: systemd-units >= 44 |
aec8bf99 JB |
55 | Requires: udev-core >= 1:147 |
56 | Requires: udev-glib >= 1:165 | |
aa20e8c1 MB |
57 | Suggests: acl |
58 | Suggests: cryptsetup-luks | |
59 | Suggests: dosfstools | |
60 | Suggests: e2fsprogs | |
61 | Suggests: gdisk | |
51e80493 | 62 | Suggests: libblockdev-plugins >= 2.24 |
aa20e8c1 MB |
63 | Suggests: losetup |
64 | Suggests: mount | |
65 | Suggests: nilfs-utils | |
66 | Suggests: ntfsprogs | |
67 | Suggests: parted | |
68 | Suggests: reiserfsprogs | |
69 | Suggests: util-linux | |
70 | Suggests: xfsprogs | |
71 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
72 | ||
73 | %description | |
74 | udisks provides a daemon, D-Bus API and command line tools for | |
75 | managing disks and storage devices. This package is for the udisks 2.x | |
76 | series. | |
77 | ||
aec8bf99 JB |
78 | %description -l pl.UTF-8 |
79 | udisks dostarcza demona, API D-Bus oraz narzędzia linii poleceń do | |
80 | zarządzania dyskami i innymi urządzeniami przechowującymi dane. Ten | |
81 | pakiet jest przeznaczony dla udisks z serii 2.x. | |
82 | ||
aa20e8c1 MB |
83 | %package libs |
84 | Summary: udisks2 library | |
85 | Summary(pl.UTF-8): Biblioteka udisks2 | |
86 | License: LGPL v2+ | |
87 | Group: Libraries | |
5b7f8d81 | 88 | Requires: glib2 >= 1:2.50 |
aa20e8c1 MB |
89 | |
90 | %description libs | |
91 | This package contains udisks2 library, which provides access to the | |
92 | udisks daemon. | |
93 | ||
aec8bf99 JB |
94 | %description libs -l pl.UTF-8 |
95 | Ten pakiet zawiera bibliotekę udisks2, umożliwiającą dostęp do demona | |
96 | udisks. | |
97 | ||
aa20e8c1 MB |
98 | %package devel |
99 | Summary: Header files for udisks2 library | |
100 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki udisks2 | |
101 | License: LGPL v2+ | |
102 | Group: Development/Libraries | |
103 | Requires: %{name}-libs = %{version}-%{release} | |
5b7f8d81 | 104 | Requires: glib2-devel >= 1:2.50 |
aa20e8c1 MB |
105 | |
106 | %description devel | |
107 | Header files for udisks2 library. | |
108 | ||
109 | %description devel -l pl.UTF-8 | |
110 | Pliki nagłówkowe biblioteki udisks2. | |
111 | ||
112 | %package static | |
113 | Summary: Static udisks2 library | |
114 | Summary(pl.UTF-8): Statyczna biblioteka udisks2 | |
115 | Group: Development/Libraries | |
116 | Requires: %{name}-devel = %{version}-%{release} | |
117 | ||
118 | %description static | |
119 | Static udisks2 library. | |
120 | ||
121 | %description static -l pl.UTF-8 | |
122 | Statyczna biblioteka udisks2. | |
123 | ||
124 | %package apidocs | |
125 | Summary: udisks2 API documentation | |
126 | Summary(pl.UTF-8): Dokumentacja API biblioteki udisks2 | |
127 | Group: Documentation | |
128 | Requires: gtk-doc-common | |
7550da81 | 129 | BuildArch: noarch |
aa20e8c1 MB |
130 | |
131 | %description apidocs | |
132 | API documentation for udisks2 library. | |
133 | ||
134 | %description apidocs -l pl.UTF-8 | |
135 | Dokumentacja API biblioteki udisks2. | |
136 | ||
137 | %package -n bash-completion-udisks2 | |
138 | Summary: bash-completion for udisks2 | |
aec8bf99 | 139 | Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla udisks2 |
aa20e8c1 | 140 | Group: Applications/Shells |
aec8bf99 JB |
141 | Requires: %{name} = %{version}-%{release} |
142 | Requires: bash-completion >= 2 | |
7550da81 | 143 | BuildArch: noarch |
aa20e8c1 MB |
144 | |
145 | %description -n bash-completion-udisks2 | |
aec8bf99 | 146 | This package provides bash-completion for udisks2 (udisksctl command). |
aa20e8c1 MB |
147 | |
148 | %description -n bash-completion-udisks2 -l pl.UTF-8 | |
aec8bf99 JB |
149 | Pakiet ten dostarcza bashowe uzupełnianie parametrów dla udisks2 |
150 | (polecenia udisksctl). | |
aa20e8c1 MB |
151 | |
152 | %prep | |
153 | %setup -q -n udisks-%{version} | |
e683d159 | 154 | %patch0 -p1 |
326b1825 | 155 | %patch1 -p1 |
aa20e8c1 MB |
156 | |
157 | %build | |
aa20e8c1 | 158 | %{__libtoolize} |
5b7f8d81 | 159 | %{__aclocal} -I m4 |
aa20e8c1 MB |
160 | %{__autoconf} |
161 | %{__autoheader} | |
162 | %{__automake} | |
163 | %configure \ | |
5b7f8d81 | 164 | --enable-available-modules \ |
51e80493 | 165 | %{__enable_disable apidocs gtk-doc} \ |
aa20e8c1 MB |
166 | %{__enable_disable static_libs static} \ |
167 | --disable-silent-rules \ | |
51e80493 | 168 | %{?with_vdo:--enable-vdo} \ |
aa20e8c1 MB |
169 | --with-html-dir=%{_gtkdocdir} \ |
170 | --with-systemdsystemunitdir=%{systemdunitdir} | |
171 | %{__make} | |
172 | ||
173 | %install | |
174 | rm -rf $RPM_BUILD_ROOT | |
175 | ||
176 | %{__make} install \ | |
177 | DESTDIR=$RPM_BUILD_ROOT | |
178 | ||
179 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
5b7f8d81 JB |
180 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/udisks2/modules/*.la |
181 | %if %{with static_libs} | |
182 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/udisks2/modules/*.a | |
183 | %endif | |
aa20e8c1 MB |
184 | |
185 | %find_lang %{name} | |
186 | ||
187 | %clean | |
188 | rm -rf $RPM_BUILD_ROOT | |
189 | ||
aec8bf99 | 190 | %post libs -p /sbin/ldconfig |
aa20e8c1 MB |
191 | %postun libs -p /sbin/ldconfig |
192 | ||
193 | %files -f %{name}.lang | |
194 | %defattr(644,root,root,755) | |
5b7f8d81 | 195 | %doc AUTHORS NEWS README.md |
aa20e8c1 | 196 | %attr(755,root,root) %{_bindir}/udisksctl |
5b7f8d81 | 197 | %attr(755,root,root) %{_sbindir}/umount.udisks2 |
6bcfdc79 JB |
198 | %dir %{_libexecdir}/udisks2 |
199 | %attr(755,root,root) %{_libexecdir}/udisks2/udisksd | |
5b7f8d81 JB |
200 | %if "%{_libdir}" != "%{_libexecdir}" |
201 | %dir %{_libdir}/udisks2 | |
202 | %endif | |
203 | %dir %{_libdir}/udisks2/modules | |
204 | %attr(755,root,root) %{_libdir}/udisks2/modules/libudisks2_bcache.so | |
205 | %attr(755,root,root) %{_libdir}/udisks2/modules/libudisks2_btrfs.so | |
206 | %attr(755,root,root) %{_libdir}/udisks2/modules/libudisks2_lvm2.so | |
51e80493 | 207 | %if %{with vdo} |
5b7f8d81 | 208 | %attr(755,root,root) %{_libdir}/udisks2/modules/libudisks2_vdo.so |
51e80493 | 209 | %endif |
5b7f8d81 JB |
210 | %attr(755,root,root) %{_libdir}/udisks2/modules/libudisks2_zram.so |
211 | %dir %{_sysconfdir}/udisks2 | |
212 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/udisks2/udisks2.conf | |
aa20e8c1 | 213 | /lib/udev/rules.d/80-udisks2.rules |
11dd28f9 | 214 | /lib/udev/rules.d/90-udisks2-zram.rules |
51e80493 | 215 | #%{systemdunitdir}/clean-mount-point@.service |
5b7f8d81 | 216 | %{systemdunitdir}/udisks2.service |
11dd28f9 | 217 | %{systemdunitdir}/udisks2-zram-setup@.service |
5b7f8d81 | 218 | %{systemdtmpfilesdir}/udisks2.conf |
aa20e8c1 | 219 | %{_datadir}/dbus-1/system-services/org.freedesktop.UDisks2.service |
5b7f8d81 JB |
220 | %{_datadir}/dbus-1/system.d/org.freedesktop.UDisks2.conf |
221 | %{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.policy | |
222 | %{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.bcache.policy | |
223 | %{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.btrfs.policy | |
224 | %{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.lvm2.policy | |
51e80493 | 225 | %if %{with vdo} |
5b7f8d81 | 226 | %{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.vdo.policy |
51e80493 | 227 | %endif |
5b7f8d81 | 228 | %{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.zram.policy |
aa20e8c1 | 229 | %{_mandir}/man1/udisksctl.1* |
5b7f8d81 | 230 | %{_mandir}/man5/udisks2.conf.5* |
aa20e8c1 MB |
231 | %{_mandir}/man8/udisks.8* |
232 | %{_mandir}/man8/udisksd.8* | |
62493131 | 233 | %{_mandir}/man8/umount.udisks2.8* |
e683d159 | 234 | %attr(700,root,root) %dir /var/lib/udisks2 |
aa20e8c1 MB |
235 | |
236 | %files libs | |
237 | %defattr(644,root,root,755) | |
238 | %attr(755,root,root) %{_libdir}/libudisks2.so.*.*.* | |
239 | %attr(755,root,root) %ghost %{_libdir}/libudisks2.so.0 | |
240 | %{_libdir}/girepository-1.0/UDisks-2.0.typelib | |
241 | ||
242 | %files devel | |
243 | %defattr(644,root,root,755) | |
244 | %attr(755,root,root) %{_libdir}/libudisks2.so | |
245 | %{_datadir}/gir-1.0/UDisks-2.0.gir | |
246 | %{_includedir}/udisks2 | |
247 | %{_pkgconfigdir}/udisks2.pc | |
51e80493 JB |
248 | %{_pkgconfigdir}/udisks2-bcache.pc |
249 | %{_pkgconfigdir}/udisks2-btrfs.pc | |
250 | %{_pkgconfigdir}/udisks2-lvm2.pc | |
251 | %if %{with vdo} | |
252 | %{_pkgconfigdir}/udisks2-vdo.pc | |
253 | %endif | |
254 | %{_pkgconfigdir}/udisks2-zram.pc | |
aa20e8c1 MB |
255 | |
256 | %if %{with static_libs} | |
257 | %files static | |
258 | %defattr(644,root,root,755) | |
259 | %{_libdir}/libudisks2.a | |
260 | %endif | |
261 | ||
262 | %if %{with apidocs} | |
263 | %files apidocs | |
264 | %defattr(644,root,root,755) | |
265 | %{_gtkdocdir}/udisks2 | |
266 | %endif | |
267 | ||
268 | %files -n bash-completion-udisks2 | |
269 | %defattr(644,root,root,755) | |
62493131 | 270 | %{bash_compdir}/udisksctl |