]>
Commit | Line | Data |
---|---|---|
b4534ba3 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation | |
4 | %bcond_without static_libs # static library | |
5 | ||
d0951904 MB |
6 | Summary: Power management service |
7 | Summary(pl.UTF-8): Usługa zarządzania energią | |
dafd6455 | 8 | Name: upower |
cda4fe01 | 9 | Version: 0.99.20 |
318d9493 | 10 | Release: 1 |
d0951904 MB |
11 | License: GPL v2+ |
12 | Group: Libraries | |
b4534ba3 JB |
13 | #Source0Download: https://gitlab.freedesktop.org/upower/upower/-/tags |
14 | Source0: https://gitlab.freedesktop.org/upower/upower/-/archive/v%{version}/%{name}-%{version}.tar.bz2 | |
cda4fe01 | 15 | # Source0-md5: 7e71c4364c78bebb0cfbad509cc02a55 |
b1b32a2e | 16 | URL: https://upower.freedesktop.org/ |
c123b058 | 17 | BuildRequires: docbook-dtd412-xml |
0dc366a3 | 18 | BuildRequires: gettext-tools >= 0.19.8 |
cda4fe01 | 19 | BuildRequires: glib2-devel >= 1:2.58 |
0fd8623f | 20 | BuildRequires: gobject-introspection-devel >= 0.10.0 |
ef6fd72b | 21 | BuildRequires: gtk-doc >= 1.11 |
318d9493 | 22 | BuildRequires: libgudev-devel >= 235 |
cc36b8c0 | 23 | BuildRequires: libimobiledevice-devel >= 0.9.7 |
f130a49a | 24 | BuildRequires: libplist-devel >= 2.2.0 |
b4534ba3 | 25 | BuildRequires: libxslt-progs |
cda4fe01 | 26 | BuildRequires: meson >= 0.56.0 |
b4534ba3 | 27 | BuildRequires: ninja >= 1.5 |
d0951904 | 28 | BuildRequires: pkgconfig |
318d9493 | 29 | BuildRequires: rpm-build >= 4.6 |
b4534ba3 JB |
30 | BuildRequires: rpmbuild(macros) >= 1.736 |
31 | BuildRequires: sed >= 4.0 | |
df436de5 | 32 | BuildRequires: systemd-devel |
a46b24de | 33 | Requires(post,preun,postun): systemd-units >= 38 |
318d9493 | 34 | Requires: libgudev >= 235 |
a46b24de | 35 | Requires: libimobiledevice >= 0.9.7 |
f130a49a | 36 | Requires: libplist >= 2.2.0 |
48f5336e | 37 | Requires: systemd-units >= 38 |
318d9493 | 38 | Obsoletes: DeviceKit-power < 015 |
3ea6d0a8 | 39 | Obsoletes: UPower < 0.9.8-2 |
318d9493 | 40 | Obsoletes: upower-pm-utils < 1:0.99 |
d0951904 MB |
41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
42 | ||
43 | %description | |
dafd6455 | 44 | upower provides a daemon, API and command line tools for managing |
7f03a8d5 | 45 | power devices attached to the system. |
d0951904 MB |
46 | |
47 | %description -l pl.UTF-8 | |
3cf57ee9 | 48 | upower dostarcza demona, API i narzędzia linii poleceń do zarządzania |
7f03a8d5 | 49 | urządzeniami energii dołączonymi do systemu. |
d0951904 | 50 | |
e24563a8 JB |
51 | %package libs |
52 | Summary: UPower shared library | |
53 | Summary(pl.UTF-8): Biblioteka współdzielona UPower | |
54 | Group: Libraries | |
cda4fe01 | 55 | Requires: glib2 >= 1:2.58 |
e24563a8 | 56 | Conflicts: upower < 0.9.18 |
d0951904 | 57 | |
e24563a8 JB |
58 | %description libs |
59 | UPower shared library. | |
d0951904 | 60 | |
e24563a8 JB |
61 | %description libs -l pl.UTF-8 |
62 | Biblioteka współdzielona UPower. | |
d0951904 | 63 | |
58850157 | 64 | %package devel |
7f03a8d5 | 65 | Summary: Header files for UPower library |
e24563a8 | 66 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki UPower |
58850157 | 67 | Group: Development/Libraries |
e24563a8 | 68 | Requires: %{name}-libs = %{version}-%{release} |
cda4fe01 | 69 | Requires: glib2-devel >= 1:2.58 |
318d9493 JB |
70 | Obsoletes: DeviceKit-power-devel < 015 |
71 | Obsoletes: UPower-devel < 0.9.8-2 | |
72 | Obsoletes: upower-pm-utils-devel < 1:0.99 | |
58850157 PZ |
73 | |
74 | %description devel | |
7f03a8d5 | 75 | Header files for UPower library. |
58850157 PZ |
76 | |
77 | %description devel -l pl.UTF-8 | |
e24563a8 JB |
78 | Pliki nagłówkowe biblioteki UPower. |
79 | ||
80 | %package static | |
81 | Summary: Static UPower library | |
82 | Summary(pl.UTF-8): Statyczna biblioteka UPower | |
83 | Group: Development/Libraries | |
84 | Requires: %{name}-devel = %{version}-%{release} | |
318d9493 | 85 | Obsoletes: upower-pm-utils-static < 1:0.99 |
e24563a8 JB |
86 | |
87 | %description static | |
88 | Static UPower library. | |
89 | ||
90 | %description static -l pl.UTF-8 | |
91 | Statyczna biblioteka UPower. | |
92 | ||
93 | %package apidocs | |
94 | Summary: UPower API documentation | |
95 | Summary(pl.UTF-8): Dokumentacja API UPower | |
96 | Group: Documentation | |
97 | Requires: gtk-doc-common | |
318d9493 JB |
98 | Obsoletes: DeviceKit-power-apidocs < 015 |
99 | Obsoletes: UPower-apidocs < 0.9.8-2 | |
100 | Obsoletes: upower-pm-utils-apidocs < 1:0.99 | |
2cbad77f | 101 | BuildArch: noarch |
e24563a8 JB |
102 | |
103 | %description apidocs | |
104 | UPower API documentation. | |
105 | ||
106 | %description apidocs -l pl.UTF-8 | |
107 | Dokumentacja API UPower. | |
58850157 | 108 | |
d0951904 | 109 | %prep |
cda4fe01 | 110 | %setup -q -n %{name}-v%{version}-3f2eabb4d1f82bb8ca4ee357e5232cb4237fdc90 |
b4534ba3 JB |
111 | |
112 | %if %{with static_libs} | |
113 | %{__sed} -i -e '/^libupower_glib = / s/shared_library/library/' libupower-glib/meson.build | |
114 | %endif | |
d0951904 MB |
115 | |
116 | %build | |
b4534ba3 JB |
117 | %meson build \ |
118 | %{!?with_apidocs:-Dgtk-doc=false} \ | |
119 | -Dsystemdsystemunitdir=%{systemdunitdir} \ | |
120 | -Dudevrulesdir=/lib/udev/rules.d | |
121 | ||
122 | %ninja_build -C build | |
d0951904 MB |
123 | |
124 | %install | |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
b4534ba3 | 127 | %ninja_install -C build |
58711252 | 128 | |
9744188f | 129 | %find_lang upower |
7f03a8d5 | 130 | |
d0951904 MB |
131 | %clean |
132 | rm -rf $RPM_BUILD_ROOT | |
133 | ||
48f5336e AM |
134 | %post |
135 | %systemd_post upower.service | |
136 | ||
137 | %preun | |
48f5336e AM |
138 | %systemd_preun upower.service |
139 | ||
140 | %postun | |
141 | %systemd_reload | |
142 | ||
a46b24de JB |
143 | %post libs -p /sbin/ldconfig |
144 | %postun libs -p /sbin/ldconfig | |
145 | ||
9744188f | 146 | %files -f upower.lang |
d0951904 | 147 | %defattr(644,root,root,755) |
38abef6e | 148 | %doc AUTHORS HACKING NEWS README |
7f03a8d5 | 149 | %attr(755,root,root) %{_bindir}/upower |
3115add0 | 150 | %attr(755,root,root) %{_libexecdir}/upowerd |
9744188f MB |
151 | %dir %{_sysconfdir}/UPower |
152 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/UPower/UPower.conf | |
7f03a8d5 | 153 | %{_datadir}/dbus-1/system-services/org.freedesktop.UPower.service |
0dc366a3 | 154 | %{_datadir}/dbus-1/system.d/org.freedesktop.UPower.conf |
409b1d2c | 155 | %{systemdunitdir}/upower.service |
cda4fe01 | 156 | /lib/udev/hwdb.d/95-upower-hid.hwdb |
7f03a8d5 MB |
157 | /lib/udev/rules.d/95-upower-hid.rules |
158 | /lib/udev/rules.d/95-upower-wup.rules | |
159 | %{_mandir}/man1/upower.1* | |
160 | %{_mandir}/man7/UPower.7* | |
161 | %{_mandir}/man8/upowerd.8* | |
cc36b8c0 | 162 | %dir /var/lib/upower |
d0951904 | 163 | |
e24563a8 | 164 | %files libs |
d0951904 | 165 | %defattr(644,root,root,755) |
e24563a8 | 166 | %attr(755,root,root) %{_libdir}/libupower-glib.so.*.*.* |
af09a8dc | 167 | %attr(755,root,root) %ghost %{_libdir}/libupower-glib.so.3 |
e24563a8 | 168 | %{_libdir}/girepository-1.0/UPowerGlib-1.0.typelib |
58850157 PZ |
169 | |
170 | %files devel | |
171 | %defattr(644,root,root,755) | |
7f03a8d5 | 172 | %attr(755,root,root) %{_libdir}/libupower-glib.so |
7f03a8d5 | 173 | %{_datadir}/dbus-1/interfaces/org.freedesktop.UPower.Device.xml |
3f2f1e01 | 174 | %{_datadir}/dbus-1/interfaces/org.freedesktop.UPower.KbdBacklight.xml |
7f03a8d5 MB |
175 | %{_datadir}/dbus-1/interfaces/org.freedesktop.UPower.xml |
176 | %{_datadir}/gir-1.0/UPowerGlib-1.0.gir | |
7f03a8d5 | 177 | %{_includedir}/libupower-glib |
7f03a8d5 | 178 | %{_pkgconfigdir}/upower-glib.pc |
e24563a8 | 179 | |
b4534ba3 | 180 | %if %{with static_libs} |
e24563a8 JB |
181 | %files static |
182 | %defattr(644,root,root,755) | |
183 | %{_libdir}/libupower-glib.a | |
b4534ba3 | 184 | %endif |
e24563a8 | 185 | |
b4534ba3 | 186 | %if %{with apidocs} |
e24563a8 JB |
187 | %files apidocs |
188 | %defattr(644,root,root,755) | |
189 | %{_gtkdocdir}/UPower | |
b4534ba3 | 190 | %endif |