]> git.pld-linux.org Git - packages/dosnet.git/blob - dosnet.spec
- fixed depmod in %%post and %%postun when build with _without_dist_kernel
[packages/dosnet.git] / dosnet.spec
1 #
2 # Conditional build:
3 # _without_dist_kernel  - without kernel from distribution
4 #
5 %define         _moddir         /lib/modules/%{_kernel_ver}/misc
6 %define         _moddirsmp      /lib/modules/%{_kernel_ver}smp/misc
7 Summary:        A DOS emulator
8 Summary(de):    DOS-Emulator
9 Summary(es):    Emulador DOS
10 Summary(fr):    Emulateur DOS
11 Summary(pl):    Emulator DOSa
12 Summary(pt_BR): Emulador DOS
13 Summary(tr):    DOS öykünümcüsü
14 Name:           dosnet
15 Version:        1.0.2
16 %define _rel    22
17 Release:        %{_rel}
18 Epoch:          1
19 License:        GPL v2
20 Group:          Applications/Emulators
21 Source0:        dosnet-%{version}.tar.gz
22 ExclusiveArch:  %{ix86}
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 Conflicts:      kernel < 2.0.28
25
26 %description
27 Kernel module for dosnet (vnet). Dosnet lets you establish TCP/IP
28 connection between dosemu session and Linux kernel. Read README for
29 dosemu for more information.
30
31 %description -l pl
32 Modu³ dosnet.o dla kernela. Modu³ ten pozwala ³±czyæ siê programom
33 DOSowym wykorzystuj±cym TCP/IP z Linuksem. Przydatny miêdzy innymi
34 przy pisaniu programów sieciowych dla DOS-a. Rzeteln± informacjê na
35 temat dosnet mo¿esz znale¼æ w README do dosemu.
36
37 %package -n kernel-net-dosnet
38 Summary:        kernel module dosnet.o
39 Summary(pl):    Modu³ dosnet.o do kernela
40 Release:        %{_rel}@%{_kernel_ver_str}
41 Group:          Applications/Emulators
42 %{!?_without_dist_kernel:%requires_releq_kernel_up}
43 Requires(post,postun):  /sbin/depmod
44 #Requires:      %{name} = %{version}
45 Obsoletes:      dosnet
46
47 %description -n kernel-net-dosnet
48 Kernel module for dosnet (vnet). Dosnet lets you establish TCP/IP
49 connection between dosemu session and Linux kernel. Read README for
50 dosemu for more information.
51
52 %description -n kernel-net-dosnet -l pl
53 Modu³ dosnet.o dla kernela. Modu³ ten pozwala ³±czyæ siê programom
54 DOSowym wykorzystuj±cym TCP/IP z Linuksem. Przydatny miêdzy innymi
55 przy pisaniu programów sieciowych dla DOS-a. Rzeteln± informacjê na
56 temat dosnet mo¿esz znale¼æ w README do dosemu.
57
58 %package -n kernel-smp-net-dosnet
59 Summary:        kernel-smp module dosnet.o
60 Summary(pl):    Modu³ dosnet.o do kernela SMP
61 Release:        %{_rel}@%{_kernel_ver_str}
62 Group:          Applications/Emulators
63 %{!?_without_dist_kernel:%requires_releq_kernel_smp}
64 Requires(post,postun):  /sbin/depmod
65 #Requires:      %{name} = %{version}
66 Obsoletes:      dosnet
67
68 %description -n kernel-smp-net-dosnet
69 Kernel module for dosnet (vnet). Dosnet lets you establish TCP/IP
70 connection between dosemu session and Linux kernel. Read README for
71 dosemu for more information.
72
73 %description -n kernel-smp-net-dosnet -l pl
74 Modu³ dosnet.o dla kernela. Modu³ ten pozwala ³±czyæ siê programom
75 DOSowym wykorzystuj±cym TCP/IP z Linuksem. Przydatny miêdzy innymi
76 przy pisaniu programów sieciowych dla DOS-a. Rzeteln± informacjê na
77 temat dosnet mo¿esz znale¼æ w README do dosemu.
78
79 %prep
80 %setup -q -n dosnet
81
82 %build
83 OPTFLAGS="%{rpmcflags} %{!?debug:-fomit-frame-pointer}"; export OPTFLAGS
84
85 %{__cc} $OPTFLAGS -I%{_includedir} -D__KERNEL__ -D__KERNEL_SMP=1 \
86         -Wall -Wstrict-prototypes \
87         -fno-strength-reduce -I%{_kernelsrcdir}/include \
88         -DMODULE \
89         -c -o dosnet.o dosnet.c
90 mkdir smp
91 mv -f dosnet.o smp/
92
93 %{__cc} $OPTFLAGS -I%{_includedir} -D__KERNEL__ \
94         -Wall -Wstrict-prototypes \
95         -fno-strength-reduce -I%{_kernelsrcdir}/include \
96         -DMODULE \
97         -c -o dosnet.o dosnet.c
98
99 %install
100 rm -rf $RPM_BUILD_ROOT
101 install -d $RPM_BUILD_ROOT{%{_moddir},%{_moddirsmp}}
102 install dosnet.o $RPM_BUILD_ROOT%{_moddir}
103 install smp/dosnet.o $RPM_BUILD_ROOT%{_moddirsmp}
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %post   -n kernel-net-dosnet
109 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver} }%{_kernel_ver}
110
111 %postun -n kernel-net-dosnet
112 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver} }%{_kernel_ver}
113
114 %post   -n kernel-smp-net-dosnet
115 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver}smp }%{_kernel_ver}smp
116
117 %postun -n kernel-smp-net-dosnet
118 /sbin/depmod -a %{!?_without_dist_kernel:-F /boot/System.map-%{_kernel_ver}smp }%{_kernel_ver}smp
119
120 %files -n kernel-net-dosnet
121 %defattr(644,root,root,755)
122 %{_moddir}/dosnet.o*
123
124 %files -n kernel-smp-net-dosnet
125 %defattr(644,root,root,755)
126 %{_moddirsmp}/dosnet.o*
This page took 0.046853 seconds and 4 git commands to generate.