Fix build with GCC6:add -fgnu89-inline flag to fix "multiple definition"
[platform/upstream/krb5.git] / packaging / krb5.spec
1 #
2 # spec file for package krb5
3 #
4 # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 #
6 # All modifications and additions to the file contributed by third parties
7 # remain the property of their copyright owners, unless otherwise agreed
8 # upon. The license for this file, and modifications and additions to the
9 # file, is the same license as for the pristine package itself (unless the
10 # license for the pristine package is not an Open Source License, in which
11 # case the license is the MIT License). An "Open Source License" is a
12 # license that conforms to the Open Source Definition (Version 1.9)
13 # published by the Open Source Initiative.
14
15 # Please submit bugfixes or comments via http://bugs.opensuse.org/
16 #
17
18
19 %define build_mini 0
20 %define srcRoot krb5-1.10.2
21 %define krb5docdir  %{_defaultdocdir}/krb5
22
23 Name:           krb5
24 Url:            http://web.mit.edu/kerberos/www/
25 BuildRequires:  autoconf
26 BuildRequires:  bison
27 BuildRequires:  keyutils
28 BuildRequires:  keyutils-devel
29 BuildRequires:  libcom_err-devel
30 BuildRequires:  ncurses-devel
31 Version:        1.10.2
32 Release:        0
33 Summary:        MIT Kerberos5 Implementation--Libraries
34 License:        MIT
35 Group:          Productivity/Networking/Security
36 Source0:         krb5-%{version}.tar.bz2
37 Source1:        baselibs.conf
38 Source2:        krb5-rpmlintrc
39 Source1001:     krb5.manifest
40
41 %description
42 Kerberos V5 is a trusted-third-party network authentication system,
43 which can improve your network's security by eliminating the insecure
44 practice of clear text passwords.
45
46
47 %package devel
48 Summary:        MIT Kerberos5 - Include Files and Libraries
49 Group:          Development/Libraries/C and C++
50 Requires:         %{name} = %{version}
51 Requires:       keyutils-devel
52 Requires:       libcom_err-devel
53
54 %description devel
55 Kerberos V5 is a trusted-third-party network authentication system,
56 which can improve your network's security by eliminating the insecure
57 practice of cleartext passwords. This package includes Libraries and
58 Include Files for Development
59
60 %prep
61 %setup -q -n %{srcRoot}
62 cp %{SOURCE1001} .
63
64 %build
65 # needs to be re-generated
66 rm -f src/lib/krb5/krb/deltat.c
67 cd src
68 ./util/reconf
69 LDFLAGS+=" -ldl "
70 CFLAGS="$RPM_OPT_FLAGS -I/usr/include/et -fno-strict-aliasing -D_GNU_SOURCE -fPIC -fgnu89-inline " \
71 ./configure \
72         --host=%{_host} --build=%{_build} \
73         --prefix=/usr/lib/mit \
74         --sysconfdir=%{_sysconfdir} \
75         --mandir=%{_mandir} \
76         --infodir=%{_infodir} \
77         --libexecdir=/usr/lib/mit/sbin \
78         --libdir=%{_libdir} \
79         --includedir=%{_includedir} \
80         --localstatedir=%{_localstatedir}/lib/kerberos \
81         --enable-shared \
82         --disable-static \
83         --enable-kdc-replay-cache \
84         --enable-dns-for-realm \
85         --disable-rpath \
86         --disable-pkinit \
87         --without-pam \
88         --with-system-et \
89         --with-system-ss
90 make %{?jobs:-j%jobs}
91
92 %install
93 cd src
94 make DESTDIR=%{buildroot} install
95 cd ..
96 # Munge the krb5-config script to remove rpaths and CFLAGS.
97 sed "s|^CC_LINK=.*|CC_LINK='\$(CC) \$(PROG_LIBPATH)'|g" src/krb5-config > $RPM_BUILD_ROOT/usr/lib/mit/bin/krb5-config
98 # install autoconf macro
99 mkdir -p %{buildroot}/%{_datadir}/aclocal
100 install -m 644 src/util/ac_check_krb5.m4 %{buildroot}%{_datadir}/aclocal/
101 # install sample config files
102 # I'll probably do something about this later on
103 mkdir -p %{buildroot}%{_sysconfdir} %{buildroot}%{_localstatedir}/lib/kerberos/krb5kdc
104 mkdir -p %{buildroot}%{_sysconfdir}
105 mkdir -p %{buildroot}/etc/profile.d/
106 mkdir -p %{buildroot}/var/log/krb5
107 mkdir -p %{buildroot}/etc/sysconfig/SuSEfirewall2.d/services/
108 # create plugin directories
109 mkdir -p %{buildroot}/%{_libdir}/krb5/plugins/kdb
110 mkdir -p %{buildroot}/%{_libdir}/krb5/plugins/preauth
111 mkdir -p %{buildroot}/%{_libdir}/krb5/plugins/libkrb5
112 # all libs must have permissions 0755
113 for lib in `find %{buildroot}/%{_libdir}/ -type f -name "*.so*"`
114 do
115   chmod 0755 ${lib}
116 done
117 # and binaries too
118 chmod 0755 %{buildroot}/usr/lib/mit/bin/ksu
119 find . -type f -name '*.ps' -exec gzip -9 {} \;
120 # create rc* links
121 # create links for kinit and klist, because of the java ones
122 #ln -sf ../../usr/lib/mit/bin/kinit   %{buildroot}/usr/bin/kinit
123 #ln -sf ../../usr/lib/mit/bin/klist   %{buildroot}/usr/bin/klist
124
125
126 mkdir -p %{buildroot}/usr/bin
127 ln -sf ../../usr/lib/mit/bin/krb5-config %{buildroot}/usr/bin/krb5-config
128 # install doc
129 install -d -m 755 %{buildroot}/%{krb5docdir}
130 install -m 644 %{_builddir}/%{srcRoot}/README %{buildroot}/%{krb5docdir}/README
131 # cleanup
132 rm -f  %{buildroot}/usr/share/man/man1/tmac.doc*
133 rm -f  /usr/share/man/man1/tmac.doc*
134 rm -rf %{buildroot}/usr/lib/mit/share/examples
135 rm -rf %{buildroot}/usr/lib/mit/share/locale
136 #####################################################
137 # krb5(-mini) pre/post/postun
138 #####################################################
139
140 %post -p /sbin/ldconfig
141
142 %postun
143 /sbin/ldconfig
144
145
146 ########################################################
147 # files sections
148 ########################################################
149
150 %files devel
151 %manifest %{name}.manifest
152 %defattr(-,root,root)
153 /usr/bin/krb5-config
154 %dir /usr/lib/mit
155 %dir /usr/lib/mit/bin
156 %dir /usr/lib/mit/sbin
157 %dir /usr/lib/mit/share
158 %dir %{_datadir}/aclocal
159 %{_libdir}/libgssrpc.so
160 %{_libdir}/libk5crypto.so
161 %{_libdir}/libkadm5clnt_mit.so
162 %{_libdir}/libkadm5clnt.so
163 %{_libdir}/libkadm5srv_mit.so
164 %{_libdir}/libkadm5srv.so
165 %{_libdir}/libkdb5.so
166 %{_libdir}/libkrb5.so
167 %{_libdir}/libkrb5support.so
168 %{_libdir}/libverto.so
169 %{_libdir}/libverto-k5ev.so
170 %{_includedir}/*
171 /usr/lib/mit/bin/krb5-config
172 /usr/lib/mit/sbin/krb5-send-pr
173 /usr/lib/mit/share/gnats
174 %{_mandir}/man1/krb5-send-pr.1*
175 %{_mandir}/man1/krb5-config.1*
176 %{_datadir}/aclocal/ac_check_krb5.m4
177
178
179 %files
180 %manifest %{name}.manifest
181 %defattr(-,root,root)
182 %dir %{krb5docdir}
183 # add directories
184 %dir %{_libdir}/krb5
185 %dir %{_libdir}/krb5/plugins
186 %dir %{_libdir}/krb5/plugins/kdb
187 %dir %{_libdir}/krb5/plugins/preauth
188 %dir %{_libdir}/krb5/plugins/libkrb5
189 %dir %{_localstatedir}/lib/kerberos/
190 %dir %{_localstatedir}/lib/kerberos/krb5kdc
191 %attr(0700,root,root) %dir /var/log/krb5
192 %dir /usr/lib/mit
193 %dir /usr/lib/mit/sbin
194 %dir /usr/lib/mit/bin
195 %doc %{krb5docdir}/README
196 #%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/krb5.conf
197 #%attr(0600,root,root) %config(noreplace) %{_localstatedir}/lib/kerberos/krb5kdc/kdc.conf
198 #%attr(0600,root,root) %config(noreplace) %{_localstatedir}/lib/kerberos/krb5kdc/kadm5.acl
199 #%attr(0600,root,root) %config(noreplace) %{_localstatedir}/lib/kerberos/krb5kdc/kadm5.dict
200 %{_libdir}/libgssapi_krb5.*
201 %{_libdir}/libgssrpc.so.*
202 %{_libdir}/libk5crypto.so.*
203 %{_libdir}/libkadm5clnt_mit.so.*
204 %{_libdir}/libkadm5srv_mit.so.*
205 %{_libdir}/libkdb5.so.*
206 %{_libdir}/libkrb5.so.*
207 %{_libdir}/libkrb5support.so.*
208 %{_libdir}/libverto.so.*
209 %{_libdir}/libverto-k5ev.so.*
210 %{_libdir}/krb5/plugins/kdb/*
211 #/usr/lib/mit/sbin/*
212 /usr/lib/mit/sbin/kadmin.local
213 /usr/lib/mit/sbin/kadmind
214 /usr/lib/mit/sbin/kpropd
215 /usr/lib/mit/sbin/kproplog
216 /usr/lib/mit/sbin/kprop
217 /usr/lib/mit/sbin/kdb5_util
218 /usr/lib/mit/sbin/krb5kdc
219 /usr/lib/mit/sbin/uuserver
220 /usr/lib/mit/sbin/sserver
221 /usr/lib/mit/sbin/gss-server
222 /usr/lib/mit/sbin/sim_server
223 /usr/lib/mit/bin/k5srvutil
224 /usr/lib/mit/bin/kvno
225 /usr/lib/mit/bin/kinit
226 /usr/lib/mit/bin/kdestroy
227 /usr/lib/mit/bin/kpasswd
228 /usr/lib/mit/bin/klist
229 /usr/lib/mit/bin/kadmin
230 /usr/lib/mit/bin/ktutil
231 /usr/lib/mit/bin/kswitch
232 %attr(0755,root,root) /usr/lib/mit/bin/ksu
233 /usr/lib/mit/bin/uuclient
234 /usr/lib/mit/bin/sclient
235 /usr/lib/mit/bin/gss-client
236 /usr/lib/mit/bin/sim_client
237 #/usr/bin/kinit
238 #/usr/bin/klist
239 %{_mandir}/man1/kvno.1*
240 %{_mandir}/man1/kinit.1*
241 %{_mandir}/man1/kdestroy.1*
242 %{_mandir}/man1/kpasswd.1*
243 %{_mandir}/man1/klist.1*
244 %{_mandir}/man1/kerberos.1*
245 %{_mandir}/man1/ksu.1*
246 %{_mandir}/man1/sclient.1*
247 %{_mandir}/man1/kadmin.1*
248 %{_mandir}/man1/ktutil.1*
249 %{_mandir}/man1/k5srvutil.1*
250 %{_mandir}/man1/kswitch.1*
251 %{_mandir}/man5/*
252 %{_mandir}/man5/.k5login.5.gz
253 %{_mandir}/man5/.k5identity.5*
254 %{_mandir}/man8/*