Release 1.3.1 for stable point for Debian
[trust_router.git] / trust_router.spec
index 58e9c4c..0752ea0 100644 (file)
@@ -1,5 +1,6 @@
+%global optflags %{optflags} -Wno-parentheses
 Name:           trust_router
-Version:        1.2
+Version:        1.3.1
 Release:        1%{?dist}
 Summary:        Moonshot Trust Router
 
@@ -11,8 +12,8 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 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
@@ -62,11 +63,21 @@ rm -rf $RPM_BUILD_ROOT
 
 %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
 
 %files libs
 %defattr(-,root,root,-)