%global optflags %{optflags} -Wno-parentheses
Name: trust_router
-Version: 1.3
+Version: 1.3.1
Release: 1%{?dist}
Summary: Moonshot Trust Router
BuildRequires: krb5-devel
BuildRequires: jansson-devel >= 2.4
-BuildRequires: sqlite-devel, openssl-devel
-Requires: moonshot-gss-eap
+BuildRequires: sqlite-devel, openssl-devel, libtalloc-devel
+Requires: moonshot-gss-eap, sqlite
%description
The trust router provides a mechanism for discovering the topology of
%postun libs -p /sbin/ldconfig
+%post
+id trustrouter 2>/dev/null || adduser --system -d /var/lib/trust_router trustrouter
+test -d /var/lib/trust_router ||mkdir /var/lib/trust_router
+chown trustrouter:trustrouter /var/lib/trust_router
+sqlite3 </usr/share/trust_router/schema.sql /var/lib/trust_router/keys
+chown trustrouter:trustrouter /var/lib/trust_router/keys
+chmod 660 /var/lib/trust_router/keys
+
%files
%defattr(-,root,root,-)
%doc README
%{_bindir}/*
%{_datadir}/trust_router/schema.sql
-/lib/systemd/system/tids.service
+#/lib/systemd/system/tids.service
%files libs
%defattr(-,root,root,-)