Added test coverage result generation
[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.1
11 Release: 1
12 Group: System/Libraries
13 License: LGPL-2.1+
14 Source: %{name}-%{version}.tar.gz
15 URL: https://github.com/01org/gumd
16 %if %{dbus_type} != "p2p"
17 Requires: dbus-1
18 %endif
19 Requires(post): /sbin/ldconfig
20 Requires(postun): /sbin/ldconfig
21 BuildRequires: pkgconfig(systemd)
22 BuildRequires: pkgconfig(dbus-1)
23 BuildRequires: pkgconfig(gtk-doc)
24 BuildRequires: pkgconfig(glib-2.0) >= 2.30
25 BuildRequires: pkgconfig(gobject-2.0)
26 BuildRequires: pkgconfig(gio-2.0)
27 BuildRequires: pkgconfig(gio-unix-2.0)
28 BuildRequires: pkgconfig(gmodule-2.0)
29
30
31 %description
32 %{summary}.
33
34
35 %package -n libgum-common
36 Summary:    User management common library
37 Group:      System/Libraries
38
39
40 %description -n libgum-common
41 %{summary}.
42
43
44 %package -n libgum-common-devel
45 Summary:    Development files for user management common library
46 Group:      Development/Libraries
47 Requires:   libgum-common = %{version}-%{release}
48
49
50 %description -n libgum-common-devel
51 %{summary}.
52
53
54 %package %{name}
55 Summary:    User management daemon
56 Group:      System/Daemons
57 Requires:   libgum-common = %{version}-%{release}
58
59
60 %description %{name}
61 %{summary}.
62
63
64 %package -n %{name}-devel
65 Summary:    Development files for user management daemon
66 Group:      Development/Daemons
67 Requires:   %{name} = %{version}-%{release}
68 Requires:   libgum-common-devel = %{version}-%{release}
69
70 %description -n %{name}-devel
71 %{summary}.
72
73
74 %package -n libgum
75 Summary:    User management client library
76 Group:      System/Libraries
77 Requires:   libgum-common = %{version}-%{release}
78
79
80 %description -n libgum
81 %{summary}.
82
83
84 %package -n libgum-devel
85 Summary:    Development files for user management client library
86 Group:      Development/Libraries
87 Requires:   libgum = %{version}-%{release}
88 Requires:   libgum-common-devel = %{version}-%{release}
89
90
91 %description -n libgum-devel
92 %{summary}.
93
94
95 %package doc
96 Summary:    Documentation files for %{name}
97 Group:      Development/Libraries
98 Requires:   libgum = %{version}-%{release}
99
100
101 %description doc
102 %{summary}.
103
104
105 %prep
106 %setup -q -n %{name}-%{version}
107
108
109 %build
110 %if %{debug_build} == 1
111 %configure --enable-dbus-type=%{dbus_type} --enable-debug
112 %else
113 %configure --enable-dbus-type=%{dbus_type}
114 %endif
115
116
117 make %{?_smp_mflags}
118
119
120 %install
121 rm -rf %{buildroot}
122 %make_install
123
124
125 %post
126 /sbin/ldconfig
127 chmod u+s %{_bindir}/%{name}
128 groupadd -f -r gumd
129
130
131 %postun -p /sbin/ldconfig
132
133
134 %files -n libgum-common
135 %defattr(-,root,root,-)
136 %{_libdir}/libgum-common*.so.*
137
138
139 %files -n libgum-common-devel
140 %defattr(-,root,root,-)
141 %{_includedir}/gum/common/*
142 %{_libdir}/libgum-common*.so
143 %{_libdir}/libgum-common*.la
144 %{_libdir}/pkgconfig/libgum-common.pc
145 %config(noreplace) %{_sysconfdir}/gum.conf
146 %if %{dbus_type} != "p2p"
147 %{_datadir}/dbus-1/interfaces/*UserManagement*.xml
148 %endif
149
150
151 %files %{name}
152 %defattr(-,root,root,-)
153 %doc AUTHORS COPYING.LIB INSTALL NEWS README
154 %{_bindir}/%{name}
155 %if %{dbus_type} == "session"
156 %dir %{_datadir}/dbus-1/services
157 %{_datadir}/dbus-1/services/*UserManagement*.service
158 %else if %{dbus_type} == "system"
159 %dir %{_datadir}/dbus-1/system-services
160 %{_datadir}/dbus-1/system-services/*UserManagement*.service
161 %dir %{_sysconfdir}/dbus-1
162 %dir %{_sysconfdir}/dbus-1/system.d
163 %config(noreplace) %{_sysconfdir}/dbus-1/system.d/gumd-dbus.conf
164 %endif
165
166
167 %files -n %{name}-devel
168 %defattr(-,root,root,-)
169 %{_libdir}/pkgconfig/%{name}.pc
170
171
172 %files -n libgum
173 %defattr(-,root,root,-)
174 %{_libdir}/libgum.so.*
175
176
177 %files -n libgum-devel
178 %defattr(-,root,root,-)
179 %{_includedir}/gum/*.h
180 %{_libdir}/libgum.so
181 %{_libdir}/libgum.la
182 %{_libdir}/pkgconfig/libgum.pc
183 %{_bindir}/gum-example
184
185
186 %files doc
187 %defattr(-,root,root,-)
188 %{_datadir}/gtk-doc/html/gumd/*
189
190
191 %changelog
192 * Mon Dec 23 2013 Imran Zaman <imran.zaman@intel.com>
193 - added test cases for error and dictionary objects
194 - utilized dictionary functions for get/set key-value pairs
195 - clean up generated coverage files on make clean
196 - enable tests by default if coverage is enabled
197 - exclude external and generated dbus files from code coverage calculation
198
199 * Fri Dec 20 2013 Imran Zaman <imran.zaman@intel.com>
200 - Corrected spec and changes file names 
201
202 * Fri Dec 20 2013 Imran Zaman <imran.zaman@intel.com>
203 - Removed dist spec packaging folder from main source tree
204
205 * Fri Dec 20 2013 Imran Zaman <imran.zaman@intel.com>
206 - Release 0.0.1 (First release)
207
208 * Mon Sep 02 2013 Imran Zaman <imran.zaman@intel.com>
209 - Initial RPM packaging