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