Fix installation for silc-client and silc-toolkit packages
[silc.git] / silc-toolkit.spec.in
1 Summary: SILC Toolkit
2 Name: libsilc
3 Version: SILC_VERSION
4 Release: SILC_RELEASE
5 License: GPL/BSD dual licensed
6 Group: System Environment/Libraries
7 URL: http://silcnet.org/
8 Source0: silc-toolkit-%{version}.tar.gz
9 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
10 BuildRequires: pkgconfig, libtool, autoconf, automake
11
12 %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
13
14 %description
15 SILC Client Library libraries for clients to connect to SILC networks.
16
17 SILC (Secure Internet Live Conferencing) is a protocol which provides
18 secure conferencing services on the Internet over insecure channel.
19
20 %package devel
21 Summary: Headers and shared libraries for %{name}
22 Group:   Development/Libraries
23 Requires: libsilc = %{version}-%{release}
24 Requires: pkgconfig
25
26 %description devel
27 The SILC Toolkit development libraries and headers. Required for building
28 SILC clients.
29
30 %package doc
31 Summary: Development documentation for %{name}
32 Group:   Documentation
33
34 %description doc
35 The SILC Toolkit documentation in HTML format. Useful for writing new SILC
36 applications.
37
38 %prep
39 %setup -q -n silc-toolkit-%{version}
40
41 # filter out libsilc module SONAME Provides (#245323)
42 cat << \EOF > %{name}-prov
43 #!/bin/sh
44 sed -e '\,/silc/modules/,d' |\
45 %{__find_provides} $*
46 EOF
47
48 %define _use_internal_dependency_generator 0
49 %define __find_provides %{_builddir}/silc-toolkit-%{version}/%{name}-prov
50 chmod +x %{__find_provides}
51
52 %build
53 autoreconf -f -i
54 %configure --libdir=%{_libdir} --enable-shared --without-libtoolfix \
55            --includedir=%{_includedir}/silc --with-simdir=%{_libdir}/silc/modules \
56            --docdir="%{_pkgdocdir}" CFLAGS="$RPM_OPT_FLAGS"
57 make -j4
58
59 %install
60 # clear the buildroot
61 rm -rf $RPM_BUILD_ROOT
62
63 # make install
64 make DESTDIR=$RPM_BUILD_ROOT install
65 chmod 0755 ${RPM_BUILD_ROOT}%{_libdir}/lib* ${RPM_BUILD_ROOT}%{_libdir}/silc/modules/*.so
66
67 # move doc files that would be deleted by rpm
68 mkdir docinst
69 mv $RPM_BUILD_ROOT%{_pkgdocdir}/{toolkit,tutorial} docinst/
70 # fix encoding of zlib.html
71 mv docinst/toolkit/zlib.html docinst/toolkit/zlib.html.orig
72 iconv -f iso-8859-15 -t utf8 -o docinst/toolkit/zlib.html docinst/toolkit/zlib.html.orig
73 rm -f docinst/toolkit/zlib.html.orig
74
75 # remove files we don't want into the package, but are being installed to buildroot
76 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/silcalgs.conf $RPM_BUILD_ROOT%{_sysconfdir}/silcd.conf
77
78 # remove .a and .la
79 rm -f $RPM_BUILD_ROOT%{_libdir}/libsilc.a
80 rm -f $RPM_BUILD_ROOT%{_libdir}/libsilc.la
81 rm -f $RPM_BUILD_ROOT%{_libdir}/libsilcclient.a
82 rm -f $RPM_BUILD_ROOT%{_libdir}/libsilcclient.la
83
84 # Fix encoding of CREDITS
85 mv CREDITS CREDITS.orig
86 iconv -f iso-8859-15 -t utf8 -o CREDITS CREDITS.orig
87
88 %check
89 # If this fails, the filter-provides script needs an update.
90 [ -d $RPM_BUILD_ROOT%{_libdir}/silc/modules ]
91
92 %post -p /sbin/ldconfig
93
94 %postun -p /sbin/ldconfig
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 # the main package libsilc
100 %files
101 %defattr(-,root,root,-)
102 %{_pkgdocdir}
103 %exclude %{_pkgdocdir}/INSTALL
104 %{_libdir}/libsilc-1.1.so.*
105 %{_libdir}/libsilcclient-1.1.so.*
106 %dir %_libdir/silc
107 %dir %_libdir/silc/modules
108 %{_libdir}/silc/modules/*.so
109 %defattr(0644, root, root, 0755)
110
111 # sub-package libsilc-devel
112 %files devel
113 %defattr(-,root,root,-)
114 %{_libdir}/libsilc.so
115 %{_libdir}/libsilcclient.so
116 %{_libdir}/pkgconfig/silc.pc
117 %{_libdir}/pkgconfig/silcclient.pc
118 %dir %_includedir/silc
119 %{_includedir}/silc/*.h
120
121 %files doc
122 %defattr(-,root,root,-)
123 %doc COPYING BSD GPL
124 %doc docinst/toolkit
125 %doc docinst/tutorial
126
127
128 %changelog
129 * Mon May 05 2014 Pekka Riikonen <priikone@silcnet.org> - 1.1.11-1
130 - Take the libsilc.spec the wonderful folks at Fedora provides
131
132 * Thu Jan 16 2014 Ville Skyttä <ville.skytta@iki.fi> - 1.1.10-11
133 - Drop INSTALL from docs, fix bogus date in %%changelog.
134
135 * Mon Aug 12 2013 Ralf Corsépius <corsepiu@fedoraproject.org> - 1.1.10-10
136 - Reflect docdir changes (Address FTBFS, RHBZ #992125).
137
138 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.10-9
139 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
140
141 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.10-8
142 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
143
144 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.10-7
145 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
146
147 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.10-6
148 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
149
150 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.10-5
151 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
152
153 * Thu Jul 08 2010 Stu Tomlinson <stu@nosnilmot.com> 1.1.10-4
154 - Use recommended %%defattr attributes from packaging guidelines
155
156 * Wed Jul 07 2010 Stu Tomlinson <stu@nosnilmot.com> 1.1.10-3
157 - Include license texts in -doc subpackage
158
159 * Mon May 31 2010 Stu Tomlinson <stu@nosnilmot.com> 1.1.10-2
160 - Drop patch to use system libidn now that system libidn hides
161   required symbols (#597889)
162
163 * Sun Sep 06 2009 Stu Tomlinson <stu@nosnilmot.com> 1.1.10-1
164 - Update to 1.1.10
165
166 * Fri Sep 04 2009 Stu Tomlinson <stu@nosnilmot.com> 1.1.8-7
167 - Backport patch to fix stack corruption (CVE-2008-7160) (#521256)
168
169 * Fri Sep 04 2009 Stu Tomlinson <stu@nosnilmot.com> 1.1.8-6
170 - Backport patch to fix additional string format vulnerabilities (#515648)
171
172 * Wed Aug 05 2009 Stu Tomlinson <stu@nosnilmot.com> 1.1.8-5
173 - Backport patch to fix string format vulnerability (#515648)
174
175 * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.8-4
176 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
177
178 * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.8-3
179 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
180
181 * Tue Dec 23 2008 Stu Tomlinson <stu@nosnilmot.com> 1.1.8-2
182 - Fix building with libtool 2.2
183
184 * Wed Dec 03 2008 Stu Tomlinson <stu@nosnilmot.com> 1.1.8-1
185 - Update to 1.1.8
186
187 * Sat Aug 23 2008 Stu Tomlinson <stu@nosnilmot.com> 1.1.7-2
188 - Fix the patch to make headers multilib safe, which fixes connecting
189   to servers (#459578)
190
191 * Wed Aug 20 2008 Stu Tomlinson <stu@nosnilmot.com> 1.1.7-2
192 - Address package review issues (#224458):
193   Remove unnecessary direct dependency on libdl from libsilcclient
194   Link libsilcclient against libsilc
195   Make provides filtering more robust
196   Update description
197
198 * Thu Mar 20 2008 Stu Tomlinson <stu@nosnilmot.com> 1.1.7-1
199 - Update to 1.1.7, fixes buffer overflow in PKCS#1 message decoding (#438382)
200
201 * Tue Mar 04 2008 Stu Tomlinson <stu@nosnilmot.com> 1.1.6-1
202 - Update to 1.1.6
203
204 * Sat Feb 09 2008 Stu Tomlinson <stu@nosnilmot.com> 1.1.5-3
205 - Rebuild for gcc 4.3
206
207 * Sat Jan 26 2008 Stu Tomlinson <stu@nosnilmot.com> 1.1.5-2
208 - Link to system libidn instead of statically linking our own copy (#215934)
209 - Reintroduce documentation subpackage
210 - spec file cleanups
211 - fix encoding of CREDITS file to be UTF-8
212 - Patch to fix buffer overflow generating fingerprints (#372021)
213
214 * Fri Dec 07 2007 Stu Tomlinson <stu@nosnilmot.com> 1.1.5-1
215 - Update to 1.1.5, now fully event based, so clients don't need to
216   poll every few milliseconds, reducing power consumption
217
218 * Mon Sep 24 2007 Michael Schwendt <mschwendt@users.sf.net> 1.0.2-4
219 - filter out libsilc module SONAME Provides (#245323)
220 - add a check section with a test that fails when the modules move
221
222 * Tue Aug 21 2007 Warren Togami <wtogami@redhat.com> 1.0.2-3
223 - rebuild
224
225 * Wed Oct 04 2006 Warren Togami <wtogami@redhat.com> 1.0.2-2
226 - fix multilib file conflicts in -devel
227
228 * Wed Jun 28 2006 Warren Togami <wtogami@redhat.com> 1.0.2-1
229 - remove .a and .la files
230
231 * Wed Dec 21 2005 Stu Tomlinson <stu@nosnilmot.com> 1.0.2-0
232 - Update to 1.0.2
233
234 * Sat Apr 9  2005 Stu Tomlinson <stu@nosnilmot.com>  0.9.12-11
235 - use RPM_OPT_FLAGS (#153261)
236
237 * Fri Apr 1  2005 Warren Togami <wtogami@redhat.com> 0.9.12-10
238 - remove huge doc subpackage to save space, not useful
239
240 * Wed Mar 16 2005 Elliot Lee <sopwith@redhat.com>
241 - rebuilt
242
243 * Mon Feb 28 2005 Warren Togami <wtogami@redhat.com> 0.9.12-8
244 - gcc4 rebuild
245
246 * Wed Sep 1 2004 Warren Togami <wtogami@redhat.com> 0.9.12-7
247 - rawhide import
248 - minor spec changes
249
250 * Wed Sep 1 2004 Toni Willberg <toniw@iki.fi>
251 - 0.9.12-0.fdr.5 - Had to remove smp_mflags because build fails with them (Michael Schwendt)
252 * Tue Aug 31 2004 Toni Willberg <toniw@iki.fi>
253 - 0.9.12-0.fdr.5 - corrections to lib and include path (from Michael Schwendt)
254 * Tue Aug 31 2004 Toni Willberg <toniw@iki.fi>
255 - 0.9.12-0.fdr.4 - post/postun /sbin/ldconfig
256   (Patch 823 from Stu Tomlinson)
257 * Tue Aug 31 2004 Toni Willberg <toniw@iki.fi>
258 - 0.9.12-0.fdr.3 - Move libs to %%{_libdir} and add a silc.pc
259   (Patch 815 from Stu Tomlinson)
260 * Tue Aug 17 2004 Toni Willberg <toniw@iki.fi>
261 - fix so permissions and hardcoded paths (patch from Michael Schwendt)
262 * Mon Jul 5 2004 Toni Willberg <toniw@iki.fi>
263 - Fixed various errors
264 * Sun Jul 4 2004 Toni Willberg <toniw@iki.fi>
265 - Initial version for Fedora