1 # define used dbus type [p2p, system]
2 %define dbus_type system
3 # enable debug features such as control environment variables
4 # WARNING! do not use for production builds as it will break security
8 Summary: User management daemon and client library
11 Group: Security/Accounts
13 URL: https://github.com/01org/gumd
14 Source: %{name}-%{version}.tar.gz
15 Source1001: %{name}.manifest
16 Source1002: libgum.manifest
17 Requires: libgum = %{version}-%{release}
19 %if %{dbus_type} != "p2p"
22 Requires(post): /sbin/ldconfig
23 Requires(postun): /sbin/ldconfig
24 BuildRequires: pkgconfig(systemd)
25 BuildRequires: pkgconfig(dbus-1)
26 BuildRequires: pkgconfig(gtk-doc)
27 BuildRequires: pkgconfig(glib-2.0) >= 2.30
28 BuildRequires: pkgconfig(gobject-2.0)
29 BuildRequires: pkgconfig(gio-2.0)
30 BuildRequires: pkgconfig(gio-unix-2.0)
31 BuildRequires: pkgconfig(gmodule-2.0)
32 Requires: tizen-platform-config
39 Summary: User management client library
40 Group: Security/Libraries
41 Requires: %{name} = %{version}-%{release}
44 %description -n libgum
49 Summary: User management utility tool
50 Group: Security/Libraries
51 Requires: libgum = %{version}-%{release}
54 %description -n gum-utils
58 %package -n libgum-devel
59 Summary: Development files for user management client library
60 Group: Security/Libraries
61 Requires: libgum = %{version}-%{release}
64 %description -n libgum-devel
69 Summary: Documentation files for %{name}
70 Group: Security/Documentation
71 Requires: libgum = %{version}-%{release}
79 %setup -q -n %{name}-%{version}
80 cp -a %{SOURCE1001} %{name}.manifest
81 cp -a %{SOURCE1002} libgum.manifest
85 %if %{debug_build} == 1
86 %configure --enable-dbus-type=%{dbus_type} --enable-debug
88 %configure --enable-dbus-type=%{dbus_type}
90 %__make %{?_smp_mflags}
95 rm -f %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
96 install -m 755 -d %{buildroot}%{_sysconfdir}/%{name}
97 install -m 644 data/tizen/etc/%{name}/%{name}-tizen-common.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
101 getent group gumd > /dev/null || groupadd -r gumd
102 install -d -m 755 %{_sysconfdir}/%{name}/useradd.d
103 install -d -m 755 %{_sysconfdir}/%{name}/userdel.d
104 install -d -m 755 %{_sysconfdir}/%{name}/groupadd.d
105 install -d -m 755 %{_sysconfdir}/%{name}/groupdel.d
106 install -d -m 755 %{_localstatedir}/lib/%{name}/user
109 %postun -p /sbin/ldconfig
111 %post -n libgum -p /sbin/ldconfig
112 %postun -n libgum -p /sbin/ldconfig
115 %defattr(-,root,root,-)
116 %manifest libgum.manifest
117 %{_libdir}/libgum*.so.*
120 %defattr(-,root,root,-)
121 %manifest %{name}.manifest
124 %files -n libgum-devel
125 %defattr(-,root,root,-)
126 %manifest %{name}.manifest
128 %{_libdir}/libgum*.so
129 %{_libdir}/pkgconfig/libgum.pc
130 %if %{dbus_type} != "p2p"
131 %{_datadir}/dbus-1/interfaces/*UserManagement*.xml
135 %defattr(-,root,root,-)
136 %manifest %{name}.manifest
137 %doc AUTHORS COPYING.LIB NEWS README
139 %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
140 %if %{dbus_type} == "system"
141 %dir %{_datadir}/dbus-1/system-services
142 %{_datadir}/dbus-1/system-services/*UserManagement*.service
143 %dir %{_sysconfdir}/dbus-1
144 %dir %{_sysconfdir}/dbus-1/system.d
145 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/gumd-dbus.conf
149 %defattr(-,root,root,-)
150 %manifest %{name}.manifest
151 %{_datadir}/gtk-doc/html/gumd/*