]>
Commit | Line | Data |
---|---|---|
997358a6 MW |
1 | # fairly minimal RPM spec file, does only packaging |
2 | # Based on work by Paul Lahaie of Steamballoon. | |
3 | # This file is touched up by sed (in the Makefile) before it is actually used. | |
4 | Summary: Kernel with FreeS/WAN | |
5 | Name: freeswan | |
6 | Version: @IPSECVERSION@_@KERNELVERSION@ | |
7 | Release: 0 | |
8 | Copyright: GPL | |
9 | Source: freeswan-%{version}.tar.gz | |
10 | Group: System Environment/Daemons | |
11 | BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root | |
12 | %define __spec_install_post /usr/lib/rpm/brp-compress || : | |
13 | %define KernelVer @KERNELVERSIONORIG@ | |
14 | Requires: ipsec-userland ipsec-kernel | |
15 | ||
16 | %package userland | |
17 | Summary: Kernel with FreeS/WAN | |
18 | Group: System Environment/Daemons | |
19 | Provides: ipsec-userland | |
20 | Requires: ipsec-kernel | |
21 | ||
22 | %package module | |
23 | Summary: FreeS/Wan kernel module | |
24 | Group: System Environment/Kernel | |
25 | Provides: ipsec-kernel | |
26 | # do not make the dependancy circular for now. | |
27 | #Requires: ipsec-userland | |
28 | ||
29 | %description userland | |
30 | This package contains the daemons and userland tools for setting up | |
31 | FreeS/WAN on a freeswan enabled kernel. | |
32 | ||
33 | %description module | |
34 | This package contains only the ipsec module for the RedHat series of kernels. | |
35 | ||
36 | %description | |
37 | A dummy package that installs userland and kernel pieces. | |
38 | ||
39 | %prep | |
40 | ||
41 | %build | |
42 | ||
43 | %install | |
44 | ||
45 | %clean | |
46 | rm -rf ${RPM_BUILD_ROOT} | |
47 | ||
48 | %files userland | |
49 | %defattr(-,root,root) | |
50 | @PUBDIR@/ipsec | |
51 | @FINALBINDIR@/* | |
52 | @FINALLIBDIR@/* | |
53 | /etc/rc.d/init.d/ipsec | |
54 | ||
55 | %attr(0644,root,root) %config @FINALCONFDIR@/ipsec.conf | |
56 | %attr(0644,root,root) %config @FINALCONFDDIR@/policies/clear | |
57 | %attr(0644,root,root) %config @FINALCONFDDIR@/policies/private | |
58 | %attr(0644,root,root) %config @FINALCONFDDIR@/policies/block | |
59 | %attr(0644,root,root) %config @FINALCONFDDIR@/policies/private-or-clear | |
60 | %attr(0644,root,root) %config @FINALCONFDDIR@/policies/clear-or-private | |
61 | ||
62 | %doc @MANTREE@/man3/* | |
63 | %doc @MANTREE@/man5/* | |
64 | %doc @MANTREE@/man8/* | |
65 | %doc @FINALEXAMPLECONFDIR@/* | |
66 | ||
67 | %files module | |
68 | %defattr (-,root,root) | |
69 | /lib/modules/%{KernelVer}/kernel/net/ipsec | |
70 | ||
71 | %pre userland | |
72 | if [ -f /etc/ipsec.conf ] | |
73 | then | |
74 | cp -f --backup=t /etc/ipsec.conf /etc/ipsec.conf.prerpm > /dev/null 2> /dev/null | |
75 | fi | |
76 | ||
77 | %preun userland | |
78 | sh /etc/rc.d/init.d/ipsec stop || exit 0 | |
79 | ||
80 | %postun module | |
81 | # This is a kludge to handle the fact that ipsec.o is not deleted | |
82 | # on plain jane RPM uninstall. | |
83 | for i in /lib/modules/*@KERNELVERSIONORIG@* | |
84 | do | |
85 | mv -f --backup=t "$i"/kernel/net/ipsec/ipsec.o "$i"/kernel/net/ipsec/ipsec.o.rpmbak > /dev/null 2> /dev/null | |
86 | done || exit 0 | |
87 | ||
88 | %post module | |
89 | # Same RPM uninstall kludge. | |
90 | for i in /lib/modules/*@KERNELVERSIONORIG@* | |
91 | do | |
92 | mv -f --backup=t "$i"/kernel/net/ipsec/ipsec.o "$i"/kernel/net/ipsec/ipsec.o.rpmbak > /dev/null 2> /dev/null | |
93 | done | |
94 | echo "do not forget to install the userland utilities" | |
95 | exit 0 | |
96 | ||
97 | %post userland | |
98 | chkconfig --add ipsec | |
99 | echo "invoke \"service ipsec start\" or reboot to begin" | |
100 | ||
101 | %changelog | |
102 | # | |
103 | # $Log: rpm.in,v $ | |
104 | # Revision 1.1 2004/03/15 20:35:27 as | |
105 | # added files from freeswan-2.04-x509-1.5.3 | |
106 | # | |
107 | # Revision 1.6 2003/01/30 23:31:34 sam | |
108 | # | |
109 | # dhr contributed changes. still may need modification, but I'm committing | |
110 | # before I leave. | |
111 | # | |
112 | # Revision 1.5 2003/01/14 22:03:44 sam | |
113 | # include policy files in RPM. | |
114 | # | |
115 | # Revision 1.4 2003/01/04 07:38:11 build | |
116 | # *** empty log message *** | |
117 | # | |
118 | # Revision 1.3 2002/12/12 05:45:41 sam | |
119 | # new template file from 1.99 pulled up in part | |
120 | # | |
121 | # Revision 1.2.2.1 2002/12/07 23:47:22 sam | |
122 | # merging in a few 1.99 rpm.in changes. | |
123 | # | |
124 | # Revision 1.2 2002/10/30 06:54:15 sam | |
125 | # Updates to take into account lib vs libexec - so we don't miss files. | |
126 | # | |
127 | # Revision 1.1 2002/10/06 08:35:54 sam | |
128 | # RPM template | |
129 | # | |
130 | # Revision 1.9 2002/06/16 21:53:49 mcr | |
131 | # added missing clauses to userland section. | |
132 | # | |
133 | # Revision 1.8 2002/06/16 20:18:41 mcr | |
134 | # 2.00 series RPM will have a "freeswan-userland" rather than | |
135 | # a "freeswan-X" RPM. Among other things, it makes regexp easier | |
136 | # to locate the different pieces. | |
137 | # | |
138 | # Revision 1.7 2002/06/11 23:10:53 mcr | |
139 | # added dependancies from userland->kernel. | |
140 | # cross-dependancies considered but cause too much user pain. | |
141 | # | |
142 | # Revision 1.6 2002/06/09 15:46:41 mcr | |
143 | # move installed modules for make rpm to kernel versioned directory. | |
144 | # | |
145 | # Revision 1.5 2002/04/11 02:50:30 mcr | |
146 | # added %post to make ipsec start, and %post to shut it down. | |
147 | # added %changelog as well. | |
148 | # | |
149 | # |