Fix Coverity defects
[platform/upstream/xmlsec1.git] / xmlsec.spec.in
1 Summary: Library providing support for "XML Signature" and "XML Encryption" standards
2 Name: @PACKAGE@
3 Version: @VERSION@
4 Release: 1
5 License: MIT
6 Group: Development/Libraries
7 Vendor: Aleksey Sanin <aleksey@aleksey.com>
8 Distribution:  Aleksey Sanin <aleksey@aleksey.com>
9 Packager: Aleksey Sanin <aleksey@aleksey.com>
10 Source: ftp://ftp.aleksey.com/pub/xmlsec/releases/@PACKAGE@-%{version}.tar.gz
11 BuildRoot: %{_tmppath}/@PACKAGE@-%{version}-root
12 URL: http://www.aleksey.com/xmlsec
13 Requires: libxml2 >= @LIBXML_MIN_VERSION@
14 Requires: libxslt >= @LIBXSLT_MIN_VERSION@
15 Requires: libtool-ltdl
16 BuildRequires: libxml2-devel >= @LIBXML_MIN_VERSION@
17 BuildRequires: libxslt-devel >= @LIBXSLT_MIN_VERSION@
18 Prefix: %{_prefix}
19 Docdir: %{_docdir}
20
21 %define _unpackaged_files_terminate_build  0 
22 %define _missing_doc_files_terminate_build 0
23
24 %description
25 XML Security Library is a C library based on LibXML2  and OpenSSL. 
26 The library was created with a goal to support major XML security 
27 standards "XML Digital Signature" and "XML Encryption". 
28
29 %package devel 
30 Summary: Libraries, includes, etc. to develop applications with XML Digital Signatures and XML Encryption support.
31 Group: Development/Libraries 
32 Requires: xmlsec1 = %{version}
33 Requires: libxml2-devel >= @LIBXML_MIN_VERSION@
34 Requires: libxslt-devel >= @LIBXSLT_MIN_VERSION@
35 Requires: openssl-devel >= @OPENSSL_MIN_VERSION@
36 Requires: zlib-devel
37 Requires: libtool-ltdl-devel
38
39 %description devel
40 Libraries, includes, etc. you can use to develop applications with XML Digital 
41 Signatures and XML Encryption support.
42
43 %package openssl
44 Summary: OpenSSL crypto plugin for XML Security Library
45 Group: Development/Libraries 
46 Requires: xmlsec1 = %{version}
47 Requires: libxml2 >= @LIBXML_MIN_VERSION@
48 Requires: libxslt >= @LIBXSLT_MIN_VERSION@
49 Requires: openssl >= @OPENSSL_MIN_VERSION@
50 BuildRequires: openssl-devel >= @OPENSSL_MIN_VERSION@
51
52 %description openssl
53 OpenSSL plugin for XML Security Library provides OpenSSL based crypto services
54 for the xmlsec library
55
56 %package openssl-devel
57 Summary: OpenSSL crypto plugin for XML Security Library
58 Group: Development/Libraries 
59 Requires: xmlsec1 = %{version}
60 Requires: xmlsec1-devel = %{version}
61 Requires: xmlsec1-openssl = %{version}
62 Requires: libxml2-devel >= @LIBXML_MIN_VERSION@
63 Requires: libxslt-devel >= @LIBXSLT_MIN_VERSION@
64 Requires: openssl >= @OPENSSL_MIN_VERSION@
65 Requires: openssl-devel >= @OPENSSL_MIN_VERSION@
66
67 %description openssl-devel
68 Libraries, includes, etc. for developing XML Security applications with OpenSSL
69
70 %package nss
71 Summary: NSS crypto plugin for XML Security Library
72 Group: Development/Libraries 
73 Requires: xmlsec1 = %{version}
74 Requires: libxml2 >= @LIBXML_MIN_VERSION@
75 Requires: libxslt >= @LIBXSLT_MIN_VERSION@
76 Requires: mozilla-nss >= @MOZILLA_MIN_VERSION@
77 BuildRequires: mozilla-nss-devel >= @MOZILLA_MIN_VERSION@
78
79 %description nss
80 NSS plugin for XML Security Library provides NSS based crypto services
81 for the xmlsec library
82
83 %package nss-devel
84 Summary: NSS crypto plugin for XML Security Library
85 Group: Development/Libraries 
86 Requires: xmlsec1 = %{version}
87 Requires: xmlsec1-devel = %{version}
88 Requires: xmlsec1-nss = %{version}
89 Requires: libxml2-devel >= @LIBXML_MIN_VERSION@
90 Requires: libxslt-devel >= @LIBXSLT_MIN_VERSION@
91 Requires: mozilla-nss-devel >= @MOZILLA_MIN_VERSION@
92
93 %description nss-devel
94 Libraries, includes, etc. for developing XML Security applications with NSS
95
96 %prep
97 %setup -q
98
99 %build
100 # Needed for snapshot releases.
101 if [ ! -f configure ]; then
102 %ifarch alpha
103   CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --host=alpha-redhat-linux --prefix=%prefix --sysconfdir="/etc" --mandir=%{_mandir}
104 %else
105   CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%prefix --sysconfdir="/etc" --mandir=%{_mandir}
106 %endif
107 else
108 %ifarch alpha
109   CFLAGS="$RPM_OPT_FLAGS" ./configure --host=alpha-redhat-linux --prefix=%prefix --sysconfdir="/etc" --mandir=%{_mandir}
110 %else
111   CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%prefix --sysconfdir="/etc" --mandir=%{_mandir}
112 %endif
113 fi
114 if [ "$SMP" != "" ]; then
115   (make "MAKE=make -k -j $SMP"; exit 0)
116   make
117 else
118   make
119 fi
120
121 %install
122 rm -rf $RPM_BUILD_ROOT
123 mkdir -p $RPM_BUILD_ROOT/usr/bin
124 mkdir -p $RPM_BUILD_ROOT/usr/include/@PACKAGE@
125 mkdir -p $RPM_BUILD_ROOT/usr/lib
126 mkdir -p $RPM_BUILD_ROOT/usr/man/man1
127 make prefix=$RPM_BUILD_ROOT%{prefix} mandir=$RPM_BUILD_ROOT%{_mandir} install
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %post -p /sbin/ldconfig
133
134 %postun -p /sbin/ldconfig
135
136 %files 
137 %defattr(-, root, root)
138
139 %doc AUTHORS ChangeLog NEWS README Copyright
140 %doc %{_mandir}/man1/xmlsec1.1*
141
142 %{prefix}/lib/libxmlsec1.so.*
143 %{prefix}/lib/libxmlsec1.so
144 %{prefix}/bin/xmlsec1
145
146 %files devel
147 %defattr(-, root, root)  
148
149 %{prefix}/bin/xmlsec1-config
150 %{prefix}/include/xmlsec1/xmlsec/*.h
151 %{prefix}/include/xmlsec1/xmlsec/private/*.h
152 %{prefix}/lib/libxmlsec1.*a
153 %{prefix}/lib/pkgconfig/xmlsec1.pc
154 %{prefix}/lib/xmlsec1Conf.sh
155 %{prefix}/share/doc/xmlsec1/* 
156 %{prefix}/share/aclocal/xmlsec1.m4
157 %doc AUTHORS HACKING ChangeLog NEWS README Copyright
158 %doc %{_mandir}/man1/xmlsec1-config.1*
159
160 %files openssl
161 %defattr(-, root, root)  
162
163 %{prefix}/lib/libxmlsec1-openssl.so.*
164 %{prefix}/lib/libxmlsec1-openssl.so
165
166 %files openssl-devel
167 %defattr(-, root, root)  
168
169 %{prefix}/include/xmlsec1/xmlsec/openssl/*.h
170 %{prefix}/lib/libxmlsec1-openssl.*a
171 %{prefix}/lib/pkgconfig/xmlsec1-openssl.pc
172
173 %files nss
174 %defattr(-, root, root)  
175
176 %{prefix}/lib/libxmlsec1-nss.so.*
177 %{prefix}/lib/libxmlsec1-nss.so
178
179 %files nss-devel
180 %defattr(-, root, root)  
181
182 %{prefix}/include/xmlsec1/xmlsec/nss/*.h
183 %{prefix}/lib/libxmlsec1-nss.*a
184 %{prefix}/lib/pkgconfig/xmlsec1-nss.pc
185
186 %changelog