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
12 License: LGPL-2.1+ and GPL-3.0+ and GPL-3.0-with-autoconf-exception
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 BuildRequires: pkgconfig(libtzplatform-config)
33 Requires: tizen-platform-config
40 Summary: User management client library
41 Group: Security/Libraries
42 Requires: %{name} = %{version}-%{release}
45 %description -n libgum
50 Summary: User management utility tool
51 Group: Security/Libraries
52 Requires: libgum = %{version}-%{release}
55 %description -n gum-utils
59 %package -n libgum-devel
60 Summary: Development files for user management client library
61 Group: Security/Libraries
62 Requires: libgum = %{version}-%{release}
65 %description -n libgum-devel
70 Summary: Documentation files for %{name}
71 Group: Security/Documentation
72 Requires: libgum = %{version}-%{release}
80 %setup -q -n %{name}-%{version}
81 cp -a %{SOURCE1001} %{name}.manifest
82 cp -a %{SOURCE1002} libgum.manifest
86 %if %{debug_build} == 1
87 %configure --enable-dbus-type=%{dbus_type} --enable-debug
89 %configure --enable-dbus-type=%{dbus_type}
91 %__make %{?_smp_mflags}
96 rm -f %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
97 install -m 755 -d %{buildroot}%{_sysconfdir}/%{name}
98 install -m 644 data/tizen/etc/%{name}/%{name}-tizen-common.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
102 getent group gumd > /dev/null || groupadd -r gumd
103 install -d -m 755 %{_sysconfdir}/%{name}/useradd.d
104 install -d -m 755 %{_sysconfdir}/%{name}/userdel.d
105 install -d -m 755 %{_sysconfdir}/%{name}/groupadd.d
106 install -d -m 755 %{_sysconfdir}/%{name}/groupdel.d
107 install -d -m 755 %{_localstatedir}/lib/%{name}/user
110 %postun -p /sbin/ldconfig
112 %post -n libgum -p /sbin/ldconfig
113 %postun -n libgum -p /sbin/ldconfig
116 %defattr(-,root,root,-)
117 %manifest libgum.manifest
118 %{_libdir}/libgum*.so.*
121 %defattr(-,root,root,-)
122 %manifest %{name}.manifest
125 %files -n libgum-devel
126 %defattr(-,root,root,-)
127 %manifest %{name}.manifest
129 %{_libdir}/libgum*.so
130 %{_libdir}/pkgconfig/libgum.pc
131 %if %{dbus_type} != "p2p"
132 %{_datadir}/dbus-1/interfaces/*UserManagement*.xml
136 %defattr(-,root,root,-)
137 %manifest %{name}.manifest
138 %doc AUTHORS COPYING.LIB NEWS README
140 %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
141 %if %{dbus_type} == "system"
142 %dir %{_datadir}/dbus-1/system-services
143 %{_datadir}/dbus-1/system-services/*UserManagement*.service
144 %dir %{_sysconfdir}/dbus-1
145 %dir %{_sysconfdir}/dbus-1/system.d
146 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/gumd-dbus.conf
150 %defattr(-,root,root,-)
151 %manifest %{name}.manifest
152 %{_datadir}/gtk-doc/html/gumd/*