]> git.pld-linux.org Git - packages/libsmb2.git/blob - libsmb2.spec
- disable -Werror (build with gcc 11 fails on -Werror=array-parameter=)
[packages/libsmb2.git] / libsmb2.spec
1 # TODO: switch to MIT Kerberos, heimdal is missing gss_set_neg_mechs()
2 #
3 # Conditional build:
4 %bcond_without  kerberos5       # system KRB5 library (or builtin NTLMSSP module if disabled)
5 %bcond_without  static_libs     # static library
6 %bcond_with     krb5            # MIT Kerberos instead of Heimdal
7 #
8 Summary:        Client library for accessing SMB shares over a network
9 Summary(pl.UTF-8):      Biblioteka kliencka do dostępu do udziałów SMB w sieci
10 Name:           libsmb2
11 Version:        4.0.0
12 Release:        1
13 License:        LGPL v2.1+
14 Group:          Libraries
15 #Source0Download: https://github.com/sahlberg/libsmb2/tags
16 Source0:        https://github.com/sahlberg/libsmb2/archive/v%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5:  318313b3b60aa1d04e37de0174d810ec
18 Patch0:         %{name}-heimdal.patch
19 URL:            https://github.com/sahlberg/libsmb2
20 BuildRequires:  autoconf >= 2.58
21 BuildRequires:  automake >= 1:1.11
22 BuildRequires:  libtool
23 BuildRequires:  pkgconfig
24 BuildRequires:  popt-devel
25 Suggests:       gssntlmssp
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 Client library for accessing SMB shares over a network.
30
31 %description -l pl.UTF-8
32 Biblioteka kliencka do dostępu do udziałów SMB w sieci.
33
34 %package devel
35 Summary:        Header files for libsmb2 library
36 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libsmb2
37 Group:          Development/Libraries
38 Requires:       %{name} = %{version}-%{release}
39
40 %description devel
41 Header files for libsmb2 library.
42
43 %description devel -l pl.UTF-8
44 Pliki nagłówkowe biblioteki libsmb2.
45
46 %package static
47 Summary:        Static libsmb2 library
48 Summary(pl.UTF-8):      Statyczna biblioteka libsmb2
49 Group:          Development/Libraries
50 Requires:       %{name}-devel = %{version}-%{release}
51
52 %description static
53 Static libsmb2 library.
54
55 %description static -l pl.UTF-8
56 Statyczna biblioteka libsmb2.
57
58 %prep
59 %setup -q
60 %if %{without krb5}
61 %patch0 -p1
62 %endif
63
64 %build
65 %{__libtoolize}
66 %{__aclocal} -I m4
67 %{__autoconf}
68 %{__autoheader}
69 %{__automake}
70 %configure \
71         %{!?with_static_libs:--disable-static} \
72         --disable-werror \
73         %{!?with_kerberos5:--without-libkrb5}
74 %{__make}
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
79 %{__make} install \
80         DESTDIR=$RPM_BUILD_ROOT
81
82 # obsoleted by pkg-config
83 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libsmb2.la
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %post   -p /sbin/ldconfig
89 %postun -p /sbin/ldconfig
90
91 %files
92 %defattr(644,root,root,755)
93 %doc COPYING README
94 %attr(755,root,root) %{_libdir}/libsmb2.so.*.*.*
95 %attr(755,root,root) %ghost %{_libdir}/libsmb2.so.4
96
97 %files devel
98 %defattr(644,root,root,755)
99 %attr(755,root,root) %{_libdir}/libsmb2.so
100 %{_includedir}/smb2
101 %{_pkgconfigdir}/libsmb2.pc
102
103 %if %{with static_libs}
104 %files static
105 %defattr(644,root,root,755)
106 %{_libdir}/libsmb2.a
107 %endif
This page took 0.11876 seconds and 3 git commands to generate.