forked from openss7/openss7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
os7osi.spec.in
656 lines (612 loc) · 27.2 KB
/
os7osi.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
# vim: ft=spec sw=4 et tw=78 com=b\:#,fb\:- fo+=tcqlorn nocin nosi
# =============================================================================
#
# @(#) File: os7osi.spec.in Version: @VERSION@ Date: @PACKAGE_DATE@
#
# -----------------------------------------------------------------------------
#
# Copyright (c) 2008-2015 Monavacon Limited <http://www.monavacon.com/>
# Copyright (c) 2001-2008 OpenSS7 Corporation <http://www.openss7.com/>
# Copyright (c) 1997-2001 Brian F. G. Bidulock <[email protected]>
#
# All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation; version 3 of the License.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>, or write to
# the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# -----------------------------------------------------------------------------
#
# U.S. GOVERNMENT RESTRICTED RIGHTS. If you are licensing this Software on
# behalf of the U.S. Government ("Government"), the following provisions apply
# to you. If the Software is supplied by the Department of Defense ("DoD"), it
# is classified as "Commercial Computer Software" under paragraph 252.227-7014
# of the DoD Supplement to the Federal Acquisition Regulations ("DFARS") (or any
# successor regulations) and the Government is acquiring only the license rights
# granted herein (the license rights customarily provided to non-Government
# users). If the Software is supplied to any unit or agency of the Government
# other than DoD, it is classified as "Restricted Computer Software" and the
# Government's rights in the Software are defined in paragraph 52.227-19 of the
# Federal Acquisition Regulations ("FAR") (or any successor regulations) or, in
# the cases of NASA, in paragraph 18.52.227-86 of the NASA Supplement to the FAR
# (or any successor regulations).
#
# -----------------------------------------------------------------------------
#
# Commercial licensing and support of this software is available from OpenSS7
# Corporation at a fee. See http://www.openss7.com/
#
# =============================================================================
%global base @PACKAGE@
%global baseversion @VERSION@
%global tclversion @PACKAGE_VERSION@
%global rpmrelease @PACKAGE_RPMRELEASE@
%global title @PACKAGE_TITLE@
%global stitle @PACKAGE_SHORTTITLE@
%global virtual STREAMS
%global binfiles %{nil}
%global sbinfiles %{nil}
%global sysbinfiles %{nil}
%global syssbinfiles %{nil}
%global wrapper wrapper
%global modules specfs streams streams-aixcompat streams-clone streams-connld streams-echo streams-fifo streams-hpuxcompat streams-log streams-nsdev streams-nuls streams-osfcompat streams-pipe streams-pipemod streams-sad streams-sc streams-sth streams-suncompat streams-svr4compat streams-uw7compat
%global nonrpmmods LiS lis streams STREAMS strbcm strcompat strutil strtty strchan strxns strxnet strnsl strsock strinet strsctp strisdn strvoip strss7 sigtran stratm
%global preloads specfs streams
%global libraries streams
%global perlmods %{nil}
%global tcllibs %{nil}
%global gcjlibs %{nil}
%global gcjmaps %{nil}
%global jarfiles %{nil}
%global jnilibs %{nil}
%global javadoc %{nil}
%global locales %{nil}
%global tools ldltest strtst thrtst timetst fattach fdetach ldlconfig oc pafd psfd rwf streams strmakenodes
%global manuals openss7 ATM carrier cci cdi chi cnam dlpi dlpi_porting FR hlr INET ISDN lab libxnet libxnsl lli mapi MG mg mtpi mxi nli npi npi_mtp npi_sccp OSI PHYS porting sbc sccpi sdli sdti sg sgp SIGTRAN sli SPG2 SPG SS7 ssg ss STREAMS_FAQ STREAMS tci tpi tpi_sccp tri TTY VOIP voip wan X25 x25_porting x400p xcc xmap XNS xti_sccp
%global pngfiles *.png
%global cssfiles *.css
%global initfiles specfs streams strerr strace %{base}
%global nonrpminit strms_up strms_dn
%global conffiles *.conf
%global testfiles *test*
%global testscripts testsuite
%global sendpr %{nil}
%global mibfiles *.mib
%global snmpmods strMIB
#global gdmos %{nil}
%global netconfig %{base}
%global sock2path %{base}
%global snmpconf strMIB.conf
%global manrefs %{base}.refs
%global manmacros %{base}.macros
%global manpages man*
%global includes %{nil}
%global license AGPLv3
%{!?_enable_debug_packages:%{expand: %%global _enable_debug_packages 0}}
%global _unpackaged_files_terminate_build 1
%global _missing_doc_files_terminate_build 1
%global _enable_debug_packages 0
%global _use_internal_dependency_generator 0
%{!?_kversion: %{expand: %%global _kversion %(uname -r)}}
%global kernel_version %{_kversion}
%global kernel_number %(echo %{_kversion}|awk 'BEGIN{FS="-"}{print$1}')
%global kernel_flavor %(echo %{_kversion}|awk 'BEGIN{FS="-"}{print$2}'|sed -r -e 's,.*smp$,-smp,;t;s,.*,,')%{nil}
%global kernel_kind %(echo %{_kversion}|awk 'BEGIN{FS="-"}{if($3){print"-"$3}else{print$3}}')%{nil}
%global kernel_release %(echo %{_kversion}|awk 'BEGIN{FS="-"}{print$1"-"$2}'|sed -r -e 's,smp$,,')
%global kernel_majnum %(echo %{kernel_number} | sed -e 's,\.[^\.]*$,,')
%global kernel_package %{name}-modules-%{_kversion}
%global basearch %{_arch}
%global kbaseversion %{baseversion}
%global kspecversion %{baseversion}
%{!?extrarelease %{expand: %%global extrarelease %%{nil}}}
%global specrelease %{rpmrelease}%{extrarelease}
%{!?extrarelease2 %{expand: %%global extrarelease2 %%{nil}}}
%global baserelease %{rpmrelease}%{extrarelease2}
%global kspecrelease %{specrelease}
%global kbaserelease %{baserelease}
%global kernel_symvers symvers-%{_kversion}.gz
%global kernel_symsets symsets-%{_kversion}.tar.gz
# define new autoconf 2.60, 2.61 stuff
%{!?_ksubdir: %{expand: %%global _ksubdir updates/%%{base}}}
%{!?_datarootdir: %{expand: %%global _datarootdir %%{_datadir}}}
%{!?_docdir: %{expand: %%global _docdir %%{_datarootdir}/doc}}
%{!?_htmldir: %{expand: %%global _htmldir %%{_docdir}}}
%{!?_dvidir: %{expand: %%global _dvidir %%{_docdir}}}
%{!?_pdfdir: %{expand: %%global _pdfdir %%{_docdir}}}
%{!?_psdir: %{expand: %%global _psdir %%{_docdir}}}
%{!?_localedir: %{expand: %%global _localedir %%{_datadir}/locale}}
%{!?_configdir: %{expand: %%global _configdir %%{_sysconfdir}/sysconfig}}
%{!?_modutildir: %{expand: %%global _modutildir %%{_sysconfdir}/modutils}}
%{!?_kmoduledir: %{expand: %%global _kmoduledir /lib/modules/%%{kernel_version}}}
%{!?_kbuilddir: %{expand: %%global _kbuilddir %%{_kmoduledir}/build}}
%{!?_kincludedir: %{expand: %%global _kincludedir %%{_kbuilddir}/include}}
%{!?_pkglibexecdir: %{expand: %%global _pkglibexecdir %%{_libexecdir}/%%{base}}}
%{!?_snmpmibdir: %{expand: %%global _snmpmibdir %%{_datarootdir}/snmp/mibs}}
%{!?_snmpdlmoddir: %{expand: %%global _snmpdlmoddir %%{_libdir}/snmp/dlmod}}
%{!?_snmpconfdir: %{expand: %%global _snmpconfdir %%{_sysconfdir}/snmp}}
%{!?_lib32dir: %{expand: %%global _lib32dir %%{_exec_prefix}/lib}}
%{!?_pkglibexec32dir: %{expand: %%global _pkglibexec32dir %%{_pkglibexecdir}/lib32}}
%{!?_syslib32dir: %{expand: %%global _syslib32dir /lib}}
%{!?_syslibdir: %{expand: %%global _syslibdir %(echo %{_libdir} | sed 's,/usr,,')}}
%{!?_sysbindir: %{expand: %%global _sysbindir %(echo %{_bindir} | sed 's,/usr,,')}}
%{!?_syssbindir: %{expand: %%global _syssbindir %(echo %{_sbindir} | sed 's,/usr,,')}}
%{!?_snmpdlmod32dir: %{expand: %%global _snmpdlmod32dir %%{_lib32dir}/snmp/dlmod}}
%{!?_gcjdir: %{expand: %%global _gcjdir %%{_libdir}/gcj}}
%{!?_pkggcjdir: %{expand: %%global _pkggcjdir %%{_gcjdir}/%%{base}}}
%{!?_jnidir: %{expand: %%global _jnidir %%{_libdir}/java}}
%{!?_javadir: %{expand: %%global _javadir %%{_datadir}/java}}
%{!?_javadocdir: %{expand: %%global _javadocdir %%{_datadir}/javadoc}}
%{!?_pkgjavadocdir: %{expand: %%global _pkgjavadocdir %%{_javadocdir}/%%{base}}}
%{!?_tcllibdir: %{expand: %%global _tcllibdir %%{_libdir}}}
%{!?_tclsrcdir: %{expand: %%global _tclsrcdir %%{_datadir}}}
%{!?_pkgtcllibdir: %{expand: %%global _pkgtcllibdir %%{_tcllibdir}/%%{stitle}%%{tclversion}}}
%{!?_perldir: %{expand: %%global _perldir %(eval "`perl -V:installvendorarch`"; echo $installvendorarch | sed -e 's,//*$,,')}}
%{!?_perllibdir: %{expand: %%global _perllibdir %%{_libdir}/perl5}}
%{!?_yumrepodir: %{expand: %%global _yumrepodir %(if test -d %{_sysconfdir}/yum/repos.d; then echo %{_sysconfdir}/yum/repos.d; else echo %{_sysconfdir}/yum.repos.d; fi)}}
%{!?_yumplugdir: %{expand: %%global _yumplugdir %%{_libdir}/yum-plugins}}
%{!?_yumdir: %{expand: %%global _yumdir %%{_sysconfdir}/yum}}
%{!?_yumconfdir: %{expand: %%global _yumconfdir %%{_sysconfdir}/yum/pluginconf.d}}
%{!?_zypprepodir: %{expand: %%global _zypprepodir %%{_sysconfdir}/zypp/repos.d}}
%{!?_zyppcreddir: %{expand: %%global _zyppcreddir %%{_sysconfdir}/zypp/credentials.d}}
%{!?_zyppservdir: %{expand: %%global _zyppservdir %%{_sysconfdir}/zypp/services.d}}
%{!?_rpmgpgdir: %{expand: %%global _rpmgpgdir %%{_sysconfdir}/pki/rpm-gpg}}
%{!?_urpmirepodir: %{expand: %%global _urpmirepodir %%{_sysconfdir}/urpmi/mediacfg.d}}
%{!?_urpmiconfdir: %{expand: %%global _urpmiconfdir %%{_sysconfdir}/urpmi}}
%{!?_aptconfdir: %{expand: %%global _aptconfdir %%{_sysconfdir}/apt}}
%{!?_aptrepodir: %{expand: %%global _aptrepodir %%{_aptconfdir}/sources.list.d}}
%{!?_aptvenddir: %{expand: %%global _aptvenddir %%{_aptconfdir}/vendors.list.d}}
%{!?_ssldir: %{expand: %%global _ssldir %%{_sysconfdir}/ssl}}
%{!?_sslcertdir: %{expand: %%global _sslcertdir %%{_ssldir}/certs}}
%{!?_cacertdir: %{expand: %%global _cacertdir %%{_datarootdir}/ca-certificates}}
%{!?_lcacertdir: %{expand: %%global _lcacertdir %%{_prefix}/local/share/ca-certificates}}
%{!?_modprobeddir: %{expand: %%global _modprobeddir %%{_sysconfdir}/modprobe.d}}
%{!?_buildrootdir: %{expand: %%global _buildrootdir %%{_tmppath}/%%{name}-%%{baseversion}-%%{specrelease}-root}}
Summary: %{stitle} OSI for Linux
Name: os7osi
Version: %{baseversion}
Release: %{baserelease}
License: AGPLv3
Group: System Environment/Kernel
Icon: %{base}.gif
Icon: %{base}.xpm
ExclusiveArch: %{ix86} k6 x86_64 s390 s390x ppc ppciseries ppcpseries ppc64 arm armv4l sh mips mipsel noarch
ExclusiveOs: Linux
Source: %{base}-%{baseversion}.tar.bz2
BuildRoot: %{_buildrootdir}
Autoreq: false
Autoprov: true
BuildRequires: gcc >= 3.3.3
BuildRequires: @BIBTEX@
BuildRequires: @BZIP2_CMD@
BuildRequires: @CONVERT@
BuildRequires: @DVI2PS@
BuildRequires: @DVIPDF@
BuildRequires: @FIG2DEV@
BuildRequires: @GCJH@
BuildRequires: @GENKSYMS@
BuildRequires: @GNUPLOT@
BuildRequires: @GPG@
BuildRequires: @GROFF@
BuildRequires: @GZIP_CMD@
BuildRequires: @JAVAC@
BuildRequires: @JAVAH@
BuildRequires: @LATEX@
BuildRequires: @LATEX2HTML@
BuildRequires: @MD5SUM@
BuildRequires: @OBJDUMP@
BuildRequires: @OPENSSL@
BuildRequires: @PDFLATEX@
BuildRequires: @PDFTEX@
BuildRequires: @PIC@
BuildRequires: @PS2EPSI@
BuildRequires: @PS2PDF@
BuildRequires: @PSLATEX@
BuildRequires: @REFER@
BuildRequires: @SHA1SUM@
BuildRequires: @SOELIM@
BuildRequires: @TBL@
BuildRequires: @TEX@
BuildRequires: @ZIP@
BuildRequires: beecrypt-devel
BuildRequires: binutils
BuildRequires: chkconfig
BuildRequires: coreutils
BuildRequires: elfutils-libelf-devel
BuildRequires: fedora-release
BuildRequires: filesystem
BuildRequires: gcc-java
BuildRequires: glibc
BuildRequires: gnupg
BuildRequires: groff
BuildRequires: gzip
BuildRequires: initscripts
BuildRequires: kernel
#BuildRequires: kernel-source
BuildRequires: libgcj
BuildRequires: lsof
BuildRequires: modutils
BuildRequires: net-snmp
BuildRequires: net-snmp-devel
BuildRequires: net-snmp-utils
BuildRequires: openssl
BuildRequires: perl
BuildRequires: rpm
BuildRequires: tcl
BuildRequires: tcl-devel
BuildRequires: transfig
BuildRequires: zip
Requires: bash
Requires: beecrypt
Requires: bzip2
Requires: bzip2-libs
Requires: chkconfig
Requires: coreutils
Requires: elfutils-libelf
Requires: filesystem
Requires: gawk
Requires: glibc
Requires: groff
Requires: gzip
Requires: initscripts
Requires: kernel
Requires: libgcc
Requires: libpcap
Requires: libselinux
Requires: libstdc++
Requires: lsof
Requires: modutils
Requires: net-snmp
Requires: net-snmp-perl
Requires: openssl
Requires: perl
Requires: popt
Requires: rpm
Requires: tcl
Requires: tcp_wrappers
Requires: zip
Requires: zlib
# ---------------------------------------------------------------------------
%description
The %{name} package cincludes kernel modules, STREAMS drivers, modules,
libraries, utilities, test programs, daemons, and development environment
for the development and execution of %{stitle} OSI drivers, components,
and applications for the STREAMS OSI environment. This distribution ic
currently applicable to the FC2 2.6.12.1 kernel and is validated for
ix86 architecture.
%prep
# ---------------------------------------------------------------------------
%setup -q -n %{base}-%{baseversion}
%build
# ---------------------------------------------------------------------------
%global cache_file %{_host}-%{kernel_version}-config.cache
%global csite_file %{_host}-config.site
%global mpost_file %{_host}-%{kernel_version}-modpost.cache
%define enable() %(echo "%1" | sed -e 's|^--with-|--enable-|')%{nil}
%define disable() %(echo "%1" | sed -e 's|^--without-|--disable-|')%{nil}
./configure \
${CC+CC="${CC}"} \
${CFLAGS+CFLAGS="${CFLAGS}"} \
${LD+LD="${LD}"} \
${LDFLAGS+LDFLAGS="${LDFLAGS}"} \
${CPPFLAGS+CPPFLAGS="${CPPFLAGS}"} \
${CPP+CPP="${CPP}"} \
${CXX+CXX="${CXX:-$CC}"} \
${CXX-${CC+CXX="$CC"}} \
${CXXFLAGS+CXXFLAGS="${CXXFLAGS}"} \
${CXXFLAGS-${CFLAGS+CXXFLAGS="$CFLAGS"}} \
${CXXCPP+CXXCPP="${CXXCPP:-$CPP}"} \
${CXXCPP-${CPP+CXXCPP="$CPP"}} \
CONFIG_SITE="%{_builddir}/%{csite_file}" \
MODPOST_CACHE="%{_builddir}/%{mpost_file}" \
--cache-file="%{_builddir}/%{cache_file}" \
syslibdir=/lib \
sysbindir=/bin \
syssbindir=/sbin \
--prefix=%{_prefix} \
--build=%{_build} \
--host=%{_host} \
--exec-prefix=%{_exec_prefix} \
--bindir=%{_bindir} \
--sbindir=%{_sbindir} \
--sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} \
--includedir=%{_includedir} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--localstatedir=%{_localstatedir} \
--sharedstatedir=%{_sharedstatedir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--datarootdir=%{_datadir} \
--docdir=%{_datadir}/doc/%{name}-%{baseversion} \
--htmldir=%{_datadir}/doc/%{name}-%{baseversion} \
--dvidir=%{_datadir}/doc/%{name}-%{baseversion} \
--pdfdir=%{_datadir}/doc/%{name}-%{baseversion} \
--psdir=%{_datadir}/doc/%{name}-%{baseversion} \
--localedir=%{_datadir}/locale \
--disable-maintainer-mode \
%{?extrarelease: --with-rpm-extra=%{extrarelease}} \
--with-k-release=%{kernel_version} \
--with-k-modules=/lib/modules/%{kernel_version} \
--disable-k-abi-support \
--disable-k-weak-symbols \
--enable-k-weak-modules \
--disable-specfs-lock \
--with-rpm-release=%{rpmrelease} \
--with-k-optimize=speed \
--with-optimize=speed \
--with-gnu-ld \
--disable-docs \
--disable-java \
|| { rm -f %{_builddir}/%{cache_file} ; exit 1 ; }
make
%install
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} || :
# if we are going to create debug packages, we need to install unstripped
# binaries; otherwise use libtoolized install-strip to strip binaries, modules,
# shared and static libraries.
make DESTDIR="%{buildroot}" RPM_BUILD_ROOT="%{buildroot}" \
%{!?_enable_debug_packages: install-strip} \
%{?_enable_debug_packages: install}
# get the installed info directory out of the build root
[ -e "%{buildroot}/%{_infodir}/dir" ] && rm -f "%{buildroot}/%{_infodir}/dir" || :
# should not be necessary except for the cache files
d=%{buildroot}%{_usrsrc}/%{base}-%{baseversion}-%{specrelease}/%{_kversion}
# create kernel-specific info directory
mkdir -p $d
# copy in makefile variables file
cp -p Module.mkvars $d
# copy in autoconf site and cache files for reference
cp -p %{_builddir}/%{csite_file} $d
cp -p %{_builddir}/%{cache_file} $d
# should not be necessary except for the cache files
d=%{buildroot}%{_usrsrc}/%{base}-%{baseversion}-%{specrelease}/%{_kversion}
# create kernel-specific info directory
mkdir -p $d
# copy in symbol versions file
cp -p System.symvers $d
cp -p Module.symvers $d
cp -p Modules.map $d
# create symbol versions file
cat System.symvers Module.symvers | gzip > $d/%{kernel_symvers}
# copy in symbol sets file
cp -p %{kernel_symsets} $d
# copy in symbol sets file to boot directory as well
#mkdir -p %{buildroot}/boot
#cp -p %{kernel_symsets} %{buildroot}/boot
# copy in modpost cache file for reference
cp -p %{_builddir}/%{mpost_file} $d
# stupid mandrake spec-helper will compress our macros files otherwise (perl regex)
EXCLUDE_FROM_COMPRESS="${EXCLUDE_FROM_COMPRESS:+$EXCLUDE_FROM_COMPRESS|}%{manrefs}"
export EXCLUDE_FROM_COMPRESS
# stupid mandrake spec-helper will compress our macros files otherwise (perl regex)
EXCLUDE_FROM_COMPRESS="${EXCLUDE_FROM_COMPRESS:+$EXCLUDE_FROM_COMPRESS|}%{manmacros}"
export EXCLUDE_FROM_COMPRESS
# file conflicts with samba
rm -f %{buildroot}%{_mandir}/man8/net.8*
%clean
# ---------------------------------------------------------------------------
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} || :
%pre -p /bin/bash
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ $1 -eq 1 -o $1 -eq 2 ] ; then : # fresh install or upgrade
manuals='%{manuals}'; for n in $manuals ; do
for e in '' '.gz' '.bz2' '.lzma' '.xz' ; do
[ -f %{_infodir}.info${e} ] || continue
install-info --delete --info-dir=%{_infodir} %{_infodir}/${n}.info${e} 2>&1 || :
break
done
done
fi
%post -p /bin/bash
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ $1 -eq 1 -o $1 -eq 2 ] ; then : # fresh install or upgrade
manuals='%{manuals}'; for n in $manuals ; do
for e in '' '.gz' '.bz2' '.lzma' '.xz' ; do
[ -f %{_infodir}.info${e} ] || continue
install-info --info-dir=%{_infodir} %{_infodir}/${n}.info${e} 2>&1 || :
break
done
done
[[ -d %{_libdir} ]] && ldconfig -n %{_libdir}
[[ -d %{_syslibdir} ]] && ldconfig -n %{_syslibdir}
[[ -d %{_lib32dir} ]] && ldconfig -n %{_lib32dir}
[[ -d %{_syslib32dir} ]] && ldconfig -n %{_syslib32dir}
update-netconfig
update-sock2path
update-snmpconf --install
if [[ -x /usr/bin/tclsh ]]; then
for d in `find %{_pkgtcllibdir} -mindepth 1 -maxdepth 1 -type d` ; do
echo -e "pkg_mkIndex $d\\nexit" | tclsh || :
done
fi
fi
%preun -p /bin/bash
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ $1 -eq 0 -o $1 -eq 1 ] ; then : # final removal or upgrade
rm -f -- %{_sysconfdir}/nslconfig.d/%{netconfig}
rmdir -p -- %{_sysconfdir}/nslconfig.d >/dev/null 2>&1 || :
update-netconfig
rm -f -- %{_sysconfdir}/sock2path.d/%{sock2path}
rmdir -p -- %{_sysconfdir}/sock2path.d >/dev/null 2>&1 || :
update-sock2path
rm -f -- %{_snmpconfdir}/snmp.d/*%{base}
rmdir -p -- %{_snmpconfdir}/snmp.d >/dev/null 2>&1 || :
update-snmpconf --remove
manuals='%{manuals}'; for n in $manuals ; do
for e in '' '.gz' '.bz2' '.lzma' '.xz' ; do
[ -f %{_infodir}.info${e} ] || continue
install-info --delete --info-dir=%{_infodir} %{_infodir}/${n}.info${e} 2>&1 || :
break
done
done
fi
%postun -p /bin/bash
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ $1 -eq 0 -o $1 -eq 1 ] ; then : # final removal or upgrade
[[ -d %{_libdir} ]] && ldconfig -n %{_libdir}
[[ -d %{_syslibdir} ]] && ldconfig -n %{_syslibdir}
[[ -d %{_lib32dir} ]] && ldconfig -n %{_lib32dir}
[[ -d %{_syslib32dir} ]] && ldconfig -n %{_syslib32dir}
if [[ -x /usr/bin/tcsh ]] ; then
for f in `find %{_pkgtcllibdir} -name 'pkgIndex.tcl'` ; do
rm -f -- "$f" || :
if [ -d "`dirname $f`" ]; then
rpmdir -p == "`dirname $f`" 2>/dev/null || :
fi
done
fi
fi
%files
# ---------------------------------------------------------------------------
%defattr(-,root,root)
%docdir %{_docdir}
%{_docdir}/%{name}-%{baseversion}/ABOUT-NLS
%{_docdir}/%{name}-%{baseversion}/AUTHORS
%{_docdir}/%{name}-%{baseversion}/BUGS
%{_docdir}/%{name}-%{baseversion}/COPYING
%{_docdir}/%{name}-%{baseversion}/ChangeLog
%{_docdir}/%{name}-%{baseversion}/INSTALL
%{_docdir}/%{name}-%{baseversion}/INSTALL-%{base}
%{_docdir}/%{name}-%{baseversion}/LICENSES
%{_docdir}/%{name}-%{baseversion}/LSM
%{_docdir}/%{name}-%{baseversion}/MANUAL
%{_docdir}/%{name}-%{baseversion}/NEWS
%{_docdir}/%{name}-%{baseversion}/NOTES
%{_docdir}/%{name}-%{baseversion}/NOTES.cos53
%{_docdir}/%{name}-%{baseversion}/NOTES.kmod
%{_docdir}/%{name}-%{baseversion}/NOTES.kmp
%{_docdir}/%{name}-%{baseversion}/NOTES.ksyms
%{_docdir}/%{name}-%{baseversion}/NOTES.repo
%{_docdir}/%{name}-%{baseversion}/NOTES.rpm
%{_docdir}/%{name}-%{baseversion}/NOTES.sles
%{_docdir}/%{name}-%{baseversion}/PROBLEMS
%{_docdir}/%{name}-%{baseversion}/README
%{_docdir}/%{name}-%{baseversion}/README-alpha
%{_docdir}/%{name}-%{baseversion}/README-cvs
%{_docdir}/%{name}-%{baseversion}/README-make
%{_docdir}/%{name}-%{baseversion}/THANKS
%{_docdir}/%{name}-%{baseversion}/TODO
%{_docdir}/%{name}-%{baseversion}/%{base}-%{baseversion}.lsm
%config(noreplace) %{_sysconfdir}/*.conf
%config(noreplace) %{_configdir}/*
%{_initrddir}/*
%{_sysconfdir}/kernel/preinst.d/%{base}-update
%{_sysconfdir}/kernel/postinst.d/%{base}-update
%{_sysconfdir}/kernel/prerm.d/%{base}-update
%{_sysconfdir}/kernel/postrm.d/%{base}-update
%{_sysconfdir}/kernel/header_postinst.d/%{base}-update
%{_sysconfdir}/kernel/src_postinst.d/%{base}-update
%{_modprobeddir}/specfs.conf
%docdir %{_infodir}
%{_infodir}/*.info*
%docdir %{_mandir}
%{_mandir}/%{manrefs}*
%{_mandir}/%{manmacros}*
%{_mandir}/man[1458]*/*
%{_mandir}/man[2379]*/*
%{_bindir}/*
%{_sbindir}/*
%{_sysbindir}/*
%{_syssbindir}/*
%{_libdir}/*.so*
%{_libdir}/*.la
%{_syslibdir}/*.so*
%{_syslibdir}/*.la
%config(noreplace) %{_sysconfdir}/nslconfig.d/%{netconfig}
%config(noreplace) %{_sysconfdir}/sock2path.d/%{sock2path}
%{_localedir}/*
%{_pkglibexecdir}/*
%dir %{_includedir}/%{base}
%{_includedir}/%{base}/*
%{_libdir}/*.a
%{_syslibdir}/*.a
%{_snmpconfdir}/snmp.d/*%{base}
%dir %{_pkgtcllibdir}
%{_pkgtcllibdir}/*
%{_perllibdir}/auto/*
%{_snmpdlmoddir}/*
%{_snmpmibdir}/*
%package -n %{kernel_package}
# ---------------------------------------------------------------------------
Summary: %{title} kernel modules.
Group: System Environment/Kernel
Autoreq: true
Autoprov: true
Version: %{kbaseversion}
Release: %{kbaserelease}
Provides: %{name}-modules
Requires: %{name} = %{baseversion}-%{rpmrelease}
Requires: kernel = %{kernel_number}
Requires: kernel%{kernel_kind}%{kernel_flavor} = %{kernel_release}
# ---------------------------------------------------------------------------
%description -n %{kernel_package}
The %{kernel_package} binary package contains the kernel modules that
provide the Linux kernel %{stitle} drivers and modules. This includes
assorted drivers and modules for STREAMS and additional %{title}
protocol suite components. This binary package also includes modprobe
configuration files for the associated kernel modules. This package
is weakly tied to the kernel for which it and dependent components
were compiled. This package applies to kernel %{kernel_version}
and requires dependent components compiled for a similar kernel. If
you cannot find a binary package that matches your kernel, rebuild
for your kernel from the %{name} package source rpm.
%post -p /bin/bash -n %{kernel_package}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ $1 -eq 1 -o $1 -eq 1 ] ; then : # fresh install or upgrade
sysmap=/boot/System.map-%{_kversion}
if [ -x "`which depmod 2>/dev/null`" ] ; then
if [ "%{_kversion}" = "`uname -r`" ] ; then
depmod -a || :
elif [ -r $sysmap ] ; then
UNAME_MACHINE=%{_target_cpu} \
depmod -ae -F $sysmap %{_kversion} || :
fi
fi
fi
%postun -p /bin/bash -n %{kernel_package}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
if [ $1 -eq 0 -o $1 -eq 1 ] ; then : # final removal or upgrade
sysmap=/boot/System.map-%{_kversion}
if [ -x "`which depmod 2>/dev/null`" ]; then
if [ "%{_kversion}" = "`uname -r`" ] ; then
depmod -a || :
elif [ -r $sysmap ] ; then
UNAME_MACHINE=%{_target_cpu} \
depmod -ae -F $sysmap %{_kversion} || :
fi
fi
fi
%files -n %{kernel_package}
# ---------------------------------------------------------------------------
%dir %{_kmoduledir}/%{_ksubdir}
%{_kmoduledir}/%{_ksubdir}/*.ko*
%dir %{_usrsrc}/%{base}-%{baseversion}-%{specrelease}/%{_kversion}
%{_usrsrc}/%{base}-%{baseversion}-%{specrelease}/%{_kversion}/Module.mkvars
%{_usrsrc}/%{base}-%{baseversion}-%{specrelease}/%{_kversion}/Module.symvers
%{_usrsrc}/%{base}-%{baseversion}-%{specrelease}/%{_kversion}/Modules.map
%{_usrsrc}/%{base}-%{baseversion}-%{specrelease}/%{_kversion}/System.symvers
%{_usrsrc}/%{base}-%{baseversion}-%{specrelease}/%{_kversion}/%{kernel_symsets}
%{_usrsrc}/%{base}-%{baseversion}-%{specrelease}/%{_kversion}/%{kernel_symvers}
%{_usrsrc}/%{base}-%{baseversion}-%{specrelease}/%{_kversion}/%{csite_file}
%{_usrsrc}/%{base}-%{baseversion}-%{specrelease}/%{_kversion}/%{cache_file}
%{_usrsrc}/%{base}-%{baseversion}-%{specrelease}/%{_kversion}/%{mpost_file}
%dir %{_kincludedir}/sys/%{base}
%{_kincludedir}/sys/%{base}/config.h
%{_kincludedir}/sys/%{base}/version.h
%dir %{_kbuilddir}/%{base}
%{_kbuilddir}/%{base}/Module.mkvars
%{_kbuilddir}/%{base}/Module.symvers
%{_kbuilddir}/%{base}/Modules.map
%{_kbuilddir}/%{base}/System.symvers
%{_kbuilddir}/%{base}/%{kernel_symsets}
# vim: ft=spec sw=4 et tw=78 com=b\:#,fb\:- fo+=tcqlorn nocin nosi