8ee6300506f1ed8020e406762a96e10244039705
[profile/ivi/gsignond.git] / packaging / gsignond.spec
1 # define used dbus type [p2p, session, system]
2 %define dbus_type p2p
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 Name: gsignond
8 Summary: GLib based Single Sign-On daemon
9 Version: 0.0.3
10 Release: 1
11 Group: System/Daemons
12 License: LGPL-2.1+
13 Source: %{name}-%{version}.tar.gz
14 Provides: gsignon
15 %if %{dbus_type} != "p2p"
16 Requires: dbus-1
17 %endif
18 Requires(post): /sbin/ldconfig
19 Requires(postun): /sbin/ldconfig
20 BuildRequires: pkgconfig(dbus-1)
21 BuildRequires: pkgconfig(glib-2.0) >= 2.30
22 BuildRequires: pkgconfig(gobject-2.0)
23 BuildRequires: pkgconfig(gio-2.0)
24 BuildRequires: pkgconfig(gio-unix-2.0)
25 BuildRequires: pkgconfig(gmodule-2.0)
26 BuildRequires: pkgconfig(sqlite3)
27
28
29 %description
30 %{summary}.
31
32
33 %package devel
34 Summary:    Development files for %{name}
35 Group:      Development/Libraries
36 Requires:   %{name} = %{version}-%{release}
37
38 %description devel
39 %{summary}.
40
41
42 %package doc
43 Summary:    Documentation files for %{name}
44 Group:      Development/Libraries
45 Requires:   %{name} = %{version}-%{release}
46
47 %description doc
48 %{summary}.
49
50
51 %prep
52 %setup -q -n %{name}-%{version}
53 if [ -f = "gtk-doc.make" ]
54 then
55 rm gtk-doc.make
56 fi
57 touch gtk-doc.make
58 autoreconf -f -i
59
60
61 %build
62 %if %{debug_build} == 1
63 %configure --enable-dbus-type=%{dbus_type} --enable-debug
64 %else
65 %configure --enable-dbus-type=%{dbus_type}
66 %endif
67
68 make %{?_smp_mflags}
69
70
71 %install
72 rm -rf %{buildroot}
73 %make_install
74
75
76 %post
77 /sbin/ldconfig
78 chmod u+s %{_bindir}/%{name}
79 groupadd -f -r gsignond
80
81
82 %postun -p /sbin/ldconfig
83
84
85 %files
86 %defattr(-,root,root,-)
87 %doc AUTHORS COPYING.LIB INSTALL NEWS README
88 %{_bindir}/%{name}
89 %{_bindir}/%{name}-plugind
90 %{_libdir}/lib%{name}-*.so.*
91 %{_libdir}/%{name}/extensions/*.so*
92 %{_libdir}/%{name}/plugins/*.so*
93 %if %{dbus_type} != "p2p"
94 %{_datadir}/dbus-1/services/*SingleSignOn*.service
95 %endif
96 %config(noreplace) %{_sysconfdir}/gsignond.conf
97
98
99 %files devel
100 %defattr(-,root,root,-)
101 %{_includedir}/%{name}/*.h
102 %{_libdir}/lib%{name}-*.so
103 %{_libdir}/pkgconfig/%{name}.pc
104 %if %{dbus_type} != "p2p"
105 %{_datadir}/dbus-1/interfaces/*SSO*.xml
106 %endif
107
108
109 %files doc
110 %defattr(-,root,root,-)
111 %{_datadir}/gtk-doc/html/gsignond/*
112