source: raptor-distribution/RPMs/raptor-server/trunk/raptor-server-1.0.0-6.spec @ 1660

Revision 1660, 2.7 KB checked in by rhyssmith, 5 years ago (diff)

Adding raptor-server v1-r6-1 RPM sources

Line 
1Name:          raptor-server
2Version:       1.0.0
3Release:       6
4Summary:       MUA and Web components of the Raptor Software Suite
5Group:         Productivity/Other
6License:       Apache 2.0
7URL:           http://iam.cf.ac.uk/Raptor
8Source:        %{name}-%{version}.zip
9BuildArch:     noarch
10BuildRoot:     %{_tmppath}/%{name}-%{version}-build
11
12BuildRequires: unzip
13Requires:      java >= 1.6.0
14Requires:      raptor-mua = 1.0.1
15Requires:      raptor-web = 1.0.1
16
17
18
19%description
20Raptor is a software tool designed to report upon authentication
21information for access management systems such as the Shibboleth IdP
22and EZproxy. This is a metapackage that installs the MUA and Web
23components of Raptor.
24
25
26
27%prep
28
29# Remove anything that already exists, unzip source, and cd into it
30%{__rm} -rf %{name}-%{version}
31%{__unzip} -q %{_sourcedir}/%{name}-%{version}.zip
32cd %{name}-%{version}
33
34
35 
36%build
37# Nothing to do
38
39
40 
41%install
42
43# Create fixed-location directories in /opt
44install -d %{buildroot}/opt/raptor/server
45
46# Install fixed-location files to correct locations
47cp -r %{_builddir}/%{name}-%{version}/version.txt %{buildroot}/opt/raptor/server/version.txt
48
49
50 
51%clean
52
53# Remove everything in the buildroot
54[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
55
56 
57 
58%post
59
60# Once the RPMs are installed, key exchange between each component should take place
61# But only if installing, not ugprading!
62if [ $1 == 1 ] ; then
63
64    # Only run these commands if keytool exists
65    if command -v keytool > /dev/null; then
66
67        # Swap keys between MUA and Web
68        keytool -import -noprompt -keystore /opt/raptor/web/keys/authorised-keys.jks -storepass changeit -alias raptormua -file /opt/raptor/mua/keys/raptor-mua-public.crt
69        keytool -import -noprompt -keystore /opt/raptor/mua/keys/authorised-keys.jks -storepass changeit -alias raptorweb -file /opt/raptor/web/keys/raptor-web-public.crt
70    else
71        echo ERROR: keytool command not found - automatic certificate exchange has not taken place and must be performed manually!
72    fi
73fi
74 
75 
76 
77%preun
78
79
80 
81%postun
82
83 
84%files
85
86%defattr(-,root,root,-)
87%dir /opt/raptor
88%dir /opt/raptor/server
89/opt/raptor/server/version.txt
90
91%changelog
92* Mon Dec 19 2011  Rhys Smith <smith@cardiff.ac.uk>  1.0.0-6
93- Bumped raptor-mua, and raptor-web to v1.0.1
94
95* Mon Dec 05 2011  Rhys Smith <smith@cardiff.ac.uk>  1.0.0-5
96- Bumped raptor-mua, and raptor-web to v1.0.0
97
98* Wed Sep 28 2011  Rhys Smith <smith@cardiff.ac.uk>  1.0.0-4
99- Bumped raptor-mua to v0.2.1
100
101* Sat Sep 17 2011  Rhys Smith <smith@cardiff.ac.uk>  1.0.0-3
102- Bumped raptor-mua and raptor-web to v0.2.0
103
104* Fri Jun 3 2011  Rhys Smith <smith@cardiff.ac.uk>  1.0.0-2
105- Bumped raptor-mua and raptor-web to v0.1.1
106
107* Mon May 16 2011  Rhys Smith <smith@cardiff.ac.uk>  1.0.0-1
108- First version.
Note: See TracBrowser for help on using the repository browser.