]>
Commit | Line | Data |
---|---|---|
f0522f98 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with elogind # elogind support (instead of systemd) | |
4 | %bcond_without systemd # systemd support | |
5 | %bcond_without static_libs # static library | |
6 | ||
7 | %if %{with elogind} | |
8 | %undefine with_systemd | |
9 | %endif | |
4baa78bc | 10 | Summary: D-Bus interface for user accounts management |
7a647270 | 11 | Summary(pl.UTF-8): Interfejs D-Bus do zarządzania kontami użytkowników |
4baa78bc | 12 | Name: accountsservice |
03928f35 JB |
13 | Version: 23.13.9 |
14 | Release: 1 | |
02295a42 | 15 | License: GPL v3+ |
4baa78bc | 16 | Group: Applications/System |
02295a42 | 17 | Source0: https://www.freedesktop.org/software/accountsservice/%{name}-%{version}.tar.xz |
03928f35 | 18 | # Source0-md5: 03dccfe1b306b7ca19743e86d118e64d |
02295a42 | 19 | URL: https://cgit.freedesktop.org/accountsservice/ |
34b44973 | 20 | BuildRequires: dbus-devel >= 1.9.18 |
4e60aced | 21 | BuildRequires: docbook-dtd412-xml |
f0522f98 | 22 | %{?with_elogind:BuildRequires: elogind-devel >= 229.4} |
90a0387f | 23 | BuildRequires: gettext-tools |
34b44973 | 24 | BuildRequires: glib2-devel >= 1:2.63.5 |
4c353993 | 25 | BuildRequires: gobject-introspection-devel >= 0.10.0 |
c408edc1 | 26 | BuildRequires: gtk-doc >= 1.15 |
34b44973 | 27 | BuildRequires: libxcrypt-devel >= 4 |
4baa78bc | 28 | BuildRequires: libxslt-progs |
34b44973 | 29 | BuildRequires: meson >= 0.50.0 |
f0522f98 | 30 | BuildRequires: ninja |
4e60aced | 31 | BuildRequires: pkgconfig |
4bad0b4d | 32 | BuildRequires: polkit-devel >= 0.102 |
34b44973 JB |
33 | BuildRequires: rpm-build >= 4.6 |
34 | BuildRequires: rpmbuild(macros) >= 1.736 | |
f0522f98 | 35 | BuildRequires: sed >= 4.0 |
34b44973 | 36 | %{?with_systemd:BuildRequires: systemd-devel >= 1:209} |
79fe1c6a | 37 | BuildRequires: tar >= 1:1.22 |
f07303a0 | 38 | BuildRequires: vala |
4baa78bc | 39 | BuildRequires: xmlto |
79fe1c6a | 40 | BuildRequires: xz |
02295a42 | 41 | Requires(post,preun,postun): systemd-units >= 1:186 |
81ef5f4a | 42 | Requires: %{name}-libs = %{version}-%{release} |
34b44973 | 43 | Requires: dbus >= 1.9.18 |
4bad0b4d | 44 | Requires: polkit >= 0.102 |
224e728c | 45 | Requires: systemd-units >= 0.38 |
79fe1c6a | 46 | Suggests: ConsoleKit |
34b44973 | 47 | Obsoletes: accountsservice-systemd < 0.6.15-5 |
4baa78bc AF |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
49 | ||
50 | %description | |
4e60aced | 51 | The AccountsService project provides: |
52 | - A set of D-Bus interfaces for querying and manipulating user account | |
53 | information. | |
54 | - An implementation of these interfaces based on the usermod(8), | |
55 | useradd(8) and userdel(8) commands. | |
4baa78bc | 56 | |
7a647270 ŁK |
57 | %description -l pl.UTF-8 |
58 | Projekt AccountsService dostarcza: | |
59 | - Zbiór interfejsów D-Bus do odpytywania i manipulowania informacjami | |
60 | o kontach użytkowników. | |
61 | - Implementacje tych interfejsów oparte o komendy usermod(8), | |
62 | useradd(8) i userdel(8). | |
63 | ||
81ef5f4a JB |
64 | %package libs |
65 | Summary: Shared accountsservice library | |
66 | Summary(pl.UTF-8): Biblioteka współdzielona accountsservice | |
67 | Group: Libraries | |
34b44973 JB |
68 | Requires: glib2 >= 1:2.63.5 |
69 | Requires: libxcrypt >= 4 | |
02295a42 | 70 | Requires: systemd-libs >= 1:186 |
81ef5f4a JB |
71 | Conflicts: accountsservice < 0.6.39 |
72 | ||
73 | %description libs | |
74 | Shared accountsservice library. | |
75 | ||
76 | %description libs -l pl.UTF-8 | |
77 | Biblioteka współdzielona accountsservice. | |
78 | ||
4baa78bc | 79 | %package devel |
81ef5f4a JB |
80 | Summary: Development files for accountsservice |
81 | Summary(pl.UTF-8): Pliki programistyczne biblioteki accountsservice | |
4baa78bc | 82 | Group: Development/Libraries |
81ef5f4a | 83 | Requires: %{name}-libs = %{version}-%{release} |
34b44973 | 84 | Requires: glib2-devel >= 1:2.63.5 |
4baa78bc AF |
85 | |
86 | %description devel | |
81ef5f4a JB |
87 | Development files for accountsservice (headers, GObject API, D-Bus |
88 | interface description). | |
4baa78bc AF |
89 | |
90 | %description devel -l pl.UTF-8 | |
81ef5f4a JB |
91 | Pliki programistyczne biblioteki accountsservice (pliki nagłówkowe, |
92 | API GObject, opis interfejsu D-Bus). | |
4baa78bc AF |
93 | |
94 | %package static | |
95 | Summary: accountsservice static library | |
96 | Summary(pl.UTF-8): Statyczna biblioteka accountsservice | |
97 | Group: Development/Libraries | |
98 | Requires: %{name}-devel = %{version}-%{release} | |
99 | ||
100 | %description static | |
101 | accountsservice static library. | |
102 | ||
103 | %description static -l pl.UTF-8 | |
104 | Statyczna biblioteka accountsservice. | |
105 | ||
34b44973 JB |
106 | %package -n vala-accountsservice |
107 | Summary: accountsservice API for Vala language | |
108 | Summary(pl.UTF-8): API accountsservice dla języka Vala | |
109 | Group: Development/Libraries | |
110 | Requires: %{name}-devel = %{version}-%{release} | |
111 | Requires: vala | |
112 | ||
113 | %description -n vala-accountsservice | |
114 | accountsservice API for Vala language. | |
115 | ||
116 | %description -n vala-accountsservice -l pl.UTF-8 | |
117 | API accountsservice dla języka Vala. | |
118 | ||
81ef5f4a JB |
119 | %package apidocs |
120 | Summary: API documentation for accountsservice | |
121 | Summary(pl.UTF-8): Dokumentacja API accountsservice | |
122 | Group: Documentation | |
123 | Requires: gtk-doc-common | |
4c7f8ac1 | 124 | BuildArch: noarch |
81ef5f4a JB |
125 | |
126 | %description apidocs | |
127 | API documentation for accountsservice. | |
128 | ||
129 | %description apidocs -l pl.UTF-8 | |
130 | Dokumentacja API accountsservice. | |
131 | ||
4baa78bc AF |
132 | %prep |
133 | %setup -q | |
134 | ||
cccd16c0 JB |
135 | # too hacky, works with bash or pdksh, but not with mksh; override version in hard way |
136 | %{__sed} -i -e '2a echo "%{version}" ; exit 0' generate-version.sh | |
137 | ||
f0522f98 JB |
138 | %if %{with static_libs} |
139 | %{__sed} -i -e 's/shared_library/library/' src/libaccountsservice/meson.build | |
140 | %endif | |
141 | ||
4baa78bc | 142 | %build |
f0522f98 JB |
143 | %meson build \ |
144 | -Dadmin_group=wheel \ | |
145 | -Ddocbook=true \ | |
146 | %{?with_elogind:-Delogind=true} \ | |
147 | -Dgtk_doc=true \ | |
34b44973 | 148 | -Dsystemdsystemunitdir=%{systemdunitdir} |
f0522f98 | 149 | |
34b44973 | 150 | %ninja_build -C build |
4baa78bc AF |
151 | |
152 | %install | |
153 | rm -rf $RPM_BUILD_ROOT | |
b1882a45 JP |
154 | install -d $RPM_BUILD_ROOT%{_datadir}/accountsservice/interfaces |
155 | ||
34b44973 | 156 | %ninja_install -C build |
4baa78bc | 157 | |
4baa78bc AF |
158 | %{__rm} $RPM_BUILD_ROOT%{_docdir}/accountsservice/spec/AccountsService.html |
159 | ||
160 | %find_lang accounts-service | |
161 | ||
162 | %clean | |
163 | rm -rf $RPM_BUILD_ROOT | |
164 | ||
224e728c | 165 | %post |
fc7cea7f | 166 | %systemd_post accounts-daemon.service |
cf4130a7 | 167 | |
224e728c | 168 | %preun |
cf4130a7 AF |
169 | %systemd_preun accounts-daemon.service |
170 | ||
224e728c | 171 | %postun |
fc7cea7f | 172 | %systemd_reload |
cf4130a7 | 173 | |
224e728c JR |
174 | %triggerpostun -- accountsservice < 0.6.15-5 |
175 | %systemd_trigger accounts-daemon.service | |
176 | ||
81ef5f4a JB |
177 | %post libs -p /sbin/ldconfig |
178 | %postun libs -p /sbin/ldconfig | |
179 | ||
4baa78bc AF |
180 | %files -f accounts-service.lang |
181 | %defattr(644,root,root,755) | |
34b44973 | 182 | %doc AUTHORS README.md TODO build/doc/dbus/AccountsService.html |
4c353993 | 183 | %attr(755,root,root) %{_libexecdir}/accounts-daemon |
224e728c | 184 | %{systemdunitdir}/accounts-daemon.service |
b1882a45 JP |
185 | %dir %{_datadir}/accountsservice |
186 | %dir %{_datadir}/accountsservice/interfaces | |
34b44973 JB |
187 | %{_datadir}/accountsservice/user-templates |
188 | %{_datadir}/dbus-1/system.d/org.freedesktop.Accounts.conf | |
4baa78bc AF |
189 | %{_datadir}/dbus-1/system-services/org.freedesktop.Accounts.service |
190 | %{_datadir}/polkit-1/actions/org.freedesktop.accounts.policy | |
607cec3c MB |
191 | %dir /var/lib/AccountsService |
192 | %dir /var/lib/AccountsService/icons | |
193 | %dir /var/lib/AccountsService/users | |
4baa78bc | 194 | |
81ef5f4a JB |
195 | %files libs |
196 | %defattr(644,root,root,755) | |
197 | %attr(755,root,root) %{_libdir}/libaccountsservice.so.*.*.* | |
198 | %attr(755,root,root) %ghost %{_libdir}/libaccountsservice.so.0 | |
199 | %{_libdir}/girepository-1.0/AccountsService-1.0.typelib | |
200 | ||
4baa78bc AF |
201 | %files devel |
202 | %defattr(644,root,root,755) | |
4baa78bc AF |
203 | %attr(755,root,root) %{_libdir}/libaccountsservice.so |
204 | %{_includedir}/accountsservice-1.0 | |
4c353993 MB |
205 | %{_pkgconfigdir}/accountsservice.pc |
206 | %{_datadir}/dbus-1/interfaces/org.freedesktop.Accounts.User.xml | |
207 | %{_datadir}/dbus-1/interfaces/org.freedesktop.Accounts.xml | |
208 | %{_datadir}/gir-1.0/AccountsService-1.0.gir | |
4baa78bc | 209 | |
f0522f98 | 210 | %if %{with static_libs} |
4baa78bc AF |
211 | %files static |
212 | %defattr(644,root,root,755) | |
213 | %{_libdir}/libaccountsservice.a | |
f0522f98 | 214 | %endif |
81ef5f4a | 215 | |
34b44973 JB |
216 | %files -n vala-accountsservice |
217 | %defattr(644,root,root,755) | |
218 | %{_datadir}/vala/vapi/accountsservice.deps | |
219 | %{_datadir}/vala/vapi/accountsservice.vapi | |
220 | ||
81ef5f4a JB |
221 | %files apidocs |
222 | %defattr(644,root,root,755) | |
223 | %{_gtkdocdir}/libaccountsservice |