Side by side installs, and separate -schemas package.
[shibboleth/cpp-opensaml.git] / opensaml.spec.in
1 Name:           @PACKAGE_NAME@
2 Version:        @PACKAGE_VERSION@
3 Release:        1
4 Summary:    OpenSAML SAML library
5 Group:          System Environment/Libraries
6 Vendor:         Internet2
7 License:        Apache 2.0
8 URL:            http://www.opensaml.org/
9 Source0:        %{name}-%{version}.tar.gz
10 BuildRoot:      %{_tmppath}/%{name}-%{version}-root
11 %if 0%{?suse_version} > 1030
12 BuildRequires:  libXerces-c-devel >= 2.8.0
13 %else
14 BuildRequires:  libxerces-c-devel >= 2.8.0
15 %endif
16 BuildRequires:  libxml-security-c-devel >= 1.4.0
17 BuildRequires:  libxmltooling-devel >= 1.4
18 %{?_with_log4cpp:BuildRequires: liblog4cpp-devel >= 1.0}
19 %{!?_with_log4cpp:BuildRequires: liblog4shib-devel}
20 BuildRequires:  gcc-c++
21 %{!?_without_doxygen:BuildRequires: doxygen}
22 %if "%{_vendor}" == "redhat"
23 BuildRequires: redhat-rpm-config
24 %endif
25
26 %if "%{_vendor}" == "suse"
27 %define pkgdocdir %{_docdir}/%{name}
28 %else
29 %define pkgdocdir %{_docdir}/%{name}-%{version}
30 %endif
31
32 %description
33 OpenSAML is an open source implementation of the OASIS Security Assertion
34 Markup Language Specification. It contains a set of open source C++ classes
35 that support the SAML 1.0, 1.1, and 2.0 specifications.
36
37 %package -n @PACKAGE_NAME@-bin
38 Summary:    Utilities for OpenSAML library
39 Group:      Development/Libraries
40
41 %description -n @PACKAGE_NAME@-bin
42 OpenSAML is an open source implementation of the OASIS Security Assertion
43 Markup Language Specification. It contains a set of open source C++ classes
44 that support the SAML 1.0, 1.1, and 2.0 specifications.
45
46 This package contains the utility programs.
47
48 %package -n libsaml7
49 Summary:    OpenSAML SAML library
50 Group:      Development/Libraries
51 Provides:   @PACKAGE_NAME@ = %{version}
52 Obsoletes:  @PACKAGE_NAME@
53
54 %description -n libsaml7
55 OpenSAML is an open source implementation of the OASIS Security Assertion
56 Markup Language Specification. It contains a set of open source C++ classes
57 that support the SAML 1.0, 1.1, and 2.0 specifications.
58
59 This package contains just the shared library.
60
61 %package -n libsaml-devel
62 Summary:        OpenSAML development Headers
63 Group:          Development/Libraries
64 Requires:       libsaml7 = %version
65 Provides:       @PACKAGE_NAME@-devel = %{version}
66 Obsoletes:      @PACKAGE_NAME@-devel
67 %if 0%{?suse_version} > 1030
68 BuildRequires:  libXerces-c-devel >= 2.8.0
69 %else
70 BuildRequires:  libxerces-c-devel >= 2.8.0
71 %endif
72 Requires: libxml-security-c-devel >= 1.4.0
73 Requires: libxmltooling-devel >= 1.4
74 %{?_with_log4cpp:Requires: liblog4cpp-devel >= 1.0}
75 %{!?_with_log4cpp:Requires: liblog4shib-devel}
76
77 %description -n libsaml-devel
78 OpenSAML is an open source implementation of the OASIS Security Assertion
79 Markup Language Specification. It contains a set of open source C++ classes
80 that support the SAML 1.0, 1.1, and 2.0 specifications.
81
82 This package includes files needed for development with OpenSAML.
83
84 %package -n @PACKAGE_NAME@-schemas
85 Summary:        OpenSAML schemas and catalog
86 Group:          Development/Libraries
87
88 %description -n @PACKAGE_NAME@-schemas
89 OpenSAML is an open source implementation of the OASIS Security Assertion
90 Markup Language Specification. It contains a set of open source C++ classes
91 that support the SAML 1.0, 1.1, and 2.0 specifications.
92
93 This package includes XML schemas and related files.
94
95 %prep
96 %setup -q
97
98 %build
99 %configure %{?saml_options}
100 %{__make}
101
102 %install
103 %{__make} install DESTDIR=$RPM_BUILD_ROOT pkgdocdir=%{pkgdocdir}
104 # Don't package unit tester if present.
105 %{__rm} -f $RPM_BUILD_ROOT/%{_bindir}/samltest
106
107 %check
108 %{__make} check
109
110 %clean
111 [ "$RPM_BUILD_ROOT" != "/" ] && %{__rm} -rf $RPM_BUILD_ROOT
112
113 %ifnos solaris2.8 solaris2.9 solaris2.10
114 %post -n libsaml7 -p /sbin/ldconfig
115 %endif
116
117 %ifnos solaris2.8 solaris2.9 solaris2.10
118 %postun -n libsaml7 -p /sbin/ldconfig
119 %endif
120
121 %files -n @PACKAGE_NAME@-bin
122 %defattr(-,root,root,-)
123 %{_bindir}/samlsign
124
125 %files -n libsaml7
126 %defattr(-,root,root,-)
127 %{_libdir}/libsaml.so.*
128
129 %files -n @PACKAGE_NAME@-schemas
130 %defattr(-,root,root,-)
131 %dir %{_datadir}/xml/@PACKAGE_NAME@
132 %{_datadir}/xml/@PACKAGE_NAME@/*
133
134 %files -n libsaml-devel
135 %defattr(-,root,root,-)
136 %{_includedir}/*
137 %{_libdir}/*.so
138 %{_libdir}/pkgconfig/@PACKAGE_NAME@.pc
139 %doc %{pkgdocdir}
140
141 %changelog
142 * Fri Dec 25 2009   Scott Cantor  <cantor.2@osu.edu>  - 2.4-1
143 - Add pkg-config support.
144 - Sync package names for side by side install.
145
146 * Mon Aug 31 2009   Scott Cantor  <cantor.2@osu.edu>  - 2.3-1
147 - Bump soname for SUSE packaging.
148
149 * Sat Aug 8 2009  Scott Cantor  <cantor.2@osu.edu>  - 2.2.1-1
150 - SuSE conventions
151 - Stop packaging unit tester
152
153 * Wed Dec 3 2008  Scott Cantor  <cantor.2@osu.edu>  - 2.2-1
154 - Bumping for minor update.
155 - Fixing SUSE Xerces dependency name.
156
157 * Tue Jul 1 2008  Scott Cantor  <cantor.2@osu.edu>  - 2.1-1
158 - Bumping for minor update.
159
160 * Mon Mar 17 2008  Scott Cantor  <cantor.2@osu.edu>  - 2.0-6
161 - Official release.
162
163 * Fri Jan 18 2008  Scott Cantor  <cantor.2@osu.edu>  - 2.0-5
164 - Release candidate 1.
165
166 * Thu Nov 08 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-4
167 - Second public beta.
168
169 * Thu Aug 16 2007 Scott Cantor  <cantor.2@osu.edu>  - 2.0-3
170 - First public beta.
171
172 * Fri Jul 13 2007  Scott Cantor  <cantor.2@osu.edu>  - 2.0-2
173 - Second alpha.
174
175 * Sun Apr 16 2007  Scott Cantor  <cantor.2@osu.edu>  - 2.0-1
176 - First SPEC file for 2.0.