Added support for scripts which can be run after a user/group is added
[platform/upstream/gumd.git] / dists / rpm / gum-suse.spec
1 # define used dbus type [p2p, session, 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
5 %define debug_build 0
6
7
8 Name: gumd
9 Summary: User management daemon and client library
10 Version: 0.0.4
11 Release: 2
12 Group: System/Daemons
13 License: LGPL-2.1+
14 Source: %{name}-%{version}.tar.gz
15 URL: https://github.com/01org/gumd
16 Requires:   libgum = %{version}-%{release}
17 %if %{dbus_type} != "p2p"
18 Requires: dbus-1
19 %endif
20 Requires(post): /sbin/ldconfig
21 Requires(postun): /sbin/ldconfig
22 BuildRequires: pkgconfig(systemd)
23 BuildRequires: pkgconfig(dbus-1)
24 BuildRequires: pkgconfig(gtk-doc)
25 BuildRequires: pkgconfig(glib-2.0) >= 2.30
26 BuildRequires: pkgconfig(gobject-2.0)
27 BuildRequires: pkgconfig(gio-2.0)
28 BuildRequires: pkgconfig(gio-unix-2.0)
29 BuildRequires: pkgconfig(gmodule-2.0)
30
31
32 %description
33 %{summary}.
34
35
36 %package -n libgum
37 Summary:    User management client library
38 Group:      System/Libraries
39
40
41 %description -n libgum
42 %{summary}.
43
44
45 %package -n libgum-devel
46 Summary:    Development files for user management client library
47 Group:      Development/Libraries
48 Requires:   libgum = %{version}-%{release}
49
50
51 %description -n libgum-devel
52 %{summary}.
53
54
55 %package doc
56 Summary:    Documentation files for %{name}
57 Group:      Development/Libraries
58 Requires:   libgum = %{version}-%{release}
59
60
61 %description doc
62 %{summary}.
63
64
65 %prep
66 %setup -q -n %{name}-%{version}
67
68
69 %build
70 %if %{debug_build} == 1
71 %configure --enable-dbus-type=%{dbus_type} --enable-debug
72 %else
73 %configure --enable-dbus-type=%{dbus_type}
74 %endif
75
76
77 make %{?_smp_mflags}
78
79
80 %install
81 rm -rf %{buildroot}
82 %make_install
83
84
85 %post
86 /sbin/ldconfig
87 chmod u+s %{_bindir}/%{name}
88 groupadd -f -r gumd
89 mkdir -p %{_sysconfdir}/%{name}/useradd.d
90 mkdir -p %{_sysconfdir}/%{name}/userdel.d
91 mkdir -p %{_sysconfdir}/%{name}/groupadd.d
92 mkdir -p %{_sysconfdir}/%{name}/groupdel.d
93
94
95 %postun -p /sbin/ldconfig
96
97
98 %files -n libgum
99 %defattr(-,root,root,-)
100 %{_libdir}/libgum*.so.*
101 %{_bindir}/gum-utils
102
103
104 %files -n libgum-devel
105 %defattr(-,root,root,-)
106 %{_includedir}/gum/*
107 %{_libdir}/libgum*.so
108 %{_libdir}/libgum*.la
109 %{_libdir}/pkgconfig/libgum.pc
110 %if %{dbus_type} != "p2p"
111 %{_datadir}/dbus-1/interfaces/*UserManagement*.xml
112 %endif
113
114
115 %files
116 %defattr(-,root,root,-)
117 %doc AUTHORS COPYING.LIB INSTALL NEWS README
118 %{_bindir}/%{name}
119 %config(noreplace) %{_sysconfdir}/%{name}/gumd.conf
120 %if %{dbus_type} == "session"
121 %dir %{_datadir}/dbus-1/services
122 %{_datadir}/dbus-1/services/*UserManagement*.service
123 %else if %{dbus_type} == "system"
124 %dir %{_datadir}/dbus-1/system-services
125 %{_datadir}/dbus-1/system-services/*UserManagement*.service
126 %dir %{_sysconfdir}/dbus-1
127 %dir %{_sysconfdir}/dbus-1/system.d
128 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/gumd-dbus.conf
129 %endif
130
131
132 %files doc
133 %defattr(-,root,root,-)
134 %{_datadir}/gtk-doc/html/gumd/*
135
136
137 %changelog
138 * Thu Aug 21 2014 Imran Zaman <imran.zaman@intel.com>
139 - Added support for scripts which can be run after a user/group is added
140   or before a user/group is deleted
141
142 * Tue Aug 12 2014 Imran Zaman <imran.zaman@intel.com>
143 - Fix access permissions for user home directory
144
145 * Tue Aug 05 2014 Imran Zaman <imran.zaman@intel.com>
146 - Log only when logging is enabled
147 - Fixed p2p stream descriptor leak
148
149 * Thu May 22 2014 Imran Zaman <imran.zaman@intel.com>
150 - Renamed gum-example as gum-utils to be used as command line utility
151
152 * Wed May 21 2014 Imran Zaman <imran.zaman@intel.com>
153 - Fixed Bug # TIVI-2988
154 - Updated logs
155
156 * Tue May 20 2014 Imran Zaman <imran.zaman@intel.com>
157 - Fixed bug#TIVI-3170 (fixed smack labels for newly created files and folders
158   as reported in https://bugs.tizen.org/jira/browse/TIVI-3170)
159
160 * Wed Feb 12 2014 Imran Zaman <imran.zaman@intel.com>
161 - Simplified gumd packages
162
163 * Mon Dec 23 2013 Imran Zaman <imran.zaman@intel.com>
164 - added test cases for error and dictionary objects
165 - utilized dictionary functions for get/set key-value pairs
166 - clean up generated coverage files on make clean
167 - enable tests by default if coverage is enabled
168 - exclude external and generated dbus files from code coverage calculation
169
170 * Fri Dec 20 2013 Imran Zaman <imran.zaman@intel.com>
171 - Corrected spec and changes file names 
172
173 * Fri Dec 20 2013 Imran Zaman <imran.zaman@intel.com>
174 - Removed dist spec packaging folder from main source tree
175
176 * Fri Dec 20 2013 Imran Zaman <imran.zaman@intel.com>
177 - Release 0.0.1 (First release)
178
179 * Mon Sep 02 2013 Imran Zaman <imran.zaman@intel.com>
180 - Initial RPM packaging